NoQ added a comment.

In D72705#1871996 <https://reviews.llvm.org/D72705#1871996>, @Szelethus wrote:

> @NoQ, @xazax.hun, @baloghadamsoftware, how do you like this patch? I think 
> the high level idea is correct.


I still don't understand how do we enable this checker, i.e. for whom and how 
often. Is there anything we'll be able to turn on by default, like maybe warn 
on all functions that wear `__attribute__((warn_unused_result))`?



================
Comment at: clang/lib/StaticAnalyzer/Checkers/ErrorReturnChecker.cpp:309-311
+void ErrorReturnChecker::checkAccess(CheckerContext &C, ProgramStateRef State,
+                                     const Stmt *LoadS, SymbolRef CallSym,
+                                     const CalledFunctionData *CFD) const {
----------------
Why scan parent statements proactively given that we will reach them later 
anyway? Looks like you're using a wrong checker callback.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72705



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

Reply via email to