[PATCH] D10892: warning when inner condition is identical

Kim Gräsman kim.grasman at gmail.com
Thu Jul 2 13:38:57 PDT 2015


kimgr added a subscriber: kimgr.
kimgr added a comment.

Added some ideas for tests that might break.


================
Comment at: test/Analysis/identical-expressions.cpp:1543
@@ +1542,3 @@
+  }
+}
+
----------------
How about a negative test here, eg 

  if (++x > 10) {
    if (++x > 10) {
    ... 

Or one with a mod of x between the ifs, and one with an unrelated change between the ifs, eg ++y.


http://reviews.llvm.org/D10892







More information about the cfe-commits mailing list