[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 1 06:33:39 PDT 2023
================
@@ -451,3 +451,5 @@ namespace P2361 {
// expected-warning {{use of the 'deprecated' attribute is a C++14 extension}}
[[nodiscard("\123")]] int b(); // expected-error{{invalid escape sequence '\123' in an unevaluated string literal}}
}
+
+alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}}
----------------
AaronBallman wrote:
Note to other reviewers, this C++ test exhibits the same behavior on trunk already: https://godbolt.org/z/s5T3hfxsr
https://github.com/llvm/llvm-project/pull/65638
More information about the cfe-commits
mailing list