1762bb9d0ad20320b9f97a841dce57ba5e8e48b07Richard Smith// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2e7397c6a1bb2b205c5fe678e26199eb26d22e38eRichard Smith
3a971d2410fabb093954c4119d2287ac24208ea8dRichard Smith// FIXME: We should catch the case of tag with an incomplete type here (which
4a971d2410fabb093954c4119d2287ac24208ea8dRichard Smith// will necessarily be ill-formed as a trailing return type for a function
5a971d2410fabb093954c4119d2287ac24208ea8dRichard Smith// definition), and recover with a "type cannot be defined in a trailing return
6a971d2410fabb093954c4119d2287ac24208ea8dRichard Smith// type" error.
754655be65585ed6618fdd7a19fa6c70efc321d3aRichard Smithauto j() -> enum { e3 }; // expected-error{{unnamed enumeration must be a definition}} expected-error {{expected a type}}
8