dyung created this revision.
Recently a change was made to this test in r294639 which fails because the
compiler only generates one of the warnings when the compiler is in C++03 or
lower mode.
This change fixes that as well as adds explicit run lines to run the test in
C++03 and C++11 modes.
https://reviews.llvm.org/D29812
Files:
test/SemaTemplate/template-id-expr.cpp
Index: test/SemaTemplate/template-id-expr.cpp
===
--- test/SemaTemplate/template-id-expr.cpp
+++ test/SemaTemplate/template-id-expr.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// PR5336
template
struct isa_impl_cl {
@@ -104,5 +106,8 @@
template<> class D; // expected-error {{cannot specialize a template
template parameter}}
friend class D; // expected-error {{type alias template 'D' cannot be
referenced with a class specifier}}
};
-template using D = int; // expected-note {{declared here}}
expected-warning {{extension}}
+#if __cplusplus <= 199711L
+// expected-warning@+2 {{extension}}
+#endif
+template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
Index: test/SemaTemplate/template-id-expr.cpp
===
--- test/SemaTemplate/template-id-expr.cpp
+++ test/SemaTemplate/template-id-expr.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// PR5336
template
struct isa_impl_cl {
@@ -104,5 +106,8 @@
template<> class D; // expected-error {{cannot specialize a template template parameter}}
friend class D; // expected-error {{type alias template 'D' cannot be referenced with a class specifier}}
};
-template using D = int; // expected-note {{declared here}} expected-warning {{extension}}
+#if __cplusplus <= 199711L
+// expected-warning@+2 {{extension}}
+#endif
+template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits