2 // RUN: split-file %s %t
4 //--- cdb.json.template
8 "command": "clang -c DIR/tu.c -fmodules -target i386-apple-ios14.0-simulator -fmodules-cache-path=DIR/cache -Wno-error=invalid-ios-deployment-target -o DIR/tu.o",
13 //--- module.modulemap
14 module mod
{ header
"mod.h" }
18 // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
19 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full 2>&1 > %t/result.json
20 // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
22 // Check that the '-Wno-error=invalid-ios-deployment-target' option is being
23 // respected and invalid arguments like '-target i386-apple-ios14.0-simulator'
24 // do not result in an error.
28 // CHECK-NEXT: "modules": [
30 // CHECK-NEXT: "clang-module-deps": [],
31 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/module.modulemap",
32 // CHECK-NEXT: "command-line": [
35 // CHECK-NEXT: "context-hash": "[[HASH_MOD:.*]]",
36 // CHECK-NEXT: "file-deps": [
37 // CHECK-NEXT: "[[PREFIX]]/module.modulemap",
38 // CHECK-NEXT: "[[PREFIX]]/mod.h"
40 // CHECK-NEXT: "link-libraries": [],
41 // CHECK-NEXT: "name": "mod"
44 // CHECK-NEXT: "translation-units": [
46 // CHECK: "clang-context-hash": "[[HASH_TU:.*]],
47 // CHECK-NEXT: "clang-module-deps": [
49 // CHECK-NEXT: "context-hash": "[[HASH_MOD]]",
50 // CHECK-NEXT: "module-name": "mod"
53 // CHECK-NEXT: "command-line": [
54 // CHECK-NOT: "-fimplicit-modules"
55 // CHECK-NOT: "-fimplicit-module-maps"
57 // CHECK: "file-deps": [
58 // CHECK-NEXT: "[[PREFIX]]/tu.c"
60 // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.c"