brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · cb719a6 Raw
36 lines · c
1// RUN: %clang -M %s 2>&1 | FileCheck %s --implicit-check-not=warning2// RUN: %clang -MM %s 2>&1 | FileCheck %s --implicit-check-not=warning3 4// CHECK: m-and-mm.o:5// TEST-I: {{.*}}test.i:6// TEST: {{.*}}test:7 8// RUN: mkdir -p %t.dir9 10/// if -MD and -MMD are not specified, -o specifies the dependency file name.11// RUN: rm -f %t.dir/test.i12// RUN: %clang -M %s -o %t.dir/test.i13// RUN: FileCheck %s < %t.dir/test.i14// RUN: rm -f %t.dir/test.i15// RUN: %clang -MM %s -o %t.dir/test.i16// RUN: FileCheck %s < %t.dir/test.i17 18// RUN: rm -f %t.dir/test.d19// RUN: %clang -fsyntax-only -MD %s -o %t.dir/test.i20// RUN: FileCheck --check-prefix=TEST-I %s < %t.dir/test.d21 22// RUN: rm -f %t.dir/test.d23// RUN: %clang -M -MD %s -o %t.dir/test.i24// RUN: FileCheck --check-prefix=TEST-I %s < %t.dir/test.d25 26/// If the output file name does not have a suffix, just append `.d`.27// RUN: rm -f %t.dir/test.d28// RUN: %clang -fsyntax-only -MD %s -o %t.dir/test29// RUN: FileCheck --check-prefix=TEST %s < %t.dir/test.d30 31#warning "-M and -MM suppresses warnings, thus this warning shouldn't show up"32int main(void)33{34    return 0;35}36