[PATCH] D10892: warning when inner condition is identical

Anna Zaks zaks.anna at gmail.com
Wed Aug 5 17:19:06 PDT 2015


zaks.anna added a comment.

Otherwise, LGTM.

Thanks!
Anna.


================
Comment at: lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp:123
@@ +122,3 @@
+          categories::LogicError,
+          "inner condition is identical to previous condition",
+          ELoc);
----------------
"conditions of the inner and outer statements are identical" ?

Ideally, we'd want to highlight both conditions but i am not sure if that is possible.

================
Comment at: test/Analysis/identical-expressions.cpp:1535
@@ +1534,3 @@
+
+///////////////////////////////////////////////////////////////////////////////
+// Identical inner conditions
----------------
What is the purpose of this '//' line?


http://reviews.llvm.org/D10892





More information about the cfe-commits mailing list