]> granicus.if.org Git - clang/commitdiff
Add parentheses to silence warnings.
authorBill Wendling <isanbard@gmail.com>
Mon, 8 Jul 2019 22:01:07 +0000 (22:01 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 8 Jul 2019 22:01:07 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365395 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/Syntax/BuildTree.cpp

index 3c259a08bd79c49cd3866b5cc6e0c1323bbd7827..dc682ff677fe9f33c33dc8b339903bb82e01d766 100644 (file)
@@ -110,9 +110,9 @@ private:
       auto It = Trees.lower_bound(Range.begin());
       assert(It != Trees.end() && "no node found");
       assert(It->first == Range.begin() && "no child with the specified range");
-      assert(std::next(It) == Trees.end() ||
-             std::next(It)->first == Range.end() &&
-                 "no child with the specified range");
+      assert((std::next(It) == Trees.end() ||
+              std::next(It)->first == Range.end()) &&
+             "no child with the specified range");
       It->second.Role = Role;
     }
 
@@ -129,9 +129,9 @@ private:
              BeginChildren->first == FirstToken &&
              "fold crosses boundaries of existing subtrees");
       auto EndChildren = Trees.lower_bound(NodeTokens.end());
-      assert(EndChildren == Trees.end() ||
-             EndChildren->first == NodeTokens.end() &&
-                 "fold crosses boundaries of existing subtrees");
+      assert((EndChildren == Trees.end() ||
+              EndChildren->first == NodeTokens.end()) &&
+             "fold crosses boundaries of existing subtrees");
 
       // (!) we need to go in reverse order, because we can only prepend.
       for (auto It = EndChildren; It != BeginChildren; --It)