r296066 - Recently a change was made to this test in r294639 which fails when the
Douglas Yung via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 23 17:25:02 PST 2017
Author: dyung
Date: Thu Feb 23 19:25:02 2017
New Revision: 296066
URL: http://llvm.org/viewvc/llvm-project?rev=296066&view=rev
Log:
Recently a change was made to this test in r294639 which fails when the
compiler is run in a mode where the default C++ standard is newer than C++03.
The reason is because one of the warnings checked is only produced when the
compiler is using C++03 or lower.
This change fixes this problem as well as adds explicit run lines to run the
test in C++03 and C++11 modes.
Modified:
cfe/trunk/test/SemaTemplate/template-id-expr.cpp
Modified: cfe/trunk/test/SemaTemplate/template-id-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/template-id-expr.cpp?rev=296066&r1=296065&r2=296066&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/template-id-expr.cpp (original)
+++ cfe/trunk/test/SemaTemplate/template-id-expr.cpp Thu Feb 23 19:25:02 2017
@@ -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<typename FromCl>
struct isa_impl_cl {
@@ -104,5 +106,8 @@ class E {
template<> class D<C>; // expected-error {{cannot specialize a template template parameter}}
friend class D<C>; // expected-error {{type alias template 'D' cannot be referenced with a class specifier}}
};
-template<typename T> using D = int; // expected-note {{declared here}} expected-warning {{extension}}
+#if __cplusplus <= 199711L
+// expected-warning at +2 {{extension}}
+#endif
+template<typename T> using D = int; // expected-note {{declared here}}
E<D> ed; // expected-note {{instantiation of}}
More information about the cfe-commits
mailing list