brintos

brintos / llvm-project-archived public Read only

0
0
Text · 791 B · 4bf5321 Raw
35 lines · c
1// Check that we get the right file dependencies and not the declared paths from2// line directives.3 4// RUN: rm -rf %t5// RUN: split-file %s %t6// RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json7 8// RUN: clang-scan-deps -compilation-database %t/cdb.json \9// RUN:   -mode preprocess-dependency-directives -format experimental-full > %t/deps.json10 11// RUN: cat %t/deps.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t12 13// CHECK:      "file-deps": [14// CHECK-NEXT:   "[[PREFIX]]/tu.c"15// CHECK-NEXT:   "[[PREFIX]]/header.h"16// CHECK-NEXT: ]17 18//--- cdb.json.template19[{20  "file": "DIR/tu.c",21  "directory": "DIR",22  "command": "clang -fsyntax-only DIR/tu.c"23}]24 25//--- other.h26 27//--- other.c28 29//--- header.h30#line 100 "other.h"31 32//--- tu.c33#include "header.h"34#line 100 "other.c"35