[analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg
authorGabor Marton <gabor.marton@ericsson.com>
Fri, 14 Oct 2022 14:10:21 +0000 (16:10 +0200)
committerGabor Marton <gabor.marton@ericsson.com>
Wed, 26 Oct 2022 14:33:25 +0000 (16:33 +0200)
commit82a50812f7e539b69fb8031bee9c823e5290d1c9
tree0afc19a5d33cca4d4b72748c1138354d97c73ac8
parenta688b5f92a17dccbad411b41e254addfbd4d2852
[analyzer][StdLibraryFunctionsChecker] Add NoteTags for applied arg
constraints

In this patch I add a new NoteTag for each applied argument constraint.
This way, any other checker that reports a bug - where the applied
constraint is relevant - will display the corresponding note. With this
change we provide more information for the users to understand some
bug reports easier.

Differential Revision: https://reviews.llvm.org/D101526

Reviewed By: NoQ
clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
clang/test/Analysis/std-c-library-functions-arg-constraints-note-tags.cpp [new file with mode: 0644]
clang/test/Analysis/std-c-library-functions-arg-constraints-notes.cpp
clang/test/Analysis/std-c-library-functions-arg-constraints.c