Skip to content
Unverified Commit 2e791334 authored by Jerin Philip's avatar Jerin Philip Committed by GitHub
Browse files

[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.
parent a0303d89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment