diff options
author | Tianlan Zhou <bobby825@126.com> | 2024-02-04 02:35:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 10:35:40 -0800 |
commit | eeaf41bf142d428c0da6b2486cc299b81f240178 (patch) | |
tree | 465f6f8da6effcead5585a18846a6f3c0bee2ae3 /clang-tools-extra | |
parent | 42b7061f1f0a2c52c8302a25ec656f990236b933 (diff) | |
download | llvm-eeaf41bf142d428c0da6b2486cc299b81f240178.zip llvm-eeaf41bf142d428c0da6b2486cc299b81f240178.tar.gz llvm-eeaf41bf142d428c0da6b2486cc299b81f240178.tar.bz2 |
Backport '[clang] static operators should evaluate object argument (reland)' to release/18.x (#80109)
Cherry picked from commit ee01a2c3996f9647f3158f5acdb921a6ede94dc1.
Closes #80041, backport #80108.
Co-authored-by: Shafik Yaghmour <shafik@users.noreply.github.com>
Co-authored-by: cor3ntin <corentinjabot@gmail.com>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/clangd/InlayHints.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang-tools-extra/clangd/InlayHints.cpp b/clang-tools-extra/clangd/InlayHints.cpp index 5722ca8..5f3687a 100644 --- a/clang-tools-extra/clangd/InlayHints.cpp +++ b/clang-tools-extra/clangd/InlayHints.cpp @@ -651,16 +651,12 @@ public: // implied object argument ([over.call.func]), the list of provided // arguments is preceded by the implied object argument for the purposes of // this correspondence... - // - // However, we don't have the implied object argument - // for static operator() per clang::Sema::BuildCallToObjectOfClassType. llvm::ArrayRef<const Expr *> Args = {E->getArgs(), E->getNumArgs()}; // We don't have the implied object argument through a function pointer // either. if (const CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(Callee.Decl)) - if (Method->isInstance() && - (IsFunctor || Method->hasCXXExplicitFunctionObjectParameter())) + if (IsFunctor || Method->hasCXXExplicitFunctionObjectParameter()) Args = Args.drop_front(1); processCall(Callee, Args); return true; |