xref: /aosp_15_r20/external/clang/test/CodeCompletion/pch-and-module.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li#import "import_moduleA.h"
2*67e74705SXin Listatic const int FROM_IMPL = 2;
3*67e74705SXin Li
4*67e74705SXin Livoid test0(void) {
5*67e74705SXin Li  int x =
6*67e74705SXin Li}
7*67e74705SXin Li// The lines above this point are sensitive to line/column changes.
8*67e74705SXin Li
9*67e74705SXin Li// ===--- None
10*67e74705SXin Li// RUN: c-index-test -code-completion-at=%s:5:11 %s -I %S/Inputs | FileCheck %s
11*67e74705SXin Li
12*67e74705SXin Li// ===--- Modules
13*67e74705SXin Li// RUN: rm -rf %t && mkdir %t
14*67e74705SXin Li// RUN: c-index-test -code-completion-at=%s:5:11 %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/mcp | FileCheck %s
15*67e74705SXin Li
16*67e74705SXin Li// ===--- PCH
17*67e74705SXin Li// RUN: rm -rf %t && mkdir %t
18*67e74705SXin Li// RUN: c-index-test -write-pch %t/import_moduleA.pch -x objective-c-header %S/Inputs/import_moduleA.h -I %S/Inputs
19*67e74705SXin Li// RUN: c-index-test -code-completion-at=%s:5:11 %s -include-pch %t/import_moduleA.pch -I %S/Inputs | FileCheck %s
20*67e74705SXin Li
21*67e74705SXin Li// ===--- PCH + Modules
22*67e74705SXin Li// RUN: rm -rf %t && mkdir %t
23*67e74705SXin Li// RUN: c-index-test -write-pch %t/import_moduleA.pch -x objective-c-header %S/Inputs/import_moduleA.h -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs
24*67e74705SXin Li// RUN: c-index-test -code-completion-at=%s:5:11 %s -include-pch %t/import_moduleA.pch -I %S/Inputs -fmodules -fmodules-cache-path=%t/mcp | FileCheck %s
25*67e74705SXin Li
26*67e74705SXin Li// ===--- Preamble
27*67e74705SXin Li// RUN: rm -rf %t && mkdir %t
28*67e74705SXin Li// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:5:11 %s -I %S/Inputs | FileCheck %s
29*67e74705SXin Li
30*67e74705SXin Li// ===--- Preamble + Modules
31*67e74705SXin Li// RUN: rm -rf %t
32*67e74705SXin Li// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:5:11 %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/mcp | FileCheck %s
33*67e74705SXin Li
34*67e74705SXin Li
35*67e74705SXin Li// CHECK: FROM_HEADER
36*67e74705SXin Li// CHECK: FROM_IMPL
37*67e74705SXin Li// CHECK: FROM_MODULE_A
38