[clang] [Clang][NFC] Fix a warning in TransformNestedRequirement (PR #164148)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 18 20:41:46 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Younan Zhang (zyn0217)
<details>
<summary>Changes</summary>
The logical or expression should be parenthesized.
Fixes https://github.com/llvm/llvm-project/issues/164104
---
Full diff: https://github.com/llvm/llvm-project/pull/164148.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+3-3)
``````````diff
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())
``````````
</details>
https://github.com/llvm/llvm-project/pull/164148
More information about the cfe-commits
mailing list