48 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s|DIR|%/t|g" %t/cdb1.json.template > %t/cdb1.json4 5// RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full -mode preprocess-dependency-directives > %t/result1.txt6 7// RUN: FileCheck %s -input-file %t/result1.txt8 9// Verify that secondary actions get stripped, and that there's a single version10// of module A.11 12// CHECK: "modules": [13// CHECK-NEXT: {14// CHECK: "name": "A"15// CHECK: }16// CHECK-NOT: "name": "A"17// CHECK: "translation-units"18 19//--- cdb1.json.template20[21 {22 "directory": "DIR",23 "command": "clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -fsyntax-only DIR/t1.m",24 "file": "DIR/t1.m"25 },26 {27 "directory": "DIR",28 "command": "clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -fsyntax-only DIR/t2.m",29 "file": "DIR/t2.m"30 }31]32 33//--- modules/A/module.modulemap34 35module A {36 umbrella header "A.h"37}38 39//--- modules/A/A.h40 41typedef int A_t;42 43//--- t1.m44@import A;45 46//--- t2.m47@import A;48