================ @@ -1779,6 +1779,42 @@ void Parser::checkPotentialAngleBracket(ExprResult &PotentialTemplateName) { Priority); } +bool Parser::isMissingTemplateKeywordBeforeScope(bool AnnotateInvalid) { + assert(Tok.is(tok::coloncolon)); + Sema::DisableTypoCorrectionRAII DTC(Actions); + ColonProtectionRAIIObject ColonProtection(*this); + + SourceLocation StartLoc = Tok.getLocation(); + if (TryAnnotateTypeOrScopeToken()) + return true; + if (Tok.isSimpleTypeSpecifier(getLangOpts())) + return false; + CXXScopeSpec SS; + ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr, + /*ObjectHasErrors=*/false, + /*EnteringContext=*/false); + ExprResult Result = tryParseCXXIdExpression(SS, /*isAddressOfOperand=*/false); ---------------- sdkrystian wrote:
@zygoloid Do you otherwise think that it's reasonable to apply this change to _all_ C++ language modes (given the existence of [this thread](https://lists.isocpp.org/core/2024/07/16028.php) on the core reflector resulting from the initial application of this patch _without_ the enhanced identification of missing `template`)? https://github.com/llvm/llvm-project/pull/100425 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits