Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
      2 
      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");
      9 }
     10 
     11 void f();  // expected-note{{possible target for call}}
     12 void f(int);  // expected-note{{possible target for call}}
     13 void g() {
     14   sizeof(&f); // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} \
     15   // expected-warning{{expression result unused}}
     16 }
     17 
     18 template<typename T> void f_template(); // expected-note{{possible target for call}}
     19 template<typename T> void f_template(T*); // expected-note{{possible target for call}}
     20 void rdar9659191() {
     21   (void)alignof(f_template<int>); // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}}
     22 }
     23