aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/warn-once-on-unknown-attr.cpp
blob: 5a7452c40d36717844c6f109f2cd353ebc07797d (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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}}
}