aboutsummaryrefslogtreecommitdiff
path: root/Parse/Parser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-25 05:47:03 +0000
committerChris Lattner <sabre@nondot.org>2007-08-25 05:47:03 +0000
commitf72617544287acf0281c3b1a733bcb22a02e6ca4 (patch)
tree9f2a372c8ed2c5123111b9666ffb9c42156d2272 /Parse/Parser.cpp
parent459e8488046be5df0bf57f0a8677316abf253167 (diff)
C++ explicitly allows an empty source file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Parse/Parser.cpp')
-rw-r--r--Parse/Parser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index e4f1138521..255b48a7ca 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -245,7 +245,8 @@ void Parser::Initialize() {
Actions.ParseDeclarator(CurScope, D, 0, 0);
}
- if (Tok.getKind() == tok::eof) // Empty source file is an extension.
+ if (Tok.getKind() == tok::eof &&
+ !getLang().CPlusPlus) // Empty source file is an extension in C
Diag(Tok, diag::ext_empty_source_file);
}