[PATCH] D101526: [analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg constraints

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 07:25:01 PDT 2022


martong added a comment.

In D101526#3804623 <https://reviews.llvm.org/D101526#3804623>, @NoQ wrote:

> Hi, looks great! I found a couple of typos and the amount of changes in tests is suspiciously low. And I want to make sure that the promise to change "arg" -> "argument" isn't lost (but I'll be happy if it's addressed in a follow-up patch).

Ok, I've changed "arg" to "argument" in the latest update, plus added new test cases. Thanks for the review!



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:755
   Result += getArgDesc(ArgN);
-  Result += " should not be NULL";
+  Result += DK == Violation ? " should not be NULL" : " is not NULL";
   return Result.c_str();
----------------
NoQ wrote:
> I suspect this needs to be covered by tests.
Okay, I've added further tests for the "not-null" and the "buffer-size-constraint" cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101526



More information about the cfe-commits mailing list