[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / ClangScanDeps / modules-full-by-mod-name.c
blob054ff5494753ceb5b51295a9cac4ff847bb87388
1 // UNSUPPORTED: target=powerpc64-ibm-aix{{.*}}
3 // RUN: rm -rf %t
4 // RUN: split-file %s %t
6 //--- module.modulemap
7 module root { header "root.h" }
8 module direct { header "direct.h" }
9 module transitive { header "transitive.h" }
10 //--- root.h
11 #include "direct.h"
12 #include "root/textual.h"
13 //--- direct.h
14 #include "transitive.h"
15 //--- transitive.h
16 // empty
18 //--- root/textual.h
19 // This is here to verify that the "root" directory doesn't clash with name of
20 // the "root" module.
22 //--- cdb.json.template
24 "file": "",
25 "directory": "DIR",
26 "command": "clang -fmodules -fmodules-cache-path=DIR/cache -I DIR -x c"
29 // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
30 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full -module-name=root > %t/result.json
31 // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t %s
33 // CHECK: {
34 // CHECK-NEXT: "modules": [
35 // CHECK-NEXT: {
36 // CHECK-NEXT: "clang-module-deps": [
37 // CHECK-NEXT: {
38 // CHECK-NEXT: "context-hash": "{{.*}}",
39 // CHECK-NEXT: "module-name": "transitive"
40 // CHECK-NEXT: }
41 // CHECK-NEXT: ],
42 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/module.modulemap",
43 // CHECK-NEXT: "command-line": [
44 // CHECK: ],
45 // CHECK-NEXT: "context-hash": "{{.*}}",
46 // CHECK-NEXT: "file-deps": [
47 // CHECK-NEXT: "[[PREFIX]]/direct.h"
48 // CHECK-NEXT: "[[PREFIX]]/module.modulemap"
49 // CHECK-NEXT: ],
50 // CHECK-NEXT: "name": "direct"
51 // CHECK-NEXT: },
52 // CHECK-NEXT: {
53 // CHECK-NEXT: "clang-module-deps": [
54 // CHECK-NEXT: {
55 // CHECK-NEXT: "context-hash": "{{.*}}",
56 // CHECK-NEXT: "module-name": "direct"
57 // CHECK-NEXT: }
58 // CHECK-NEXT: ],
59 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/module.modulemap",
60 // CHECK-NEXT: "command-line": [
61 // CHECK: ],
62 // CHECK-NEXT: "context-hash": "{{.*}}",
63 // CHECK-NEXT: "file-deps": [
64 // CHECK-NEXT: "[[PREFIX]]/module.modulemap"
65 // CHECK-NEXT: "[[PREFIX]]/root.h"
66 // CHECK-NEXT: "[[PREFIX]]/root/textual.h"
67 // CHECK-NEXT: ],
68 // CHECK-NEXT: "name": "root"
69 // CHECK-NEXT: },
70 // CHECK-NEXT: {
71 // CHECK-NEXT: "clang-module-deps": [],
72 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/module.modulemap",
73 // CHECK-NEXT: "command-line": [
74 // CHECK: ],
75 // CHECK-NEXT: "context-hash": "{{.*}}",
76 // CHECK-NEXT: "file-deps": [
77 // CHECK-NEXT: "[[PREFIX]]/module.modulemap"
78 // CHECK-NEXT: "[[PREFIX]]/transitive.h"
79 // CHECK-NEXT: ],
80 // CHECK-NEXT: "name": "transitive"
81 // CHECK-NEXT: }
82 // CHECK-NEXT: ],
83 // CHECK-NEXT: "translation-units": []
84 // CHECK-NEXT: }