================ @@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attributes(DeclAttrs); - ParsedAttributes EmptyDeclSpecAttrs(AttrFactory); - ParseExternalDeclaration(DeclAttrs, EmptyDeclSpecAttrs); + ParsedAttributes DeclSpecAttrs(AttrFactory); + while (MaybeParseCXX11Attributes(DeclAttrs) || + MaybeParseGNUAttributes(DeclSpecAttrs)) + ; ---------------- Mathys-Gasnier wrote:
If we factor out `ParseExternalDeclaration` in a function that also parses the attributes, factoring out attributes parsing is probably not as usefull right ? Since it's quite a lot of changes, should I do it in two commits ? One fixing the bug and adding missing attribute parsing, and the other factoring everything into a `ParseExternalDeclarationWithAttrs` and replacing all uses that fit the need. https://github.com/llvm/llvm-project/pull/117148 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits