[clang] [clang][analyzer] Fix crash caused by overload operator member function with explicit this (PR #132581)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 24 03:18:22 PDT 2025
================
@@ -157,8 +157,11 @@ void ContainerModeling::checkPostCall(const CallEvent &Call,
if (Func->isOverloadedOperator()) {
const auto Op = Func->getOverloadedOperator();
if (Op == OO_Equal) {
- // Overloaded 'operator=' must be a non-static member function.
- const auto *InstCall = cast<CXXInstanceCall>(&Call);
+ // Only handle the assignment operator with implicit this
----------------
steakhal wrote:
Actually, it shouldn't be too hard to fix this. Only like 5 lines of code I imagine.
At that point, it may be easier to fix it instead of creating a ticket.
https://github.com/llvm/llvm-project/pull/132581
More information about the cfe-commits
mailing list