[PATCH] [Analyzer] Individual options for checkers #2

Anna Zaks zaks.anna at gmail.com
Thu Feb 26 13:50:52 PST 2015


I'd also have "Optimistic" be an option of malloc checker, not unix package since there are no other optimistic/pessimistic checkers in unix. The only reason to do that would be testing, but maybe we could test in other ways.

Also, It would be good to have this extra checking, but can come as port of a later commit:
"
To avoid ambiguities with regular options, we should enforce the following:

1. <Option Name> should be an identifier
2. Checker names should be identifiers.
3. Package names should be identifiers joined with '.’.
4. <Full Checker Name> has the same form as package names.

"

Thank you!
Anna.


================
Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:191
@@ -179,1 +190,3 @@
+  };
+
 private:
----------------
We were trying to stay away from inheritance of options not to imply that the checkers will automatically inherit options. See the discussion on the proposal thread:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039576.html

================
Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:291
@@ +290,3 @@
+                             StringRef Default,
+                             OptionKind Kind = OptionKind::Global);
+
----------------
I'd simplify this and have it take a book instead of the Kind.

http://reviews.llvm.org/D7905

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list