[PATCH] D55730: [analyzer] MoveChecker Pt.9: Add a "peaceful" mode in which it finds only 100% authentic bugs.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 16 10:09:38 PST 2018


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:188-195
+  void setAggressiveness(StringRef Str) {
+    Aggressiveness =
+        llvm::StringSwitch<AggressivenessKind>(Str)
+            .Case("KnownsOnly", AK_KnownsOnly)
+            .Case("KnownsAndLocals", AK_KnownsAndLocals)
+            .Case("All", AK_All)
+            .Default(AK_KnownsAndLocals); // A sane default.
----------------
NoQ wrote:
> Szelethus wrote:
> > You can acquire a `DiagnosticsEngine` through `ASTContext`, which can be acquired from `CheckerManager`. I think it'd prefer to see an error if I messed up the input.
> Hmm. I should probably also honor the compatibility mode then.
And think if i want to bail out entirely.

Maybe next time? Let's figure out how exactly do we want these errors to look and behave before introducing restrictions.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55730





More information about the cfe-commits mailing list