]> granicus.if.org Git - clang/commitdiff
[test/Index] Update libclang tests to use libclang for creating PCH files.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 5 Aug 2015 17:23:59 +0000 (17:23 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 5 Aug 2015 17:23:59 +0000 (17:23 +0000)
This is consistent and tests the primary configuration we want to test, libclang
creating and consuming PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244066 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
test/Index/TestClassForwardDecl.m
test/Index/annotate-comments-objc.m
test/Index/annotate-comments.cpp
test/Index/c-index-api-loadTU-test.m
test/Index/c-index-getCursor-test.m
test/Index/c-index-pch.c
test/Index/c-index-redecls.c
test/Index/cindex-from-source.m
test/Index/comment-custom-block-command.cpp
test/Index/comment-to-html-xml-conversion.cpp
test/Index/complete-pch.m
test/Index/parse-all-comments.c
test/Index/print-mangled-name.cpp

index 284406f6446f8b5e46cda3f0ed85a8a6a7544ffc..5d43dbf96e903c752ab9d7ed91b1272352be2f26 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: c-index-test -write-pch %t.ast -Xclang -triple -Xclang x86_64-apple-darwin10 -fblocks -x objective-c %s
 // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=CHECK-scan %s
 // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=CHECK-load %s
 // REQUIRES: x86-registered-target
index a8eaa0b0388072eaf8c2c8954f09714ad6b627f3..471bc2bcb2176e78fd2ebb72a7f13231cb5834cb 100644 (file)
@@ -69,6 +69,7 @@ typedef struct Struct_notdoxy *typedef_isdoxy1;
 // RUN: %clang_cc1 -emit-pch -o %t/out.pch -F %S/Inputs/Frameworks %s
 // RUN: %clang_cc1 -include-pch %t/out.pch -F %S/Inputs/Frameworks -fsyntax-only %s
 
+// RUN: c-index-test -write-pch %t/out.pch -F %S/Inputs/Frameworks %s
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks > %t/out.c-index-direct
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks -fmodules -fmodules-cache-path=%t/module-cache > %t/out.c-index-modules
 // RUN: c-index-test -test-load-tu %t/out.pch all -F %S/Inputs/Frameworks > %t/out.c-index-pch
index 6612a44792e68a3fbc6927eadc061e596a22ea47..6f9f8f0bbbc9e587fb3c53d5c37a303a7dcecf84 100644 (file)
@@ -263,6 +263,7 @@ void isdoxy54(int);
 // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
 
+// RUN: c-index-test -write-pch %t/out.pch -x c++ -std=c++11 %s
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
 // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
 
index cbd742b240b56563933ccd4f643efd4cf9d58b24..83ef6e831388de46a9ceb862aa676899d6bea28f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-pch -x objective-c %s -o %t.ast
+// RUN: c-index-test -write-pch %t.ast -Xclang -triple -Xclang x86_64-apple-darwin10 -fblocks -x objective-c %s
 // RUN: c-index-test -test-load-tu %t.ast all > %t 2>&1 && FileCheck --input-file=%t %s
 // REQUIRES: x86-registered-target
 @interface Foo 
index f368f1f074337d92e5069a4af40a223a7903ad1a..502d448c614ba75de411f590f0c76fd80e7895ab 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-pch -x objective-c %s -detailed-preprocessing-record -o %t.ast
+// RUN: c-index-test -write-pch %t.ast -Xclang -triple -Xclang x86_64-apple-darwin10 -fblocks -x objective-c %s
 // RUN: c-index-test -test-file-scan %t.ast %s > %t 2>&1 && FileCheck --input-file=%t %s
 @interface Foo 
 {
index 313fae88f4f94fb652755156bd4654f88eaf726c..4a035d7ad8f91ed163a82f893326355ffde07da8 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-pch -x c -o %t.pch %S/Inputs/c-index-pch.h
-// RUN: %clang_cc1 -include-pch %t.pch -x c -emit-pch -o %t.ast %s
+// RUN: c-index-test -write-pch %t.pch -x c %S/Inputs/c-index-pch.h
+// RUN: c-index-test -write-pch %t.ast -Xclang -include-pch -Xclang %t.pch -x c %s
 // RUN: c-index-test -test-load-tu %t.ast all | FileCheck -check-prefix=ALL %s
 // ALL: FunctionDecl=foo
 // ALL: VarDecl=bar
index 0cf2f032a3c7a7dbe638bf6d490640c7017663aa..67e58684e8114adb949f2ff1046b03d323bfb618 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-pch -o %t.ast %s
+// RUN: c-index-test -write-pch %t.ast %s
 // RUN: c-index-test -test-load-tu %t.ast all
 
 // rdar://8956193 - We would blow the thread stack because of nested calls due
index 504d90fd2bc9e981db89726a7080158c1c3e7f3a..5ea8504d673e76b9c158b65f0a21e0da8d8668f6 100644 (file)
@@ -1,5 +1,5 @@
 // REQUIRES: native
-// RUN: %clang -x objective-c-header %S/Inputs/cindex-from-source.h -o %t.pfx.h.gch
+// RUN: c-index-test -write-pch %t.pfx.h.gch -x objective-c-header %S/Inputs/cindex-from-source.h
 // RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t
 // RUN: FileCheck %s < %t
 // CHECK: cindex-from-source.m:{{.*}}:{{.*}}: StructDecl=s0:{{.*}}:{{.*}}
index f87cef96e590234d64215d76087581f378f9a8cf..bb153dc8780428d5614e0b21f1a67523d5230801 100644 (file)
@@ -5,6 +5,7 @@
 // RUN: %clang_cc1 -fcomment-block-commands=CustomCommand -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
 // RUN: %clang_cc1 -x c++ -std=c++11 -fcomment-block-commands=CustomCommand -include-pch %t/out.pch -fsyntax-only %s
 
+// RUN: c-index-test -write-pch %t/out.pch -fcomment-block-commands=CustomCommand -x c++ -std=c++11 %s
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fcomment-block-commands=CustomCommand > %t/out.c-index-direct
 // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
 
index f31061aa12ab1aae6f96f1004e1debe64ae63a5c..d8730761627a51a1ff90f8c99b432c699891d512 100644 (file)
@@ -7,6 +7,7 @@
 // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
 // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
 
+// RUN: c-index-test -write-pch %t/out.pch -x c++ -std=c++11 %s
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
 // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
 
index 4c29f2796b5c7243967ff8c543c6bc352abc90fd..486a0dc53d044ab0e8ba6a01b9d246783cc9f562 100644 (file)
@@ -14,7 +14,7 @@ void msg_id(id x) {
 // REQUIRES: native
 
 // Build the precompiled header
-// RUN: %clang -x objective-c-header -o %t.h.pch %S/Inputs/complete-pch.h
+// RUN: c-index-test -write-pch %t.h.pch -x objective-c-header %S/Inputs/complete-pch.h
 
 // Run the actual tests
 // RUN: c-index-test -code-completion-at=%s:10:7 -include %t.h %s | FileCheck -check-prefix=CHECK-CC1 %s
index 510a0afa638c8ba2442f43fa123bd7a9da439395..66981e2b421bec6e048451bb861805ae56514dc6 100644 (file)
@@ -73,7 +73,7 @@ int trdoxyO;
 // RUN: rm -rf %t
 // RUN: mkdir %t
 
-// RUN: %clang_cc1 -fparse-all-comments -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
+// RUN: c-index-test -write-pch %t/out.pch -fparse-all-comments -x c++ -std=c++11 %s
 
 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fparse-all-comments > %t/out.c-index-direct
 // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
index d4edc5ff392120c6e947bd74f1365f09a42088a7..eb1ea8c57b2a45d59685dad8daa3f9dafc7264a2 100644 (file)
@@ -1,11 +1,11 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-pch %s -o %t_linux.ast
+// RUN: c-index-test -write-pch %t_linux.ast -Xclang -triple -Xclang i686-pc-linux-gnu %s
 // RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s --check-prefix=ITANIUM
 
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-pch %s -o %t_macho.ast
+// RUN: c-index-test -write-pch %t_macho.ast -Xclang -triple -Xclang x86_64-apple-darwin %s
 // RUN: c-index-test -test-print-mangle %t_macho.ast | FileCheck %s --check-prefix=MACHO
 
-// RUN: %clang_cc1 -triple i686-pc-win32 -emit-pch %s -o %t_msft.ast
+// RUN: c-index-test -write-pch %t_msft.ast -Xclang -triple -Xclang i686-pc-win32 %s
 // RUN: c-index-test -test-print-mangle %t_msft.ast | FileCheck %s --check-prefix=MICROSOFT
 
 int foo(int, int);