Fix the clang-wpa example.
[clang.git] / test / Preprocessor / dependencies-and-pp.c
blob7877df3f786e6b19d02f9371c8f2091acc9016f1
1 // Test -MT and -E flags, PR4063
3 // RUN: %clang -E -o %t.1 %s
4 // RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s
5 // RUN: diff %t.1 %t.2
6 // RUN: grep "foo:" %t.d
7 // RUN: grep "dependencies-and-pp.c" %t.d
9 // Test -MQ flag without quoting
11 // RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s
12 // RUN: grep "foo:" %t.d
14 // Test -MQ flag with quoting
16 // RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s
17 // RUN: fgrep '$$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo:' %t.d
19 // Test consecutive -MT flags
21 // RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s
22 // RUN: diff %t.1 %t
23 // RUN: fgrep "foo bar baz:" %t.d
25 // Test consecutive -MT and -MQ flags
27 // RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s
28 // RUN: fgrep 'foo $$(bar) b az qu\ ux \ space:' %t.d
30 // TODO: Test default target without quoting
31 // TODO: Test default target with quoting