Skip to content

Commit 6b59c7a

Browse files
committed
fixup! Fix the serialization for invalid constraints
1 parent 2021962 commit 6b59c7a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clang/lib/Serialization/ASTReaderDecl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,11 +2663,8 @@ void ASTDeclReader::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) {
26632663

26642664
D->setDeclaredWithTypename(Record.readInt());
26652665

2666-
bool TypeConstraintInitialized = false;
2667-
if (D->hasTypeConstraint())
2668-
TypeConstraintInitialized = Record.readBool();
2669-
2670-
if (D->hasTypeConstraint() && TypeConstraintInitialized) {
2666+
bool TypeConstraintInitialized = D->hasTypeConstraint() && Record.readBool();
2667+
if (TypeConstraintInitialized) {
26712668
ConceptReference *CR = nullptr;
26722669
if (Record.readBool())
26732670
CR = Record.readConceptReference();

0 commit comments

Comments
 (0)