2 Commits

Author SHA1 Message Date
Tobias Hieta
b8c2ba138e
[NFC] Fix using-declspec.cpp test with non-C++17 compilers 2023-02-13 16:58:13 +01:00
Tobias Hieta
877859a09b
[clang] Handle __declspec() attributes in using
This patch fixes so that declspec attributes are forwarded
to the alias declaration.

Before this patch this would assert:

class Test { int a; };
using AlignedTest = __declspec(align(16)) const Test;
static_assert(alignof(AlignedTest) == 16, "error");

But afterwards it behaves the same as MSVC does and doesn't
assert.

Fixes: llvm/llvm-project#60513

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D143632
2023-02-13 15:43:08 +01:00