diff options
Diffstat (limited to 'test/Parser/cxx0x-decl.cpp')
-rw-r--r-- | test/Parser/cxx0x-decl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp index d74b337b31..1da7dd2833 100644 --- a/test/Parser/cxx0x-decl.cpp +++ b/test/Parser/cxx0x-decl.cpp @@ -41,3 +41,11 @@ struct SS { }; using PR14855 = int S::; // expected-error {{expected ';' after alias declaration}} + +// Ensure that 'this' has a const-qualified type in a trailing return type for +// a constexpr function. +struct ConstexprTrailingReturn { + int n; + constexpr auto f() -> decltype((n)); +}; +constexpr const int &ConstexprTrailingReturn::f() const { return n; } |