brintos

brintos / llvm-project-archived public Read only

0
0
Text · 759 B · 03f2be7 Raw
39 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json4 5// RUN: clang-scan-deps -compilation-database %t/cdb.json -format make -j 1 > %t/result.txt6// RUN: FileCheck %s -input-file=%t/result.txt7 8// CHECK: {{/|\\}}dir1{{/|\\}}t1.c9// CHECK: {{/|\\}}dir1{{/|\\}}head.h10// CHECK: {{/|\\}}dir2{{/|\\}}t2.c11// CHECK: {{/|\\}}dir2{{/|\\}}head.h12 13//--- cdb.json.template14[15  {16    "directory": "DIR/dir1",17    "command": "clang -fsyntax-only t1.c",18    "file": "t1.c"19  },20  {21    "directory": "DIR/dir2",22    "command": "clang -fsyntax-only t2.c",23    "file": "t2.c"24  }25]26 27//--- dir1/t1.c28#include "head.h"29 30//--- dir1/head.h31#ifndef BBB32#define BBB33#endif34 35//--- dir2/t2.c36#include "head.h"37 38//--- dir2/head.h39