diff options
author | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | 2024-05-17 20:55:37 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 20:55:37 +0400 |
commit | 874f511ae779a38bd9ad9d80db63c0a10252e526 (patch) | |
tree | 162406577a5a902784fe650ef821b553812e9133 /clang/lib/Parse/ParseOpenMP.cpp | |
parent | e3686755eab66604335e246ed7b30033ab71dbbc (diff) | |
download | llvm-874f511ae779a38bd9ad9d80db63c0a10252e526.zip llvm-874f511ae779a38bd9ad9d80db63c0a10252e526.tar.gz llvm-874f511ae779a38bd9ad9d80db63c0a10252e526.tar.bz2 |
[clang] Introduce `SemaCodeCompletion` (#92311)
This patch continues previous efforts to split `Sema` up, this time
covering code completion.
Context can be found in #84184.
Dropping `Code` prefix from function names in `SemaCodeCompletion` would
make sense, but I think this PR has enough changes already.
As usual, formatting changes are done as a separate commit. Hopefully
this helps with the review.
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index ca2c6d6..e959dd6 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -21,6 +21,7 @@ #include "clang/Parse/RAIIObjectsForParser.h" #include "clang/Sema/EnterExpressionEvaluationContext.h" #include "clang/Sema/Scope.h" +#include "clang/Sema/SemaCodeCompletion.h" #include "clang/Sema/SemaOpenMP.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/StringSwitch.h" @@ -460,7 +461,8 @@ void Parser::ParseOpenMPReductionInitializerForDecl(VarDecl *OmpPrivParm) { if (Tok.is(tok::code_completion)) { cutOffParsing(); - Actions.CodeCompleteInitializer(getCurScope(), OmpPrivParm); + Actions.CodeCompletion().CodeCompleteInitializer(getCurScope(), + OmpPrivParm); Actions.FinalizeDeclaration(OmpPrivParm); return; } @@ -484,9 +486,10 @@ void Parser::ParseOpenMPReductionInitializerForDecl(VarDecl *OmpPrivParm) { SourceLocation LParLoc = T.getOpenLocation(); auto RunSignatureHelp = [this, OmpPrivParm, LParLoc, &Exprs]() { - QualType PreferredType = Actions.ProduceConstructorSignatureHelp( - OmpPrivParm->getType()->getCanonicalTypeInternal(), - OmpPrivParm->getLocation(), Exprs, LParLoc, /*Braced=*/false); + QualType PreferredType = + Actions.CodeCompletion().ProduceConstructorSignatureHelp( + OmpPrivParm->getType()->getCanonicalTypeInternal(), + OmpPrivParm->getLocation(), Exprs, LParLoc, /*Braced=*/false); CalledSignatureHelp = true; return PreferredType; }; |