diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
commit | be1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch) | |
tree | 1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/Preprocessor/dependencies-and-pp.c | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Preprocessor/dependencies-and-pp.c')
-rw-r--r-- | clang/test/Preprocessor/dependencies-and-pp.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/dependencies-and-pp.c b/clang/test/Preprocessor/dependencies-and-pp.c new file mode 100644 index 0000000..7877df3 --- /dev/null +++ b/clang/test/Preprocessor/dependencies-and-pp.c @@ -0,0 +1,31 @@ +// Test -MT and -E flags, PR4063 + +// RUN: %clang -E -o %t.1 %s +// RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s +// RUN: diff %t.1 %t.2 +// RUN: grep "foo:" %t.d +// RUN: grep "dependencies-and-pp.c" %t.d + +// Test -MQ flag without quoting + +// RUN: %clang -E -MD -MF %t.d -MQ foo -o %t %s +// RUN: grep "foo:" %t.d + +// Test -MQ flag with quoting + +// RUN: %clang -E -MD -MF %t.d -MQ '$fo\ooo ooo\ ooo\\ ooo#oo' -o %t %s +// RUN: fgrep '$$fo\ooo\ ooo\\\ ooo\\\\\ ooo\#oo:' %t.d + +// Test consecutive -MT flags + +// RUN: %clang -E -MD -MF %t.d -MT foo -MT bar -MT baz -o %t %s +// RUN: diff %t.1 %t +// RUN: fgrep "foo bar baz:" %t.d + +// Test consecutive -MT and -MQ flags + +// RUN: %clang -E -MD -MF %t.d -MT foo -MQ '$(bar)' -MT 'b az' -MQ 'qu ux' -MQ ' space' -o %t %s +// RUN: fgrep 'foo $$(bar) b az qu\ ux \ space:' %t.d + +// TODO: Test default target without quoting +// TODO: Test default target with quoting |