[llvm] r203671 - Add parens around && clauses in a || to appease the compiler.

Eli Bendersky eliben at google.com
Wed Mar 12 09:14:54 PDT 2014


Author: eliben
Date: Wed Mar 12 11:14:53 2014
New Revision: 203671

URL: http://llvm.org/viewvc/llvm-project?rev=203671&view=rev
Log:
Add parens around && clauses in a || to appease the compiler.

Otherwise gcc 4.8.2 generates a warning.

Modified:
    llvm/trunk/unittests/Transforms/Utils/Cloning.cpp

Modified: llvm/trunk/unittests/Transforms/Utils/Cloning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/Utils/Cloning.cpp?rev=203671&r1=203670&r2=203671&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/Utils/Cloning.cpp (original)
+++ llvm/trunk/unittests/Transforms/Utils/Cloning.cpp Wed Mar 12 11:14:53 2014
@@ -283,8 +283,8 @@ TEST_F(CloneFunc, Subprogram) {
   DISubprogram Sub2(*Iter);
   EXPECT_TRUE(Sub2.Verify());
 
-  EXPECT_TRUE(Sub1.getFunction() == OldFunc && Sub2.getFunction() == NewFunc
-           || Sub1.getFunction() == NewFunc && Sub2.getFunction() == OldFunc);
+  EXPECT_TRUE((Sub1.getFunction() == OldFunc && Sub2.getFunction() == NewFunc)
+           || (Sub1.getFunction() == NewFunc && Sub2.getFunction() == OldFunc));
 }
 
 // Test that the new subprogram entry was not added to the CU which doesn't





More information about the llvm-commits mailing list