[llvm-commits] [llvm] r119454 - /llvm/trunk/include/llvm/ADT/ImmutableSet.h

Dan Gohman gohman at apple.com
Tue Nov 16 18:40:30 PST 2010


Author: djg
Date: Tue Nov 16 20:40:30 2010
New Revision: 119454

URL: http://llvm.org/viewvc/llvm-project?rev=119454&view=rev
Log:
Fix warnings about missing parents between || and &&.

Modified:
    llvm/trunk/include/llvm/ADT/ImmutableSet.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=119454&r1=119453&r2=119454&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Tue Nov 16 20:40:30 2010
@@ -198,16 +198,16 @@
     assert((HL > HR ? HL-HR : HR-HL) <= 2
            && "Balancing invariant violated");
 
-    assert(!getLeft()
-           || ImutInfo::isLess(ImutInfo::KeyOfValue(getLeft()->getValue()),
-                               ImutInfo::KeyOfValue(getValue()))
-           && "Value in left child is not less that current value");
+    assert((!getLeft() ||
+            ImutInfo::isLess(ImutInfo::KeyOfValue(getLeft()->getValue()),
+                             ImutInfo::KeyOfValue(getValue()))) &&
+           "Value in left child is not less that current value");
 
 
-    assert(!getRight()
-           || ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()),
-                               ImutInfo::KeyOfValue(getRight()->getValue()))
-           && "Current value is not less that value of right child");
+    assert(!(getRight() ||
+             ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()),
+                              ImutInfo::KeyOfValue(getRight()->getValue()))) &&
+           "Current value is not less that value of right child");
 
     return getHeight();
   }





More information about the llvm-commits mailing list