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

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 16 11:11:42 PST 2018


Szelethus 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:
> 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.
Hmmm, maybe adding an error handling method to `CheckerManager` would be elegant enough. I'll leave it up to you.


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