[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    [cfe-dev] Clang C API with ObjC Nullability
From:       Kristóf_Liliom via cfe-dev <cfe-dev () lists ! llvm ! org>
Date:       2015-08-24 10:18:36
Message-ID: 7010ED77-149E-4E94-BD4D-1EE8818B4938 () mattakis ! com
[Download RAW message or body]

Hi,

I don't really know whether the following behaviour is intentional or not when using \
Objective-C's nullability. The output of the following code was created via \
"c-index-test -test-print-type"

@interface NotNullAnnotated
@property (assign) int *x1;
@end

This gives me an output which I expect:
ObjCPropertyDecl=x1:14:25 [assign,] [type=int *] [typekind=Pointer] [isPOD=1] \
[pointeetype=int] [pointeekind=Int]

But when using nullability:
@interface NonNullAnnotated
@property (assign) int * _Nonnull x2;
@end

I get this:
ObjCPropertyDecl=x2:21:35 [assign,] [type=int * _Nonnull] [typekind=Unexposed] \
[canonicaltype=int *] [canonicaltypekind=Pointer] [isPOD=1]

While I would expect:
ObjCPropertyDecl=x2:21:35 [assign,] [type=int * _Nonnull] [typekind=Pointer] \
[isPOD=1] [pointeetype=int] [pointeekind=Int]

AFAIK nullability is a property on a type and should not modify its typekind. Is this \
behaviour intentional or a bug?

Yours Sincerely,
Kristof

_______________________________________________
cfe-dev mailing list
cfe-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic