[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 15 06:24:39 PDT 2018


Szelethus added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:128-135
+/// Describes the kinds for high-level analyzer mode.
+enum UserModeKind {
+  /// Perform shallow but fast analyzes.
+  UMK_Shallow = 1,
+
+  /// Perform deep analyzes.
+  UMK_Deep = 2
----------------
Do we actually //ever// use `UMK_SHALLOW`? If not, the whole .def file can be simplified, because the use of `getDefaultValForUserMode(/* ShallowVal */, /* DeepVal */)` is clunky. If we do, I'd also be fine with rewriting the function generating macro from 
```
#define ANALYZER_OPTION_WITH_FN(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL, \
                                CREATE_FN)
```
to
```

#define ANALYZER_OPTION_WITH_FN(TYPE, NAME, CMDFLAG, DESC, SHALLOW_VAL, \
                                DEEP_VAL, CREATE_FN)
```
because that'd be nicer than the current solution.


https://reviews.llvm.org/D53277





More information about the cfe-commits mailing list