summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-21 17:55:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-21 17:55:43 +0000
commit8e93780c86fdf57267b8569ab777ddf964983a91 (patch)
tree9ed916372bb3534d8b7ab420755d2922d626ec54 /clang
parent45470943a9bcaa55e859db2e7236897412cfc0dd (diff)
downloadbcm5719-llvm-8e93780c86fdf57267b8569ab777ddf964983a91.tar.gz
bcm5719-llvm-8e93780c86fdf57267b8569ab777ddf964983a91.zip
Frontend: Handle empty input on stdin.
- PR3854. I think it makes more sense to change MemoryBuffer::getSTDIN (return 0 should indicate error, not empty), but it is documented to return 0 for empty inputs, and some other code appears to rely on this. llvm-svn: 67448
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Frontend/stdin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Frontend/stdin.c b/clang/test/Frontend/stdin.c
new file mode 100644
index 00000000000..1b1bc67613f
--- /dev/null
+++ b/clang/test/Frontend/stdin.c
@@ -0,0 +1,3 @@
+// RUN: clang -E - < /dev/null &> %t
+// RUN: grep '<predefines>' %t
+
OpenPOWER on IntegriCloud