brintos

brintos / llvm-project-archived public Read only

0
0
Text · 842 B · 0f27f60 Raw
34 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// This test checks that source files with uncommon extensions still undergo5// dependency directives scan. If header.pch would not and b.h would, the scan6// would fail when parsing `void function(B)` and not knowing the symbol B.7 8//--- module.modulemap9module __PCH { header "header.pch" }10module B { header "b.h" }11 12//--- header.pch13#include "b.h"14void function(B);15 16//--- b.h17typedef int B;18 19//--- tu.c20int main() {21  function(0);22  return 0;23}24 25//--- cdb.json.in26[{27  "directory": "DIR",28  "file": "DIR/tu.c",29  "command": "clang -c DIR/tu.c -fmodules -fmodules-cache-path=DIR/cache -fimplicit-module-maps -include DIR/header.pch"30}]31 32// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json33// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/deps.json34