[PATCH] D75171: [Analyzer] Fix for incorrect use of container and iterator checkers

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 07:55:19 PST 2020


whisperity added a comment.

Do you have access to the `Driver` somehow? Instead of a `cerr` (-ish) output, something that is formatted like a "true" error diagnostic (or warning), such as `"no such file or directory"` would be much better, I fear this `[ERROR]` will simply be flooded away with the usual diagnostic output on screen, especially if multiple files are concerned.

Are you trying to land this before `10.0` goes out? In this case, it could be okay, but for the long term, this seems a very crude solution.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:1037-1038
+    llvm::errs() << "[ERROR] Checker " << mgr.getCurrentCheckerName().getName()
+                 << " cannot be enabled without analyzer option aggressive-"
+                    "binary-operation-simplification.\n";
+    return false;
----------------
In Clang diagnostics, "identifiers" are put between apostrophes:

    'aggressive-binary-operation-simplification'


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75171





More information about the cfe-commits mailing list