[clang] Improve `_Alignas` on a `struct` declaration diagnostic (#65638)
Fixes https://github.com/llvm/llvm-project/issues/58637. Adds `isAlignas()` method on `AttributeCommonInfo` which accounts for C++ `alignas` as well as C11 `_Alignas`. The method is used to improve diagnostic in C when `_Alignas` is used in C at the wrong location. This corrects the previously suggested move of `_Alignas` past the declaration specifier, now warns attribute `_Alignas` is ignored. Based on https://reviews.llvm.org/D141177.
Loading
Please sign in to comment