aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEdwin Vane <edwin.vane@intel.com>2012-12-12 14:30:57 +0000
committerEdwin Vane <edwin.vane@intel.com>2012-12-12 14:30:57 +0000
commit6efdae55ae0034f3b1675bffdc993dc5e38ba2cd (patch)
treee5216eef58385ff1d7d5ce170cecac74cf16302e /test
parentc1d041cf4fa41262031d5b2733827f27199b7e55 (diff)
Initial commit for cpp11-migrate tool
- Added directory structures and build system files for the new tool. - Extremely basic implementation of tool performs only an initial syntax check. - Basic tests ensure syntax test works as expected. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@169983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/cpp11-migrate/syntax_only.cpp7
-rw-r--r--test/cpp11-migrate/syntax_xfail.cpp8
3 files changed, 16 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9c0d1824..be12d199 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -22,7 +22,7 @@ set(CLANG_TOOLS_TEST_DEPS
clang clang-headers FileCheck count not
# Individual tools we test.
- remove-cstr-calls loop-convert
+ remove-cstr-calls loop-convert cpp11-migrate
)
add_lit_testsuite(check-clang-tools "Running the Clang extra tools' regression tests"
diff --git a/test/cpp11-migrate/syntax_only.cpp b/test/cpp11-migrate/syntax_only.cpp
new file mode 100644
index 00000000..eaceb357
--- /dev/null
+++ b/test/cpp11-migrate/syntax_only.cpp
@@ -0,0 +1,7 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
+// RUN: cpp11-migrate %t.cpp --
+// REQUIRES: shell
+
+int main(int argc, char** argv) {
+ return 0;
+}
diff --git a/test/cpp11-migrate/syntax_xfail.cpp b/test/cpp11-migrate/syntax_xfail.cpp
new file mode 100644
index 00000000..0c5c652a
--- /dev/null
+++ b/test/cpp11-migrate/syntax_xfail.cpp
@@ -0,0 +1,8 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
+// RUN: cpp11-migrate %t.cpp --
+// XFAIL: *
+// REQUIRES: shell
+
+int main(int argc, char** argv) {
+i return 0;
+}