diff options
Diffstat (limited to 'test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp')
-rw-r--r-- | test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp index 574a3e7a79341..719aeeddebcc0 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp @@ -1,3 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -auto j() -> enum { e3 }; // expected-error{{unnamed enumeration must be a definition}} expected-error {{requires a specifier or qualifier}} expected-error {{without trailing return type}} +// FIXME: We should catch the case of tag with an incomplete type here (which +// will necessarily be ill-formed as a trailing return type for a function +// definition), and recover with a "type cannot be defined in a trailing return +// type" error. +auto j() -> enum { e3 }; // expected-error{{unnamed enumeration must be a definition}} expected-error {{expected a type}} |