[PATCH] [Proposal] [Analyzer] Individual options for checkers

Ted Kremenek kremenek at apple.com
Tue Aug 19 14:52:52 PDT 2014

Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:251
@@ -247,1 +250,3 @@
+  StringRef getCheckerOption(const StringRef &CheckerName,
+                             const StringRef &OptionName,
Please add a doxygen comment for this method.

It's not clear if 'CheckerName' needs to be completely "qualified" with the package name.

Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:104-105
@@ +103,4 @@
+StringRef AnalyzerOptions::getCheckerOption(const StringRef &CheckerName,
+                                            const StringRef &OptionName,
+                                            const StringRef &Default) const {
+  std::string Name = CheckerName;
Is there a reason to use StringRef&?  Why not just use StringRef?  This makes it look like we need to modify the StringRef value itself.  StringRef is a very lightweight value that we can pass around.  There's no need to use '&' or 'const'.


More information about the cfe-commits mailing list