summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-27 23:58:17 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-27 23:58:17 +0000
commitab2d09b6287a5dc6fa94d78739444f46f9a78bfb (patch)
tree7a62b8c92f336d0f808511786548b3247fdbc3da /lib/Parse/ParseObjc.cpp
parent9807a2e0ddb1eafb8725dbf0247271a4a694037b (diff)
downloadclang-ab2d09b6287a5dc6fa94d78739444f46f9a78bfb.tar.gz
clang-ab2d09b6287a5dc6fa94d78739444f46f9a78bfb.tar.bz2
clang-ab2d09b6287a5dc6fa94d78739444f46f9a78bfb.tar.xz
[Parser] Don't code-complete twice.
When we are consuming the current token just to enter a new token stream, we push the current token in the back of the stream so that we get it again. Unfortunately this had the effect where if the current token is a code-completion one, we would code-complete once during consuming it and another time after the stream ended. Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion token without invoking code-completion. rdar://12842503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index e4a880e89a..fb0237ac05 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -2896,7 +2896,7 @@ void Parser::ParseLexedObjCMethodDefs(LexedMethod &LM, bool parseMethod) {
PP.EnterTokenStream(LM.Toks.data(), LM.Toks.size(), true, false);
// Consume the previously pushed token.
- ConsumeAnyToken();
+ ConsumeAnyToken(/*ConsumeCodeCompletionTok=*/true);
assert((Tok.is(tok::l_brace) || Tok.is(tok::kw_try) ||
Tok.is(tok::colon)) &&