From: Douglas Yung Date: Fri, 24 Feb 2017 01:25:02 +0000 (+0000) Subject: Recently a change was made to this test in r294639 which fails when the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5be5a9eaad6545b4f311b6cd7e6c28571f50fbc7;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296066 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/template-id-expr.cpp b/test/SemaTemplate/template-id-expr.cpp index 65c4e998ac..4e6e22479b 100644 --- a/test/SemaTemplate/template-id-expr.cpp +++ b/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 @@ class E { 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}}