Parse: handle another case of invalid handling for attributes
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 22 Dec 2022 15:46:34 +0000 (15:46 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 5 Jan 2023 20:53:52 +0000 (20:53 +0000)
commit179d24d764ac68220047a8771e1bb06a7cb2a0da
tree449f6624603ad09d0101742daad67fdef186b09d
parent6daa983c9dde7608bcaa20b11e4a7d28fab4e003
Parse: handle another case of invalid handling for attributes

clang would improperly disallow GNU attributes before C++ standard
attributes when a declaration had a linkage specifier.  Handle this
similarly to the previous case of invalid parsing.  We now better match
the parsing rules from GCC.

Differential Revision: https://reviews.llvm.org/D140507
Reviewed By: aaron.ballman
clang/lib/Parse/ParseDeclCXX.cpp
clang/test/Parser/cxx-attributes.cpp