From 8e93780c86fdf57267b8569ab777ddf964983a91 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 21 Mar 2009 17:55:43 +0000 Subject: [PATCH] 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 --- clang/test/Frontend/stdin.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 clang/test/Frontend/stdin.c diff --git a/clang/test/Frontend/stdin.c b/clang/test/Frontend/stdin.c new file mode 100644 index 000000000000..1b1bc67613f5 --- /dev/null +++ b/clang/test/Frontend/stdin.c @@ -0,0 +1,3 @@ +// RUN: clang -E - < /dev/null &> %t +// RUN: grep '' %t + -- GitLab