diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 2288cb1c33a..69347520489 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -870,6 +870,19 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, break; } + // Special handling of 'NA' only when applied to introduced or + // deprecated. + if ((Keyword == Ident_introduced || Keyword == Ident_deprecated) && + Tok.is(tok::identifier)) { + IdentifierInfo *NA = Tok.getIdentifierInfo(); + if (NA->getName() == "NA") { + ConsumeToken(); + if (Keyword == Ident_introduced) + UnavailableLoc = KeywordLoc; + continue; + } + } + SourceRange VersionRange; VersionTuple Version = ParseVersionTuple(VersionRange); |