[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 20 08:38:26 PDT 2020


martong marked an inline comment as done.
martong added a comment.

Thanks for the review guys!



================
Comment at: clang/test/Analysis/std-c-library-functions-arg-constraints.c:1-7
+// RUN: %clang_analyze_cc1 %s \
+// RUN:   -analyzer-checker=core \
+// RUN:   -analyzer-checker=apiModeling.StdCLibraryFunctions \
+// RUN:   -analyzer-checker=apiModeling.StdCLibraryFunctionArgs \
+// RUN:   -analyzer-checker=debug.ExprInspection \
+// RUN:   -triple x86_64-unknown-linux-gnu \
+// RUN:   -verify
----------------
Szelethus wrote:
> martong wrote:
> > Szelethus wrote:
> > > Hmm, why do we have 2 different test files that essentially do the same? Shouldn't we only have a single one with `analyzer-output=text`?
> > No, I wanted to have two different test files to test two different things: (1) We do have the constraints applied (here we don't care about the warnings and the path)
> > (2) Check that we have a warning with the proper tracking and notes.
> What if we had different `-verify`s? `clang/test/Analysis/track-conditions.cpp` is a great example.
Yeah, that's a very good approach, I just changed it like that. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73898





More information about the cfe-commits mailing list