[clang] fd47894 - [NFC] Add parentheses around && within || to avoid warning

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 26 23:44:33 PDT 2022


Author: Chuanqi Xu
Date: 2022-06-27T14:44:10+08:00
New Revision: fd47894d88faf9147bcdb99cb5cae33519e418dd

URL: https://github.com/llvm/llvm-project/commit/fd47894d88faf9147bcdb99cb5cae33519e418dd
DIFF: https://github.com/llvm/llvm-project/commit/fd47894d88faf9147bcdb99cb5cae33519e418dd.diff

LOG: [NFC] Add parentheses around && within || to avoid warning

Added: 
    

Modified: 
    clang/lib/Sema/SemaTemplateInstantiate.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 0187cb3d12dd8..f09b3473c0749 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -2040,7 +2040,7 @@ TemplateInstantiator::TransformNestedRequirement(
       bool CheckSucceeded =
           SemaRef.CheckConstraintExpression(TransConstraint.get());
       (void)CheckSucceeded;
-      assert(CheckSucceeded || Trap.hasErrorOccurred() &&
+      assert((CheckSucceeded || Trap.hasErrorOccurred()) &&
                                    "CheckConstraintExpression failed, but "
                                    "did not produce a SFINAE error");
     }
@@ -2051,7 +2051,7 @@ TemplateInstantiator::TransformNestedRequirement(
       bool CheckFailed = SemaRef.CheckConstraintSatisfaction(
           TransConstraint.get(), Satisfaction);
       (void)CheckFailed;
-      assert(!CheckFailed || Trap.hasErrorOccurred() &&
+      assert((!CheckFailed || Trap.hasErrorOccurred()) &&
                                  "CheckConstraintSatisfaction failed, "
                                  "but did not produce a SFINAE error");
     }


        


More information about the cfe-commits mailing list