[clang][parser] Allow GNU-style attributes in explicit template...
authorTimm Bäder <tbaeder@redhat.com>
Wed, 3 Mar 2021 09:45:07 +0000 (10:45 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Wed, 31 Mar 2021 14:44:19 +0000 (16:44 +0200)
commit5018e15fdfda855f130cdb78acb88540046853af
tree45c71bd304ee3c14e1529bf74b7c00f6172984b6
parent3bdd674fbf767d719dc67e10bc079cb183dd3a3f
[clang][parser] Allow GNU-style attributes in explicit template...

... instantiations

They are currently not being diagnosed because ProhibitAttributes() does
not handle attribute lists with an invalid source range. But once it
does, we need to allow GNU attributes in this place.

Additionally, start optionally diagnosing empty attr lists in
ProhibitCXX11Attributes(), since ProhibitAttribute() does it.

Differential Revision: https://reviews.llvm.org/D97362
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/Parser/cxx0x-attributes.cpp