[PATCH] D57855: [analyzer] Reimplement checker options

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 08:58:53 PST 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from some minor nits, but you should wait for someone more well-versed in the static analyzer to sign off before committing.



================
Comment at: include/clang/StaticAnalyzer/Frontend/CheckerRegistry.h:164
+    // Used for lower_bound.
+    CheckerInfo(StringRef FullName) : FullName(FullName) {}
   };
----------------
Make this `explicit`?


================
Comment at: lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:371
+    // We can't get away with binaryFind here, as it uses lower_bound.
+    auto CheckerIt = llvm::find(Checkers, CheckerInfo(SuppliedChecker));
+    if (CheckerIt != Checkers.end())
----------------
`llvm::any_of()` instead of `find()`? Same below.


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

https://reviews.llvm.org/D57855





More information about the cfe-commits mailing list