Skip to content

Commit 5990278

Browse files
authored
[clang] Add invalid check in NormalizedConstraint::fromConstraintExpr. (#86943)
This is an oversight spot in #86869, we should always check the invalid bit after constructing the `Sema::InstantiatingTemplate` RAII object.
1 parent da5d576 commit 5990278

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Sema/SemaConcept.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,8 @@ NormalizedConstraint::fromConstraintExpr(Sema &S, NamedDecl *D, const Expr *E) {
13561356
S, CSE->getExprLoc(),
13571357
Sema::InstantiatingTemplate::ConstraintNormalization{}, D,
13581358
CSE->getSourceRange());
1359+
if (Inst.isInvalid())
1360+
return std::nullopt;
13591361
// C++ [temp.constr.normal]p1.1
13601362
// [...]
13611363
// The normal form of an id-expression of the form C<A1, A2, ..., AN>,

0 commit comments

Comments
 (0)