================
@@ -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);
----------------
NeKon69 wrote:

Initially I also wanted to put this check in the `handleMovedArgsInCall` 
function, but I thought it didn't have enough info about the function, since we 
don't pass in the call itself hence we can't check if it's `OO_Call`. I may 
modify function signature to pass in `Call` though, if that makes sense

https://github.com/llvm/llvm-project/pull/187853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to