[all-commits] [llvm/llvm-project] 2e7913: [clang] Improve `_Alignas` on a `struct` declarati...
Jerin Philip via All-commits
all-commits at lists.llvm.org
Tue Nov 7 05:27:57 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e7913342eb9d5cd1744d4c24e1898588429b80d
https://github.com/llvm/llvm-project/commit/2e7913342eb9d5cd1744d4c24e1898588429b80d
Author: Jerin Philip <jerinphilip at live.in>
Date: 2023-11-07 (Tue, 07 Nov 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/AttributeCommonInfo.h
M clang/lib/Sema/SemaDecl.cpp
M clang/test/C/drs/dr4xx.c
M clang/test/Parser/c1x-alignas.c
A clang/test/Parser/c2x-alignas.c
M clang/test/Parser/cxx0x-attributes.cpp
Log Message:
-----------
[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.
More information about the All-commits
mailing list