[cfe-dev] Missing Availability Information for Enums
Jordan Rose
jordan_rose at apple.com
Mon Mar 18 18:54:21 PDT 2013
On Mar 18, 2013, at 18:52 , Richard Smith <richard at metafoo.co.uk> wrote:
>
> When built in C++11 mode, we get this, which looks much more reasonable:
>
> TranslationUnitDecl 0x5e9b0d0 <<invalid sloc>>
> |-TypedefDecl 0x5e9b610 <<invalid sloc>> __int128_t '__int128'
> |-TypedefDecl 0x5e9b670 <<invalid sloc>> __uint128_t 'unsigned __int128'
> |-TypedefDecl 0x5e9ba30 <<invalid sloc>> __builtin_va_list '__va_list_tag [1]'
> |-TypedefDecl 0x5e9ba90 <tmp.c:1:1, col:14> NSInteger 'long'
> |-EnumDecl 0x5e9bb10 <line:2:9, col:14> PKPassKitErrorCode 'NSInteger':'long'
> |-TypedefDecl 0x5e9bc10 <col:1, col:45> PKPassKitErrorCode 'enum PKPassKitErrorCode':'enum PKPassKitErrorCode'
> `-EnumDecl 0x5e9bca0 prev 0x5e9bb10 <col:65, line:7:1> PKPassKitErrorCode 'NSInteger':'long'
> |-AvailabilityAttr 0x5ecea50 <col:18, col:49> ios 6.0 0 0 ""
> |-EnumConstantDecl 0x5e9bd80 <line:3:5, col:23> PKUnknownError 'enum PKPassKitErrorCode'
> | `-ImplicitCastExpr 0x5e9bd68 <col:22, col:23> 'NSInteger':'long' <IntegralCast>
> | `-UnaryOperator 0x5e9bd48 <col:22, col:23> 'int' prefix '-'
> | `-IntegerLiteral 0x5e9bd28 <col:23> 'int' 1
> |-EnumConstantDecl 0x5ece960 <line:4:5, col:26> PKInvalidDataError 'enum PKPassKitErrorCode'
> | `-ImplicitCastExpr 0x5ece940 <col:26> 'NSInteger':'long' <IntegralCast>
> | `-IntegerLiteral 0x5e9bdd0 <col:26> 'int' 1
> |-EnumConstantDecl 0x5ece9b0 <line:5:5> PKUnsupportedVersionError 'enum PKPassKitErrorCode'
> `-EnumConstantDecl 0x5ecea00 <line:6:5> PKInvalidSignature 'enum PKPassKitErrorCode'
Hm, may be an implementation quirk in Objective-C's version of forward-declared enums, then. Not sure if accidental or by design. Doug, do you happen to know offhand?
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130318/4c1861b4/attachment.html>
More information about the cfe-dev
mailing list