[analyzer] Make NonNullParamChecker as dependency for StdCLibraryFunctionsChecker
authorGabor Marton <gabor.marton@ericsson.com>
Tue, 5 May 2020 14:37:10 +0000 (16:37 +0200)
committerGabor Marton <gabor.marton@ericsson.com>
Thu, 14 May 2020 13:28:40 +0000 (15:28 +0200)
commitd061685a8304eb0b6adacd24f8dd2c2ef6dfee39
tree0c7a34dd5d5d1aad332026b0733945304bb8e53e
parent7b8e3065606cb555e7528e3b59d5e164ecf008fa
[analyzer] Make NonNullParamChecker as dependency for StdCLibraryFunctionsChecker

Summary:
If a given parameter in a FunctionDecl has a nonull attribute then the NonNull
constraint in StdCLibraryFunctionsChecker has the same effect as
NonNullParamChecker. I think it is better to emit diagnostics from the simpler
checker. By making NonNullParamChecker as a dependency, in these cases it will
be the first to emit a diagnostic and to stop the analysis on that path.

Reviewers: Szelethus, NoQ, baloghadamsoftware, balazske, steakhal

Subscribers: whisperity, xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79420
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/test/Analysis/analyzer-enabled-checkers.c