================
@@ -655,6 +656,13 @@ void FactsGenerator::handleFunctionCall(const Expr *Call,
// All arguments to a function are a use of the corresponding expressions.
for (const Expr *Arg : Args)
handleUse(Arg);
+
+ if (const auto *OCE = dyn_cast<CXXOperatorCallExpr>(Call);
+ OCE && OCE->getOperator() == OO_Call && FD->isStatic()) {
+ // Ignore first element
+ Args = Args.slice(1);
+ }
+
handleInvalidatingCall(Call, FD, Args);
handleMovedArgsInCall(FD, Args);
----------------
hokein wrote:
hmm, it looks like there are multiple places (searching for `isInstance` in
this file) that rely on the incorrect assumption that the function object
exists only for non-static methods.
I think either fixing all of those locations or handling it in
`VisitCXXOperatorCallExpr` should work. Fixing VisitCXXOperatorCallExpr is
probably simpler as it avoids changing two/three different places.
https://github.com/llvm/llvm-project/pull/187853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits