[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 14:32:41 PDT 2019


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:314
 insertOptionToCollection(StringRef FullName, T &Collection,
-                         const CheckerRegistry::CmdLineOption &&Option) {
+                         const CheckerRegistry::CmdLineOption &&Option,
+                         AnalyzerOptions &AnOpts) {
----------------
Mmm, const rvalue reference? Is this even a thing?


================
Comment at: lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:331
     insertOptionToCollection(CheckerOptEntry.first, Checkers,
-                             std::move(CheckerOptEntry.second));
+                             std::move(CheckerOptEntry.second), AnOpts);
   }
----------------
Wait, how did you manage to move from a `const &`?

This type doesn't look very move-friendly in general.


================
Comment at: test/Analysis/analyzer-config.c:1
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 %s -o /dev/null -analyzer-checker=core,osx.cocoa,debug.ConfigDumper -analyzer-max-loop 34 > %t 2>&1
 // RUN: FileCheck --input-file=%t %s --match-full-lines
----------------
If i understand correctly, you should be able to simplify this line dramatically.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57922/new/

https://reviews.llvm.org/D57922





More information about the cfe-commits mailing list