[PATCH] D29812: Update template-id-expr.cpp test to work when compiler defaults to non-C++03 standard

2017-02-23 Thread Douglas Yung via Phabricator via cfe-commits
dyung closed this revision.
dyung added a comment.

I forgot to add a reference to this in the commit message, so I'm closing this 
manually.

This change was submitted with commit r296066.


https://reviews.llvm.org/D29812



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D29812: Update template-id-expr.cpp test to work when compiler defaults to non-C++03 standard

2017-02-23 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM


https://reviews.llvm.org/D29812



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D29812: Update template-id-expr.cpp test to work when compiler defaults to non-C++03 standard

2017-02-23 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

ping


https://reviews.llvm.org/D29812



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D29812: Update template-id-expr.cpp test to work when compiler defaults to non-C++03 standard

2017-02-09 Thread Douglas Yung via Phabricator via cfe-commits
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