[PATCH] [clang-tidy] Static Analyzer checker configuration options passthrough

Alexander Kornienko alexfh at google.com
Wed Mar 11 08:03:13 PDT 2015


================
Comment at: clang-tidy/ClangTidy.cpp:214
@@ +213,3 @@
+      continue;
+    StringRef AnalyzerCheckName = OptName.substr(AnalyzerPrefix.size());
+    AnalyzerOptions->Config[AnalyzerCheckName] = Opt.second;
----------------
It's not a check name now. And I think, you can just remove the variable and use `OptName.substr(...)` as the index.

================
Comment at: test/clang-tidy/static-analyzer-config.cpp:1
@@ +1,2 @@
+// RUN: clang-tidy %s -checks='-*,clang-analyzer-unix.Malloc' -config="{CheckOptions: [{ key: \"clang-analyzer-unix.Malloc:Optimistic\", value: true}]}" -- | FileCheck %s
+typedef __typeof(sizeof(int)) size_t;
----------------
You can use single quotes for the -checks option and double quotes without backslash-escaping for the `key:`.

http://reviews.llvm.org/D8164

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






More information about the cfe-commits mailing list