| // This test checks that ordering of TUs in the input CDB is preserved in the full output. |
| "command": "clang -fmodules -fmodules-cache-path=DIR/cache -c DIR/tu.c -DONE -o DIR/tu1.o" |
| "command": "clang -fmodules -fmodules-cache-path=DIR/cache -c DIR/tu.c -DTWO -o DIR/tu2.o" |
| // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json |
| // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/result.json |
| // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t %s |
| // CHECK-NEXT: "modules": [], |
| // CHECK-NEXT: "translation-units": [ |
| // CHECK-NEXT: "commands": [ |
| // CHECK-NEXT: "clang-context-hash": "{{.*}}", |
| // CHECK-NEXT: "clang-module-deps": [], |
| // CHECK-NEXT: "command-line": [ |
| // CHECK-NEXT: "[[PREFIX]]/tu.c" |
| // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.c" |
| // CHECK-NEXT: "commands": [ |
| // CHECK-NEXT: "clang-context-hash": "{{.*}}", |
| // CHECK-NEXT: "clang-module-deps": [], |
| // CHECK-NEXT: "command-line": [ |
| // CHECK-NEXT: "[[PREFIX]]/tu.c" |
| // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.c" |