llvm-for-llvmta/tools/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8-0x.cpp

7 lines
312 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
auto f() -> int[32]; // expected-error{{function cannot return array}}
auto g() -> int(int); // expected-error{{function cannot return function}}
auto h() -> auto() -> int; // expected-error{{function cannot return function}}
auto i() -> auto(*)() -> int;