1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
4 auto a
= f(); // expected-error {{variable has incomplete type 'void'}}
5 auto &b
= f(); // expected-error {{cannot form a reference to 'void'}}
6 auto *c
= f(); // expected-error {{incompatible initializer of type 'void'}}
8 auto d(f()); // expected-error {{variable has incomplete type 'void'}}
9 auto &&e(f()); // expected-error {{cannot form a reference to 'void'}}
10 auto *g(f()); // expected-error {{incompatible initializer of type 'void'}}
12 (void)new auto(f()); // expected-error {{allocation of incomplete type 'void'}}
13 (void)new auto&(f()); // expected-error {{cannot form a reference to 'void'}}
14 (void)new auto*(f()); // expected-error {{incompatible constructor argument of type 'void'}}