diff options
author | Erich Keane <erich.keane@intel.com> | 2019-09-13 17:39:31 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-09-13 17:39:31 +0000 |
commit | 6a24e8068052cd6b48295959ec4c44eb2ef819c5 (patch) | |
tree | bca632cf1757a786c64a5623e5fec63d5bb025af /clang/lib/Lex/PPLexerChange.cpp | |
parent | 7ff9a9353c24c9da28ad7719c34d859c7009fafa (diff) | |
download | bcm5719-llvm-6a24e8068052cd6b48295959ec4c44eb2ef819c5.tar.gz bcm5719-llvm-6a24e8068052cd6b48295959ec4c44eb2ef819c5.zip |
[NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.
In order to enable future improvements to our attribute diagnostics,
this moves info from ParsedAttr into CommonAttributeInfo, then makes
this type the base of the *Attr and ParsedAttr types. Quite a bit of
refactoring took place, including removing a bunch of redundant Spelling
Index propogation.
Differential Revision: https://reviews.llvm.org/D67368
llvm-svn: 371875
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | clang/lib/Lex/PPLexerChange.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp index dddfe089fe8..80217269396 100644 --- a/clang/lib/Lex/PPLexerChange.cpp +++ b/clang/lib/Lex/PPLexerChange.cpp @@ -376,12 +376,13 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { // Complain about reaching a true EOF within arc_cf_code_audited. // We don't want to complain about reaching the end of a macro // instantiation or a _Pragma. - if (PragmaARCCFCodeAuditedLoc.isValid() && - !isEndOfMacro && !(CurLexer && CurLexer->Is_PragmaLexer)) { - Diag(PragmaARCCFCodeAuditedLoc, diag::err_pp_eof_in_arc_cf_code_audited); + if (PragmaARCCFCodeAuditedInfo.second.isValid() && !isEndOfMacro && + !(CurLexer && CurLexer->Is_PragmaLexer)) { + Diag(PragmaARCCFCodeAuditedInfo.second, + diag::err_pp_eof_in_arc_cf_code_audited); // Recover by leaving immediately. - PragmaARCCFCodeAuditedLoc = SourceLocation(); + PragmaARCCFCodeAuditedInfo = {nullptr, SourceLocation()}; } // Complain about reaching a true EOF within assume_nonnull. |