]> granicus.if.org Git - clang/commit
[analyzer][NFC] Fix some incorrect uses of -analyzer-config options
authorKristof Umann <dkszelethus@gmail.com>
Fri, 2 Nov 2018 15:48:10 +0000 (15:48 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Fri, 2 Nov 2018 15:48:10 +0000 (15:48 +0000)
commit73bb3f29cb2fb72daa363ca49b226fd41a789da1
treec7fff727c29bdc8b7ba368d0bbd10e2ece19e1f3
parent0fd5745a9a680848e2ad92793c8dcefbf4a5cf3f
[analyzer][NFC] Fix some incorrect uses of -analyzer-config options

I'm in the process of refactoring AnalyzerOptions. The main motivation behind
here is to emit warnings if an invalid -analyzer-config option is given from
the command line, and be able to list them all.

In this patch, I found some flags that should've been used as checker options,
or have absolutely no mention of in AnalyzerOptions, or are nonexistent.

- NonLocalizedStringChecker now uses its "AggressiveReport" flag as a checker
    option
- lib/StaticAnalyzer/Frontend/ModelInjector.cpp now accesses the "model-path"
    option through a getter in AnalyzerOptions
- -analyzer-config path-diagnostics-alternate=false is not a thing, I removed it,
- lib/StaticAnalyzer/Checkers/AllocationDiagnostics.cpp and
    lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h are weird, they actually
    only contain an option getter. I deleted them, and fixed RetainCountChecker
    to get it's "leak-diagnostics-reference-allocation" option as a checker option,
- "region-store-small-struct-limit" has a proper getter now.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345985 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
lib/StaticAnalyzer/Checkers/AllocationDiagnostics.cpp [deleted file]
lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h [deleted file]
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/RegionStore.cpp
lib/StaticAnalyzer/Frontend/ModelInjector.cpp
test/Analysis/analyzer-config.c
test/Analysis/analyzer-config.cpp
test/Analysis/cstring-plist.c
test/Analysis/localization-aggressive.m