[PATCH] D98741: [analyzer] Introduce common bug category "Unused code".

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 02:00:07 PDT 2021


steakhal accepted this revision.
steakhal added a comment.

`Unused code` seems to be broader and probably a better fit for a generic //bug category//.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:263-264
 
-    BR.EmitBasicReport(AC->getDecl(), Checker, BugType, "Dead store", os.str(),
-                       L, R, Fixits);
+    BR.EmitBasicReport(AC->getDecl(), Checker, BugType, categories::UnusedCode,
+                       os.str(), L, R, Fixits);
   }
----------------
This is the only case where I think it's debatable.
However, I have no better option, and I'm still in favor of your change.


Repository:
  rC Clang

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

https://reviews.llvm.org/D98741



More information about the cfe-commits mailing list