[PATCH] D65182: [analyzer] Add fix-it hint support.

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 15:34:21 PDT 2019


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

I really like that patch, as no human would rewrite 600 `dyn_cast` and `getAs` to `cast` and `castAs`. Thanks you!



================
Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:561
+    CmdLineOption<Boolean,
+                  "ShowFixIts",
+                  "Enable fix-it hints for this checker",
----------------
`Show` -> `Enable`?


================
Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:652
+    CmdLineOption<Boolean,
+                  "ShowFixIts",
+                  "Enable fix-it hints for this checker",
----------------
Same as above.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:308
+//===----------------------------------------------------------------------===//
+// Unsinged analyzer options.
+//===----------------------------------------------------------------------===//
----------------
`Unsinged` -> `Unsigned`


================
Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:103
   void enableWerror() { ShouldEmitAsError = true; }
+  void enableFixitsAsRemarks() { FixitsAsRemarks = true; }
 
----------------
`FixIt` with capital `i`.


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

https://reviews.llvm.org/D65182





More information about the cfe-commits mailing list