================ @@ -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); ---------------- rapidsna wrote:
> That doesn't sound equivalent. The language could also be objective-C or > objective-C++. I think `getLangOpts().CPlusPlus` should set true when it is `Objective-C++`. 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