Commit de51559f authored by Saar Raz's avatar Saar Raz
Browse files

[Concepts] Fix incorrect recovery in TryAnnotateTypeConstraint

TryAnnotateTypeConstraint would not put the scope specifier back into the token stream when faced
with a non-concept name after a scope specifier.
parent 3a906a9f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -712,8 +712,11 @@ bool Parser::TryAnnotateTypeConstraint() {
                                      MemberOfUnknownSpecialization);
    assert(!MemberOfUnknownSpecialization
           && "Member when we only allowed namespace scope qualifiers??");
    if (!PossibleConcept || TNK != TNK_Concept_template)
    if (!PossibleConcept || TNK != TNK_Concept_template) {
      if (SS.isNotEmpty())
        AnnotateScopeToken(SS, !WasScopeAnnotation);
      return false;
    }

    // At this point we're sure we're dealing with a constrained parameter. It
    // may or may not have a template parameter list following the concept