forked from OSchip/llvm-project
[test/Index] Update libclang tests to use libclang for creating PCH files.
This is consistent and tests the primary configuration we want to test, libclang creating and consuming PCH files. llvm-svn: 244066
This commit is contained in:
parent
9ade6a9a74
commit
819f9ffe85
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:{{.*}}:{{.*}}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue