]> granicus.if.org Git - clang/commitdiff
Fix a -Wparentheses warning from GCC that caught a badly formed assert.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 7 Jan 2014 06:52:12 +0000 (06:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 7 Jan 2014 06:52:12 +0000 (06:52 +0000)
I have no idea why Clang's warning doesn't fire here, looks like a Clang
bug. I'll investigate that separately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198677 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenPGO.h

index 43dee8689d484197987285e81f6a60180d7cc723..0a0699067b12b5baddecb12ac71409b9641bf404 100644 (file)
@@ -149,7 +149,7 @@ public:
   /// within the region. The adjusted count, then, is the value of the counter
   /// at the end of the region.
   uint64_t getAdjustedCount() const {
-    assert(Adjust > 0 || (uint64_t)(-Adjust) <= Count && "Negative count");
+    assert((Adjust > 0 || (uint64_t)(-Adjust) <= Count) && "Negative count");
     return Count + Adjust;
   }
   /// Get the value of the counter in this region's parent, ie, the region that