Clang was rejecting valid code where GNU style attributes preceded C++ style attributes in template declarations as follows:
template<int a> __attribute__((deprecated("oh no!"))) [[deprecated("oh no!")]] void foo();
This PR fixes the bug.
Paths
| Differential D151837
[Clang][Parser] Accept GNU attributes preceding C++ style attributes on templates ClosedPublic Authored by eandrews on May 31 2023, 1:42 PM.
Details Summary Clang was rejecting valid code where GNU style attributes preceded C++ style attributes in template declarations as follows: template<int a> __attribute__((deprecated("oh no!"))) [[deprecated("oh no!")]] void foo(); This PR fixes the bug.
Diff Detail Event TimelineComment Actions Could you add a test case for the inverted order of attributes on a template as well? I don't think that there is a test case for that. This revision is now accepted and ready to land.May 31 2023, 7:26 PM
Closed by commit rGcecd8471e499: [Clang][Parser] Accept GNU attributes preceding C++ attributes on templates (authored by eandrews). · Explain WhyJun 2 2023, 8:11 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 527188 clang/lib/Parse/ParseTemplate.cpp
clang/test/Parser/attr-order.cpp
|