================
@@ -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:
Something like this
```cpp
void FactsGenerator::VisitCallExpr(const CallExpr *CE, bool IgnoreFirstArg) {
handleFunctionCall(CE, CE->getDirectCallee(),
IgnoreFirstArg
? ArrayRef{CE->getArgs(), CE->getNumArgs()}.slice(1)
: ArrayRef{CE->getArgs(), CE->getNumArgs()});
}
```
https://github.com/llvm/llvm-project/pull/187853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits