Re: r296193 - [Test] Make Lit tests C++11 compatible #10

2017-02-25 Thread Kim Gräsman via cfe-commits
Den 25 feb. 2017 7:23 em skrev "Charles Li via cfe-commits" <
cfe-commits@lists.llvm.org>:

Author: lcharles
Date: Fri Feb 24 17:23:53 2017
New Revision: 296193

URL: http://llvm.org/viewvc/llvm-project?rev=296193=rev
Log:
[Test] Make Lit tests C++11 compatible #10

Differential Revision: https://reviews.llvm.org/D21626

Modified:
cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h
cfe/trunk/test/Modules/merge-using-decls.cpp
cfe/trunk/test/SemaCXX/PR9572.cpp
cfe/trunk/test/SemaCXX/default-assignment-operator.cpp
cfe/trunk/test/SemaCXX/default-constructor-initializers.cpp
cfe/trunk/test/SemaCXX/warn-thread-safety-parsing.cpp

Modified: cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
Modules/Inputs/merge-using-decls/b.h?rev=296193=
296192=296193=diff

==
--- cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h (original)
+++ cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h Fri Feb 24 17:23:53
2017
@@ -29,11 +29,13 @@ template struct D : X, T {
   using typename X::t;
 };

+#if __cplusplus <= 199711L // C++11 does not allow access declerations


Typo: declerations, here and throughout.

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


r296193 - [Test] Make Lit tests C++11 compatible #10

2017-02-25 Thread Charles Li via cfe-commits
Author: lcharles
Date: Fri Feb 24 17:23:53 2017
New Revision: 296193

URL: http://llvm.org/viewvc/llvm-project?rev=296193=rev
Log:
[Test] Make Lit tests C++11 compatible #10

Differential Revision: https://reviews.llvm.org/D21626

Modified:
cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h
cfe/trunk/test/Modules/merge-using-decls.cpp
cfe/trunk/test/SemaCXX/PR9572.cpp
cfe/trunk/test/SemaCXX/default-assignment-operator.cpp
cfe/trunk/test/SemaCXX/default-constructor-initializers.cpp
cfe/trunk/test/SemaCXX/warn-thread-safety-parsing.cpp

Modified: cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h?rev=296193=296192=296193=diff
==
--- cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h (original)
+++ cfe/trunk/test/Modules/Inputs/merge-using-decls/b.h Fri Feb 24 17:23:53 2017
@@ -29,11 +29,13 @@ template struct D : X, T {
   using typename X::t;
 };
 
+#if __cplusplus <= 199711L // C++11 does not allow access declerations
 template struct E : X, T {
   // Mismatch in using/access-declaration-ness.
   T::value;
   X::v;
 };
+#endif
 
 template struct F : X, T {
   // Mismatch in nested-name-specifier.
@@ -46,5 +48,9 @@ template struct F : X, T {
 // Force instantiation.
 typedef C::type I;
 typedef D::t I;
+
+#if __cplusplus <= 199711L // C++11 does not allow access declerations
 typedef E::type I;
+#endif
+
 typedef F::type I;

Modified: cfe/trunk/test/Modules/merge-using-decls.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/merge-using-decls.cpp?rev=296193=296192=296193=diff
==
--- cfe/trunk/test/Modules/merge-using-decls.cpp (original)
+++ cfe/trunk/test/Modules/merge-using-decls.cpp Fri Feb 24 17:23:53 2017
@@ -1,6 +1,10 @@
 // RUN: rm -rf %t
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=1
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify -std=c++98 %s -DORDER=1
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify -std=c++11 %s -DORDER=1
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=2
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify -std=c++98 %s -DORDER=2
+// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x 
c++ -I%S/Inputs/merge-using-decls -verify -std=c++11 %s -DORDER=2
 
 #if ORDER == 1
 #include "a.h"
@@ -24,7 +28,11 @@ template int Use() {
 }
 
 template int UseAll() {
+#if __cplusplus <= 199711L // C++11 does not allow access declerations
   return Use() + Use() + Use() + Use(); // 
expected-note 0-2{{instantiation of}}
+#else
+  return Use() + Use() + Use(); // expected-note 
0-2{{instantiation of}}
+#endif
 }
 
 template int UseAll();
@@ -37,8 +45,10 @@ template int UseAll();
 // Here, we're instantiating the definition from 'A' and merging the definition
 // from 'B' into it.
 
+#if __cplusplus <= 199711L // C++11 does not allow access declerations
 // expected-error@b.h:* {{'E::value' from module 'B' is not present in 
definition of 'E' in module 'A'}}
 // expected-error@b.h:* {{'E::v' from module 'B' is not present in definition 
of 'E' in module 'A'}}
+#endif
 
 // expected-error@b.h:* {{'F::type' from module 'B' is not present in 
definition of 'F' in module 'A'}}
 // expected-error@b.h:* {{'F::t' from module 'B' is not present in definition 
of 'F' in module 'A'}}
@@ -55,11 +65,14 @@ template int UseAll();
 // expected-error@b.h:* 2{{'typename' keyword used on a non-type}}
 // expected-error@b.h:* 2{{dependent using declaration resolved to type 
without 'typename'}}
 
+#if __cplusplus <= 199711L // C++11 does not allow access declerations
 // expected-error@a.h:* {{'E::type' from module 'A' is not present in 
definition of 'E' in module 'B'}}
 // expected-error@a.h:* {{'E::t' from module 'A' is not present in definition 
of 'E' in module 'B'}}
 // expected-error@a.h:* {{'E::value' from module 'A' is not present in 
definition of 'E' in module 'B'}}
 // expected-error@a.h:* {{'E::v' from module 'A' is not present in definition 
of 'E' in module 'B'}}
 // expected-note@b.h:* 2{{definition has no member}}
+#endif
+
 
 // expected-error@a.h:* {{'F::type' from module 'A' is not present in 
definition of 'F' in module 'B'}}
 // expected-error@a.h:* {{'F::t' from module 'A' is not present in definition 
of 'F' in module 'B'}}

Modified: cfe/trunk/test/SemaCXX/PR9572.cpp
URL: