Skip to content

Incorrect mention of 'alignof' in a diagnostic about 'alignas' #55175

@int6

Description

@int6
% cat main.cpp
class alignas(void) Bar {};test ../build/debug/bin/clang++ -std=c++11 ./alignas.cpp
./alignas.cpp:1:15: error: invalid application of 'alignof' to an incomplete type 'void'
class alignas(void) A {};
             ~^~~~~
1 error generated.

Should 'alignof' in the first diagnostic message be replaced with 'alignas'? Although alignas equivalent to alignas(alignof(type)).

Metadata

Metadata

Assignees

Labels

clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions