================ @@ -4944,6 +4944,26 @@ void Parser::ParseStructDeclaration( } } +// TODO: All callers of this function should be moved to +// `Parser::ParseLexedAttributeList`. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope, + ParsedAttributes *OutAttrs) { + assert(LAs.parseSoon() && + "Attribute list should be marked for immediate parsing."); +#ifndef NDEBUG + auto LangStd = getLangOpts().LangStd; + if (LangStd != LangStandard::lang_unspecified) { + auto Lang = LangStandard::getLangStandardForKind(LangStd).getLanguage(); + assert(Lang == Language::C || Lang == Language::OpenCL); ---------------- hnrklssn wrote:
> In general I think the approach of thinking that this function should be for > C only is actually flawed and I'm going to look into removing this entirely > after landing this. At that point, why not just call `ParseLexedAttributeList` and add a non-C++ case to `ParseLexedAttribute` instead of creating separate C versions that seem to serve basically the same purpose? https://github.com/llvm/llvm-project/pull/93121 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits