Fix the clang-wpa example.
[clang.git] / test / SemaCXX / alignof-sizeof-reference.cpp
blob761edfc6393a3550be90a18f0b944927114eb073
1 // RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
3 struct s0; // expected-note {{forward declaration}}
4 char ar[sizeof(s0&)]; // expected-error {{invalid application of 'sizeof' to an incomplete type}}
5 void test() {
6 char &r = ar[0];
7 static_assert(alignof(r) == 1, "bad alignment");
8 static_assert(sizeof(r) == 1, "bad size");
11 void f();
12 void f(int);
13 void g() {
14 sizeof(&f); // expected-error{{cannot resolve overloaded function from context}}