================ @@ -1049,6 +1049,7 @@ Parser::ParseExternalDeclaration(ParsedAttributes &Attrs, case tok::kw_extern: if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) { + ProhibitAttributes(Attrs); ---------------- erichkeane wrote:
>I followed this part of the spec Yep, understood. But `attribute-specifier-seq` is ONLY the `[[...]]` spelling. The REST is implementation defined extensions (that is, `__attribute__((..))` and `__declspec(..)` spellings). That said, I spent some time looking, and both MSVC and GCC compilers seem to get thrown off pretty terribly by `<attribute-tokens> extern template`, so unless @AaronBallman can think of others, I think I'm ok with this. I WOULD like to have our test check `__attribute__` and a `__declspec` variant as well though, so please add a test for those. https://github.com/llvm/llvm-project/pull/136328 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits