[clang] ef46f8a - [Clang][NFC] Fix a warning in TransformNestedRequirement (#164148)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 18 21:03:43 PDT 2025
Author: Younan Zhang
Date: 2025-10-19T04:03:38Z
New Revision: ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f
URL: https://github.com/llvm/llvm-project/commit/ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f
DIFF: https://github.com/llvm/llvm-project/commit/ef46f8a7d73c1657b2448fc2f3f41ff6eecc4c0f.diff
LOG: [Clang][NFC] Fix a warning in TransformNestedRequirement (#164148)
The logical or expression should be parenthesized.
The issue was brought by #161671
Fixes https://github.com/llvm/llvm-project/issues/164104
Added:
Modified:
clang/lib/Sema/SemaTemplateInstantiate.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index ca7e3b264cec4..038f39633760d 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -2864,9 +2864,9 @@ TemplateInstantiator::TransformNestedRequirement(
TemplateArgs, Constraint->getSourceRange(), Satisfaction,
/*TopLevelConceptId=*/nullptr, &NewConstraint);
- assert(!Success || !Trap.hasErrorOccurred() &&
- "Substitution failures must be handled "
- "by CheckConstraintSatisfaction.");
+ assert((!Success || !Trap.hasErrorOccurred()) &&
+ "Substitution failures must be handled "
+ "by CheckConstraintSatisfaction.");
}
if (!Success || Satisfaction.HasSubstitutionFailure())
More information about the cfe-commits
mailing list