35 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json4 5// RUN: clang-scan-deps -compilation-database %t/compile-commands.json -j 1 -format experimental-full \6// RUN: -mode preprocess-dependency-directives > %t/output7// RUN: FileCheck %s < %t/output8 9// CHECK: "-disable-free",10 11//--- compile-commands.json.in12 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.modulemap20 21module A {22 header "a.h"23}24 25//--- a.h26 27void a(void);28 29//--- main.c30 31#include "a.h"32void m() {33 a();34}35