summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-04 03:32:15 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-04 03:32:15 +0000
commit5cec2aea3f5c402bbf570bc71dc173562424c8d6 (patch)
tree831c0bb13a4db8c277d53fc819130d1abdb188d6 /clang/lib/Lex/PTHLexer.cpp
parenta3deaeeb52acdc863ee98eb5bb20b419518bc592 (diff)
downloadbcm5719-llvm-5cec2aea3f5c402bbf570bc71dc173562424c8d6.tar.gz
bcm5719-llvm-5cec2aea3f5c402bbf570bc71dc173562424c8d6.zip
Support code-completion for C++ inline methods and ObjC buffering methods.
Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 llvm-svn: 139086
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index b61b8f35f84..02af1ec27ed 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/lib/Lex/PTHLexer.cpp
@@ -147,7 +147,7 @@ bool PTHLexer::LexEndOfFile(Token &Result) {
// If we are in a #if directive, emit an error.
while (!ConditionalStack.empty()) {
- if (!PP->isCodeCompletionFile(FileStartLoc))
+ if (PP->getCodeCompletionFileLoc() != FileStartLoc)
PP->Diag(ConditionalStack.back().IfLoc,
diag::err_pp_unterminated_conditional);
ConditionalStack.pop_back();
OpenPOWER on IntegriCloud