Skip to content

Commit

Permalink
[clang] Add invalid check in NormalizedConstraint::fromConstraintExpr. (
Browse files Browse the repository at this point in the history
#86943)

This is an oversight spot in #86869, we should always check the invalid
bit after constructing the `Sema::InstantiatingTemplate` RAII object.
  • Loading branch information
hokein authored Mar 28, 2024
1 parent da5d576 commit 5990278
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/Sema/SemaConcept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,8 @@ NormalizedConstraint::fromConstraintExpr(Sema &S, NamedDecl *D, const Expr *E) {
S, CSE->getExprLoc(),
Sema::InstantiatingTemplate::ConstraintNormalization{}, D,
CSE->getSourceRange());
if (Inst.isInvalid())
return std::nullopt;
// C++ [temp.constr.normal]p1.1
// [...]
// The normal form of an id-expression of the form C<A1, A2, ..., AN>,
Expand Down

0 comments on commit 5990278

Please sign in to comment.