[clang] [LifetimeSafety] Fix crash on explicit object member functions (PR #212154)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 06:29:49 PDT 2026
================
@@ -911,7 +911,8 @@ void FactsGenerator::handleMovedArgsInCall(const FunctionDecl *FD,
ArrayRef<const Expr *> Args) {
unsigned IsInstance = 0;
if (const auto *MD = dyn_cast<CXXMethodDecl>(FD);
- MD && MD->isInstance() && !isa<CXXConstructorDecl>(FD)) {
+ MD && !isa<CXXConstructorDecl>(FD) &&
+ MD->isImplicitObjectMemberFunction()) {
----------------
cor3ntin wrote:
This can be simplified - there is no such thing as a constructor with an explicit object parameter.
https://github.com/llvm/llvm-project/pull/212154
More information about the cfe-commits
mailing list