[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / warn-once-on-unknown-attr.cpp
blob5a7452c40d36717844c6f109f2cd353ebc07797d
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -x c %s
3 void foo() {
4 int [[attr]] i; // expected-warning {{unknown attribute 'attr' ignored}}
5 (void)sizeof(int [[attr]]); // expected-warning {{unknown attribute 'attr' ignored}}
8 void bar() {
9 [[attr]]; // expected-warning {{unknown attribute 'attr' ignored}}
10 [[attr]] int i; // expected-warning {{unknown attribute 'attr' ignored}}