mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:56:43 +00:00

Don't warn on unknown type attributes in Parser::ProhibitCXX11Attributes for most cases, but left the diagnostic to the later checks. module declaration and module import declaration are special cases. Fixes https://github.com/llvm/llvm-project/issues/54817 Differential Revision: https://reviews.llvm.org/D123447
12 lines
468 B
C++
12 lines
468 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -x c %s
|
|
void foo() {
|
|
int [[attr]] i; // expected-warning {{unknown attribute 'attr' ignored}}
|
|
(void)sizeof(int [[attr]]); // expected-warning {{unknown attribute 'attr' ignored}}
|
|
}
|
|
|
|
void bar() {
|
|
[[attr]]; // expected-warning {{unknown attribute 'attr' ignored}}
|
|
[[attr]] int i; // expected-warning {{unknown attribute 'attr' ignored}}
|
|
}
|