[clang][PATCH][NFC] Correct test case related to review D95482
authorMelanie Blower <melanie.blower@intel.com>
Tue, 2 Feb 2021 15:06:25 +0000 (07:06 -0800)
committerMelanie Blower <melanie.blower@intel.com>
Tue, 2 Feb 2021 15:06:43 +0000 (07:06 -0800)
clang/test/SemaCXX/lambda-expressions.cpp
clang/test/SemaCXX/pr48848.cpp [new file with mode: 0644]

index 03bf137..22e0939 100644 (file)
@@ -1,8 +1,6 @@
 // RUN: %clang_cc1 -std=c++14 -Wno-unused-value -fsyntax-only -verify -verify=expected-cxx14 -fblocks %s
 // RUN: %clang_cc1 -std=c++17 -Wno-unused-value -fsyntax-only -verify -fblocks %s
-// RUN: %clang_cc1 -std=c++17 -fblocks -DSHOW_MS -Wno-unused-value -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s
 
-#ifndef SHOW_MS
 namespace std { class type_info; };
 
 namespace ExplicitCapture {
@@ -666,22 +664,3 @@ void Test() {
 
 }
 };
-
-#else
-template <typename RT, typename ET>
-void Decider(const RT &sp, ET &ep) {
-  [=](auto i) { ep[i] = sp[i + j]; };
-    // expected-error@-1 {{use of undeclared identifier 'j'}}
-}
-
-template <typename EMT> void LS() {
-  int *ep;
-  Decider(5, ep);
-}
-
-void runChapter4()
-{
-  LS<int>(); // expected-note {{in instantiation of}}
-}
-
-#endif
diff --git a/clang/test/SemaCXX/pr48848.cpp b/clang/test/SemaCXX/pr48848.cpp
new file mode 100644 (file)
index 0000000..064dbb1
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -std=c++17 -fblocks -DSHOW_MS -Wno-unused-value -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s
+template <typename RT, typename ET>
+void Decider(const RT &sp, ET &ep) {
+  [=](auto i) { ep[i] = sp[i + j]; };
+  // expected-error@-1 {{use of undeclared identifier 'j'}}
+}
+
+template <typename EMT> void LS() {
+  int *ep;
+  Decider(5, ep);
+}
+
+void runChapter4() {
+  LS<int>(); // expected-note {{in instantiation of}}
+}