[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 1 18:37:27 PDT 2019


Charusso marked 2 inline comments as done.
Charusso added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:82
+
+        Out << '\'' << Name << "' always returns "
+            << (*Value ? "true" : "false");
----------------
NoQ wrote:
> Charusso wrote:
> > NoQ wrote:
> > > Let's mention the class name as well! Maybe even the fully qualified namespace.
> > The class::call part would be tricky, because you need to hook what do you have in the CallDescription. It could be done with the decl-matching part, but then you have to rewrite the CallDescriptionMap interface as `lookup(), key(), value()`, so you could use the hooked info everywhere. It would require too much overhead for a print.
> Just use `CXXMethodDecl::getParent()`.
Thanks, I really wanted to have a generic solution.


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

https://reviews.llvm.org/D63915





More information about the cfe-commits mailing list