1 // Differences in -W warning options should result in different canonical module
5 // RUN: split-file %s %t
6 // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
8 // RUN: clang-scan-deps -compilation-database %t/cdb.json -j 1 \
9 // RUN: -format experimental-full > %t/deps.json
10 // RUN: cat %t/deps.json | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t %s
13 // CHECK-NEXT: "modules": [
15 // CHECK: "command-line": [
18 // CHECK: "context-hash": "[[HASH1:.*]]"
19 // CHECK: "name": "Mod"
22 // CHECK: "command-line": [
25 // CHECK: "context-hash": "[[HASH2:.*]]"
26 // CHECK: "name": "Mod"
29 // CHECK-NEXT: "translation-units": [
31 // CHECK: "clang-module-deps": [
33 // CHECK-NEXT: "context-hash": "[[HASH1]]"
34 // CHECK-NEXT: "module-name": "Mod"
37 // CHECK-NEXT: "command-line": [
40 // CHECK: "input-file": "{{.*}}tu1.c"
43 // CHECK: "clang-module-deps": [
45 // CHECK-NEXT: "context-hash": "[[HASH2]]"
46 // CHECK-NEXT: "module-name": "Mod"
49 // CHECK-NEXT: "command-line": [
52 // CHECK: "input-file": "{{.*}}tu2.c"
54 //--- cdb.json.template
58 "command": "clang -Wall -fsyntax-only DIR/tu1.c -fmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache",
63 "command": "clang -fsyntax-only DIR/tu2.c -fmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache",
68 //--- module.modulemap
69 module Mod
{ header
"Mod.h" }