mboehme updated this revision to Diff 516378. mboehme added a comment. Rebased to head
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148612/new/ https://reviews.llvm.org/D148612 Files: clang/lib/Analysis/FlowSensitive/Transfer.cpp Index: clang/lib/Analysis/FlowSensitive/Transfer.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/Transfer.cpp +++ clang/lib/Analysis/FlowSensitive/Transfer.cpp @@ -646,9 +646,12 @@ assert(Arg1 != nullptr); // Evaluate only copy and move assignment operators. - auto *Arg0Type = Arg0->getType()->getUnqualifiedDesugaredType(); - auto *Arg1Type = Arg1->getType()->getUnqualifiedDesugaredType(); - if (Arg0Type != Arg1Type) + const auto *Method = + dyn_cast_or_null<CXXMethodDecl>(S->getDirectCallee()); + if (!Method) + return; + if (!Method->isCopyAssignmentOperator() && + !Method->isMoveAssignmentOperator()) return; auto *ObjectLoc = Env.getStorageLocation(*Arg0, SkipPast::Reference);
Index: clang/lib/Analysis/FlowSensitive/Transfer.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/Transfer.cpp +++ clang/lib/Analysis/FlowSensitive/Transfer.cpp @@ -646,9 +646,12 @@ assert(Arg1 != nullptr); // Evaluate only copy and move assignment operators. - auto *Arg0Type = Arg0->getType()->getUnqualifiedDesugaredType(); - auto *Arg1Type = Arg1->getType()->getUnqualifiedDesugaredType(); - if (Arg0Type != Arg1Type) + const auto *Method = + dyn_cast_or_null<CXXMethodDecl>(S->getDirectCallee()); + if (!Method) + return; + if (!Method->isCopyAssignmentOperator() && + !Method->isMoveAssignmentOperator()) return; auto *ObjectLoc = Env.getStorageLocation(*Arg0, SkipPast::Reference);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits