diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-12 17:04:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-12 17:04:55 +0000 |
commit | 02690ba643abc4b71e275fbf27f38c4e6330c4ce (patch) | |
tree | 3e21814b55f7f839642f7506294b99c02228bc99 /clang/lib/Lex/PPDirectives.cpp | |
parent | ca4930b4453da1444221772199983c43b1ea95ae (diff) | |
download | bcm5719-llvm-02690ba643abc4b71e275fbf27f38c4e6330c4ce.tar.gz bcm5719-llvm-02690ba643abc4b71e275fbf27f38c4e6330c4ce.zip |
Don't emit end-of-file diagnostics like "unterminated conditional" or
"unterminated string" when we're performing code completion.
llvm-svn: 110933
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 61ebf23acb9..9cab2d2bfc6 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -171,8 +171,9 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc, // Emit errors for each unterminated conditional on the stack, including // the current one. while (!CurPPLexer->ConditionalStack.empty()) { - Diag(CurPPLexer->ConditionalStack.back().IfLoc, - diag::err_pp_unterminated_conditional); + if (!isCodeCompletionFile(Tok.getLocation())) + Diag(CurPPLexer->ConditionalStack.back().IfLoc, + diag::err_pp_unterminated_conditional); CurPPLexer->ConditionalStack.pop_back(); } |