NoQ marked an inline comment as done.
NoQ added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:372
                                           CheckerContext &C) const {
-  const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(CE->getCalleeDecl());
+  const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl());
   if (!FD)
----------------
a_sidorin wrote:
> Should we create helpers similar to getDecl() and getOriginExpr 
> (getFunctionDecl/getCallExpr)?
Generally it sounds like a good idea, but in the context of this patch it's 
only useful when i don't want to refactor the code to avoid needing such 
getters in the first place. Once the `CallDescription` interface is good 
enough, all such getters will turn into hard casts without null checks. But 
these two checkers implement their own custom call description facility, so 
they need this sort of dancing.


Repository:
  rC Clang

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

https://reviews.llvm.org/D62440



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

Reply via email to