Szelethus added a comment.

Hmm, have you branched off of D71524 <https://reviews.llvm.org/D71524>? If so, 
this patch should definitely land first.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:165
   /// Given a pointer argument, return the value it points to.
-  static Optional<SVal> getPointedToSVal(CheckerContext &C, const Expr *Arg);
+  static Optional<SVal> getPointeeOf(CheckerContext &C, const Expr *Arg);
 
----------------
Nice!


================
Comment at: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:385
+unsigned getNumArgs(const CallEvent &Call) {
+  return Call.getNumArgs() + static_cast<unsigned>(isa<CXXInstanceCall>(Call));
 }
----------------
NoQ wrote:
> steakhal wrote:
> > I'm not sure why should we adjust (//workaround//) the number of arguments 
> > of `CXXInstanceCall`s calls, can someone explain it to me?
> > 
> > The same question raised for `getArg` too. 
> Remove this :)
> 
> I think this is about this inconsistency with operator calls where one of 
> {decl, expr} treats `this` as an argument, but the other doesn't. `CallEvent` 
> automatically accounts for that (see `getAdjustedParameterIndex()` and 
> `getASTArgumentIndex()` as they're overridden in various sub-classes of 
> `CallEvent`).
I have some thoughts about this here: D71524#1859435. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72035/new/

https://reviews.llvm.org/D72035



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to