thakis added a comment.

Seems like a nice idea to me, thanks!

Do you have any numbers on how often this fires in practice, and what the true 
positive rate is? (Build some large-ish open source  project with this, and see 
what it finds.)
Did you verify that this has negligible compile time impact for building a 
large-ish project?

With that, looks good.



================
Comment at: clang/lib/Analysis/CFG.cpp:1096
+        if (Negate->getOpcode() == UO_LNot &&
+            Expr::isSameComparisonOperand(Negate->getSubExpr(), E2)) {
+          bool AlwaysTrue = B->getOpcode() == BO_LOr;
----------------
Do you want to IgnoreParens() on the ! subexpr too?


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

https://reviews.llvm.org/D152093

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to