[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / auto-subst-failure.cpp
blobb323dfc6b04968e07054b3daf0e778bbffeb0fca
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
3 void f() {
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'}}