summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2018-09-10 13:46:28 +0000
committerKadir Cetinkaya <kadircet@google.com>2018-09-10 13:46:28 +0000
commit9a74d9fcc63fc7eb3dfa1cf86891ad9f9f473030 (patch)
treecdbe7ee54e2df31751d5d546fae0fb76e785bdd9 /lib/Parse/ParseOpenMP.cpp
parentcd3fec58a47ab13427d4babad145387a65482146 (diff)
downloadclang-9a74d9fcc63fc7eb3dfa1cf86891ad9f9f473030.tar.gz
[clang] Make sure codecompletion is called for calls even when inside a token.
Summary: Currently CodeCompleteCall only gets called after a comma or parantheses. This patch makes sure it is called even at the cases like: ```foo(1^);``` Reviewers: ilya-biryukov, ioeric, hokein Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51038 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseOpenMP.cpp')
-rw-r--r--lib/Parse/ParseOpenMP.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parse/ParseOpenMP.cpp b/lib/Parse/ParseOpenMP.cpp
index 4da357bbbc..9871e5bbf9 100644
--- a/lib/Parse/ParseOpenMP.cpp
+++ b/lib/Parse/ParseOpenMP.cpp
@@ -422,8 +422,15 @@ void Parser::ParseOpenMPReductionInitializerForDecl(VarDecl *OmpPrivParm) {
getCurScope(),
OmpPrivParm->getType()->getCanonicalTypeInternal(),
OmpPrivParm->getLocation(), Exprs, LParLoc);
+ CalledSignatureHelp = true;
Actions.CodeCompleteExpression(getCurScope(), PreferredType);
})) {
+ if (PP.isCodeCompletionReached() && !CalledSignatureHelp) {
+ Actions.ProduceConstructorSignatureHelp(
+ getCurScope(), OmpPrivParm->getType()->getCanonicalTypeInternal(),
+ OmpPrivParm->getLocation(), Exprs, LParLoc);
+ CalledSignatureHelp = true;
+ }
Actions.ActOnInitializerError(OmpPrivParm);
SkipUntil(tok::r_paren, tok::annot_pragma_openmp_end, StopBeforeMatch);
} else {