summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-function-2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-function-2.cpp')
-rw-r--r--test/SemaTemplate/instantiate-function-2.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp
index f5089c9..ffdb4c9 100644
--- a/test/SemaTemplate/instantiate-function-2.cpp
+++ b/test/SemaTemplate/instantiate-function-2.cpp
@@ -1,4 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+
template <typename T> struct S {
S() { }
S(T t);
@@ -46,7 +49,10 @@ namespace PR9654 {
namespace AliasTagDef {
template<typename T>
T f() {
- using S = struct { // expected-warning {{C++11}}
+ using S = struct {
+#if __cplusplus <= 199711L
+ // expected-warning@-2 {{alias declarations are a C++11 extension}}
+#endif
T g() {
return T();
}
OpenPOWER on IntegriCloud