You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
511 B
8 lines
511 B
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
|
|
|
|
auto a() -> int; // ok
|
|
const auto b() -> int; // expected-error {{function with trailing return type must specify return type 'auto', not 'const auto'}}
|
|
auto *c() -> int; // expected-error {{function with trailing return type must specify return type 'auto', not 'auto *'}}
|
|
auto (d() -> int); // expected-error {{trailing return type may not be nested within parentheses}}
|
|
auto e() -> auto (*)() -> auto (*)() -> void; // ok: same as void (*(*e())())();
|