[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / as-warnings.c
blob1f785f04950925ec22bee971bf1464dfeb7e26c8
1 // RUN: %clang -### %s --target=x86_64-pc-linux-gnu -c -Wa,--fatal-warnings 2>&1 | FileCheck %s --check-prefix=FATAL_WARNINGS
3 // FATAL_WARNINGS: "-massembler-fatal-warnings"
5 // RUN: %clang -### %s -c -o tmp.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,--no-warn 2>&1 | FileCheck -check-prefix=CHECK-NOIAS %s
6 // RUN: %clang -### %s -c -o tmp.o -integrated-as -Wa,--no-warn 2>&1 | FileCheck %s
8 /// -W is alias for --no-warn.
9 // RUN: %clang -### %s -c -o tmp.o -target i686-pc-linux-gnu -fno-integrated-as -Wa,-W 2>&1 | FileCheck -check-prefix=CHECK-NOIASW %s
10 // RUN: %clang -### %s -c -o tmp.o -integrated-as -Wa,-W 2>&1 | FileCheck %s
12 /// Make sure warnings behave properly in integrated assembler.
13 // RUN: %clang %s -c -o %t.o -integrated-as -Wa,--no-warn 2>&1 | FileCheck -allow-empty --check-prefix=CHECK-AS-NOWARN %s
14 // RUN: not %clang %s -c -o %t.o -integrated-as -Wa,--fatal-warnings 2>&1 | FileCheck --check-prefix=CHECK-AS-FATAL %s
16 // REQUIRES: x86-registered-target
17 // REQUIRES: system-linux
19 // CHECK: "-cc1" {{.*}} "-massembler-no-warn"
20 // CHECK-NOIAS: "--no-warn"
21 // CHECK-NOIASW: "-W"
22 // CHECK-AS-NOWARN-NOT: warning:
23 // CHECK-AS-FATAL: error: .warning directive invoked in source file
25 __asm(".warning");