summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-10-18 00:44:04 +0000
committerJohn McCall <rjmccall@apple.com>2011-10-18 00:44:04 +0000
commit95ff270ee9950a7f8e5b4f07ae9a8838b742df5c (patch)
treee0682e78e38a1350e99c94bfb0cdfc30908ab1b6 /clang/lib/Lex/PPLexerChange.cpp
parent22d3adf6aa9cd1d980b1ff5e5c27f80ce9fc125c (diff)
downloadbcm5719-llvm-95ff270ee9950a7f8e5b4f07ae9a8838b742df5c.tar.gz
bcm5719-llvm-95ff270ee9950a7f8e5b4f07ae9a8838b742df5c.zip
Fix several bugs with #pragma clang arc_cf_code_audited and macros.
llvm-svn: 142324
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r--clang/lib/Lex/PPLexerChange.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp
index da6c8aa589e..dc6536427a2 100644
--- a/clang/lib/Lex/PPLexerChange.cpp
+++ b/clang/lib/Lex/PPLexerChange.cpp
@@ -237,8 +237,11 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
}
}
- // Complain about reaching an EOF within arc_cf_code_audited.
- if (PragmaARCCFCodeAuditedLoc.isValid()) {
+ // 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);
// Recover by leaving immediately.
OpenPOWER on IntegriCloud