[PATCH] D75844: [clang] Set begin loc on GNU attribute parsed attrs

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 2 10:49:16 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/test/Parser/cxx0x-attributes.cpp:377
+  template <class _Tp, class _Alloc> friend class[[]] vector2;                                         // expected-error {{an attribute list cannot appear here}}
+  template <class _Tp, class _Alloc> friend class [[clang::__type_visibility__(("default"))]] vector3; // expected-error {{an attribute list cannot appear here}}
+
----------------
Can you also add a test for `__declspec` attributes, like `template <class _Tp, class _Alloc> friend class __declspec(code_seg("whatever")) vector4;`? That is accepted by MSVC: https://godbolt.org/z/b8Gc3Y4Tr


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75844/new/

https://reviews.llvm.org/D75844



More information about the cfe-commits mailing list