diff options
author | Douglas Gregor <dgregor@apple.com> | 2015-06-24 22:02:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2015-06-24 22:02:08 +0000 |
commit | aea7afdc1304cfef3b2cf61793729b1f55f26d0a (patch) | |
tree | 80670a6c9757e83d93e42c74128d0730cbaea889 /clang/lib/Parse/ParseDecl.cpp | |
parent | 63d606bdcb606ace3cea3455dcaf0c3dac108d4e (diff) | |
download | bcm5719-llvm-aea7afdc1304cfef3b2cf61793729b1f55f26d0a.tar.gz bcm5719-llvm-aea7afdc1304cfef3b2cf61793729b1f55f26d0a.zip |
Replace __double_underscored type nullability qualifiers with _Uppercase_underscored
Addresses a conflict with glibc's __nonnull macro by renaming the type
nullability qualifiers as follows:
__nonnull -> _Nonnull
__nullable -> _Nullable
__null_unspecified -> _Null_unspecified
This is the major part of rdar://problem/21530726, but does not yet
provide the Darwin-specific behavior for the old names.
llvm-svn: 240596
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 1c52552ea15..e3294eca46f 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -691,9 +691,9 @@ void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) { // Treat these like attributes, even though they're type specifiers. while (true) { switch (Tok.getKind()) { - case tok::kw___nonnull: - case tok::kw___nullable: - case tok::kw___null_unspecified: { + case tok::kw__Nonnull: + case tok::kw__Nullable: + case tok::kw__Null_unspecified: { IdentifierInfo *AttrName = Tok.getIdentifierInfo(); SourceLocation AttrNameLoc = ConsumeToken(); if (!getLangOpts().ObjC1) @@ -3076,9 +3076,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, continue; // Nullability type specifiers. - case tok::kw___nonnull: - case tok::kw___nullable: - case tok::kw___null_unspecified: + case tok::kw__Nonnull: + case tok::kw__Nullable: + case tok::kw__Null_unspecified: ParseNullabilityTypeSpecifiers(DS.getAttributes()); continue; @@ -4326,9 +4326,9 @@ bool Parser::isTypeSpecifierQualifier() { case tok::kw___pascal: case tok::kw___unaligned: - case tok::kw___nonnull: - case tok::kw___nullable: - case tok::kw___null_unspecified: + case tok::kw__Nonnull: + case tok::kw__Nullable: + case tok::kw__Null_unspecified: case tok::kw___private: case tok::kw___local: @@ -4503,9 +4503,9 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::kw___pascal: case tok::kw___unaligned: - case tok::kw___nonnull: - case tok::kw___nullable: - case tok::kw___null_unspecified: + case tok::kw__Nonnull: + case tok::kw__Nullable: + case tok::kw__Null_unspecified: case tok::kw___private: case tok::kw___local: @@ -4738,9 +4738,9 @@ void Parser::ParseTypeQualifierListOpt(DeclSpec &DS, unsigned AttrReqs, goto DoneWithTypeQuals; // Nullability type specifiers. - case tok::kw___nonnull: - case tok::kw___nullable: - case tok::kw___null_unspecified: + case tok::kw__Nonnull: + case tok::kw__Nullable: + case tok::kw__Null_unspecified: ParseNullabilityTypeSpecifiers(DS.getAttributes()); continue; |