[clang-tools-extra] r177891 - Adding a failing test case for cpp11-migrate's Loop Convert Transform

Edwin Vane edwin.vane at intel.com
Mon Mar 25 12:24:24 PDT 2013


Author: revane
Date: Mon Mar 25 14:24:24 2013
New Revision: 177891

URL: http://llvm.org/viewvc/llvm-project?rev=177891&view=rev
Log:
Adding a failing test case for cpp11-migrate's Loop Convert Transform

Related to PR15589.

Added:
    clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/Inputs/macro_problem.h
    clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/macro_problem.cpp

Added: clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/Inputs/macro_problem.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/Inputs/macro_problem.h?rev=177891&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/Inputs/macro_problem.h (added)
+++ clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/Inputs/macro_problem.h Mon Mar 25 14:24:24 2013
@@ -0,0 +1,7 @@
+#define myns nsblah
+
+namespace nsblah {
+struct MyType {
+};
+
+} // namespace nsblah

Added: clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/macro_problem.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/macro_problem.cpp?rev=177891&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/macro_problem.cpp (added)
+++ clang-tools-extra/trunk/test/cpp11-migrate/LoopConvert/macro_problem.cpp Mon Mar 25 14:24:24 2013
@@ -0,0 +1,22 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
+// RUN: cp %t.cpp %t.base
+// RUN: cpp11-migrate -loop-convert %t.cpp -- -I %S/Inputs
+// RUN: FileCheck -input-file=%t.cpp %s
+//
+// See PR15589 for why this test fails.
+// XFAIL: *
+
+#include "macro_problem.h"
+#include "structures.h"
+
+void side_effect(const myns::MyType &T);
+
+void f() {
+  TypedefDerefContainer<myns::MyType> container;
+  for (TypedefDerefContainer<myns::MyType>::iterator I = container.begin(),
+       E = container.end(); I != E; ++I) {
+    myns::MyType &alias = *I;
+    // CHECK: myns::MyType &ref = *I;
+    side_effect(ref);
+  }
+}





More information about the cfe-commits mailing list