================ @@ -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:
> However, I think I'll remove this assert for now because I intend (provided > I can make it to work with our internal code) to remove this code entirely in > favor of re-using the late parsing code that's used for C++ Ah so that's the same thing I suggested then. I thought you meant to just remove the assert. Overall I think this is a good idea 👍 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