[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / ClangScanDeps / implicit-target.c
blobcf757f937331a60b4e7469a26071869eeebdba12
1 // Check that we can detect an implicit target when clang is invoked as
2 // <triple->clang. Using an implicit triple requires that the target actually
3 // is available, too.
4 // REQUIRES: x86-registered-target
6 // RUN: rm -rf %t
7 // RUN: split-file %s %t
8 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
10 // Check that we can deduce this both when using a compilation database, and when using
11 // a literal command line.
13 // RUN: clang-scan-deps -format experimental-full -compilation-database %t/cdb.json | FileCheck %s
15 // RUN: clang-scan-deps -format experimental-full -- x86_64-w64-mingw32-clang %t/source.c -o %t/source.o | FileCheck %s
17 // CHECK: "-triple",
18 // CHECK-NEXT: "x86_64-w64-windows-gnu",
21 //--- cdb.json.in
24 "directory": "DIR"
25 "command": "x86_64-w64-mingw32-clang -c DIR/source.c -o DIR/source.o"
26 "file": "DIR/source.c"
30 //--- source.c
31 void func(void) {}