[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / gcc_forward.c
blob987f9376ba04c945d0a53f29bb1b720ad20957ab
1 // RUN: %clang -### %s -target x86-none-elf \
2 // RUN: --coverage -e _start -fuse-ld=lld --ld-path=ld -nostartfiles \
3 // RUN: -nostdlib -r -rdynamic -specs=nosys.specs -static -static-pie \
4 // RUN: 2>&1 | FileCheck --check-prefix=FORWARD %s
5 // FORWARD: gcc{{[^"]*}}" "--coverage" "-fuse-ld=lld" "--ld-path=ld" "-nostartfiles" "-nostdlib" "-rdynamic" "-specs=nosys.specs" "-static" "-static-pie" "-o" "a.out" "{{.*}}.o" "-e" "_start" "-r"
7 // Check that we don't try to forward -Xclang or -mlinker-version to GCC.
8 // PR12920 -- Check also we may not forward W_Group options to GCC.
9 //
10 // RUN: not %clang --target=powerpc-unknown-unknown \
11 // RUN: %s \
12 // RUN: -Wall -Wdocumentation \
13 // RUN: -Xclang foo-bar \
14 // RUN: -pie -march=x86-64 \
15 // RUN: -mlinker-version=10 -### 2> %t
16 // RUN: FileCheck < %t %s
18 // clang -cc1
19 // CHECK: clang
20 // CHECK: "-Wall" "-Wdocumentation"
21 // CHECK: "-o" "{{[^"]+}}.o"
23 // gcc as ld.
24 // CHECK: gcc{{[^"]*}}" "-pie"
25 // CHECK-NOT: "-mlinker-version=10"
26 // CHECK-NOT: "-Xclang"
27 // CHECK-NOT: "foo-bar"
28 // CHECK-NOT: "-Wall"
29 // CHECK-NOT: "-Wdocumentation"
30 // CHECK-NOT: -march
31 // CHECK-NOT: "-mlinker-version=10"
32 // CHECK-NOT: "-Xclang"
33 // CHECK-NOT: "foo-bar"
34 // CHECK-NOT: "-Wall"
35 // CHECK-NOT: "-Wdocumentation"
36 // CHECK: "-o" "a.out"