================
@@ -1049,6 +1049,7 @@ Parser::ParseExternalDeclaration(ParsedAttributes &Attrs,
 
   case tok::kw_extern:
     if (getLangOpts().CPlusPlus && NextToken().is(tok::kw_template)) {
+      ProhibitAttributes(Attrs);
----------------
a-tarasyuk wrote:

@erichkeane, thanks for the feedback. I followed this part of the spec

> No 
> [attribute-specifier-seq](https://eel.is/c++draft/dcl.attr.grammar#nt:attribute-specifier-seq)
>  ([[dcl.attr.grammar]](https://eel.is/c++draft/dcl.attr.grammar)) shall 
> appertain to an [explicit 
> instantiation](https://eel.is/c++draft/temp.explicit#3.sentence-3).

I also checked how GCC handles this case, and it seems that it disallows all 
kinds of attrs.

Should non-standard attributes be applied to this `S<int>` (_if we are talking 
about the current test case_) declaration?



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

Reply via email to