xref: /llvm-project/clang/test/ClangScanDeps/modules-disable-free.c (revision 71e32d5cf0053090aaad62d946fcfd00f1915f26)
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json
4 
5 // RUN: clang-scan-deps -compilation-database %t/compile-commands.json -j 1 -format experimental-full \
6 // RUN:   -mode preprocess-dependency-directives > %t/output
7 // RUN: FileCheck %s < %t/output
8 
9 // CHECK: "-disable-free",
10 
11 //--- compile-commands.json.in
12 
13 [{
14   "directory": "DIR",
15   "command": "clang -c DIR/main.c -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps",
16   "file": "DIR/main.c"
17 }]
18 
19 //--- module.modulemap
20 
21 module A {
22   header "a.h"
23 }
24 
25 //--- a.h
26 
27 void a(void);
28 
29 //--- main.c
30 
31 #include "a.h"
m()32 void m() {
33   a();
34 }
35