================ @@ -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); ---------------- delcypher wrote:
> Isn't it? I think getLangOpts().CPlusPlus should set true when it is > Objective-C++. I'm not sure if that's the case but I'll check. But what about "Objective-C"? I didn't want this path taken for that so `!getLangOpts().CPlusPlus` would be true for Objective-C. 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. 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