aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/trailing-return-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/trailing-return-0x.cpp')
-rw-r--r--test/SemaCXX/trailing-return-0x.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/SemaCXX/trailing-return-0x.cpp b/test/SemaCXX/trailing-return-0x.cpp
index f7e3433a76086..cf5e659660eb0 100644
--- a/test/SemaCXX/trailing-return-0x.cpp
+++ b/test/SemaCXX/trailing-return-0x.cpp
@@ -17,7 +17,9 @@ auto f() -> int
return 0;
}
-auto g(); // expected-error{{return without trailing return type}}
+auto g(); // expected-error{{return without trailing return type; deduced return types are a C++1y extension}}
+decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++1y extension}}
+auto badness = g2();
int h() -> int; // expected-error{{trailing return type must specify return type 'auto', not 'int'}}