llvm-project/clang/test/Parser/cxx0x-decl.cpp
Richard Smith bfdb108fc5 Fix parsing of trailing-return-type. Types are syntactically prohibited from
being defined here: [] () -> struct S {} does not define struct S.

In passing, implement DR1318 (syntactic disambiguation of 'final').

llvm-svn: 152551
2012-03-12 08:56:40 +00:00

19 lines
295 B
C++

// RUN: %clang_cc1 -verify -fsyntax-only -std=c++0x %s
// Make sure we know these are legitimate commas and not typos for ';'.
namespace Commas {
int a,
b [[ ]],
c alignas(double);
}
struct S {};
enum E { e };
auto f() -> struct S {
return S();
}
auto g() -> enum E {
return E();
}