diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-02-22 04:47:24 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-02-22 04:47:24 +0000 |
commit | d8039df5231cb23fe332e70ecb6f064179ec0352 (patch) | |
tree | d0399039d694dde88d0c9c3c61480797f145091f /clang/lib/Parse/ParseDecl.cpp | |
parent | e59c8af7059f2ba1d65ea421a8ba4a739ed80372 (diff) | |
download | bcm5719-llvm-d8039df5231cb23fe332e70ecb6f064179ec0352.tar.gz bcm5719-llvm-d8039df5231cb23fe332e70ecb6f064179ec0352.zip |
Addressing review comments for r261163.
Use "strict" instead of "nopartial". Also make strictly not-introduced
share the same diagnostics as Obsolete and Unavailable.
rdar://23791325
llvm-svn: 261512
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 24db6814b81..14b11285ea4 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -833,13 +833,13 @@ VersionTuple Parser::ParseVersionTuple(SourceRange &Range) { /// \brief Parse the contents of the "availability" attribute. /// /// availability-attribute: -/// 'availability' '(' platform ',' opt-nopartial version-arg-list, opt-message')' +/// 'availability' '(' platform ',' opt-strict version-arg-list, opt-message')' /// /// platform: /// identifier /// -/// opt-nopartial: -/// 'nopartial' ',' +/// opt-strict: +/// 'strict' ',' /// /// version-arg-list: /// version-arg @@ -892,12 +892,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, Ident_obsoleted = PP.getIdentifierInfo("obsoleted"); Ident_unavailable = PP.getIdentifierInfo("unavailable"); Ident_message = PP.getIdentifierInfo("message"); - Ident_nopartial = PP.getIdentifierInfo("nopartial"); + Ident_strict = PP.getIdentifierInfo("strict"); } - // Parse the optional "nopartial" and the set of + // Parse the optional "strict" and the set of // introductions/deprecations/removals. - SourceLocation UnavailableLoc, NopartialLoc; + SourceLocation UnavailableLoc, StrictLoc; do { if (Tok.isNot(tok::identifier)) { Diag(Tok, diag::err_availability_expected_change); @@ -907,12 +907,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, IdentifierInfo *Keyword = Tok.getIdentifierInfo(); SourceLocation KeywordLoc = ConsumeToken(); - if (Keyword == Ident_nopartial) { - if (NopartialLoc.isValid()) { + if (Keyword == Ident_strict) { + if (StrictLoc.isValid()) { Diag(KeywordLoc, diag::err_availability_redundant) - << Keyword << SourceRange(NopartialLoc); + << Keyword << SourceRange(StrictLoc); } - NopartialLoc = KeywordLoc; + StrictLoc = KeywordLoc; continue; } @@ -1037,7 +1037,7 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, Changes[Deprecated], Changes[Obsoleted], UnavailableLoc, MessageExpr.get(), - Syntax, NopartialLoc); + Syntax, StrictLoc); } /// \brief Parse the contents of the "objc_bridge_related" attribute. |