[cfe-commits] r41399 - /cfe/trunk/Parse/Parser.cpp
Chris Lattner
sabre at nondot.org
Fri Aug 24 22:47:03 PDT 2007
Author: lattner
Date: Sat Aug 25 00:47:03 2007
New Revision: 41399
URL: http://llvm.org/viewvc/llvm-project?rev=41399&view=rev
Log:
C++ explicitly allows an empty source file.
Modified:
cfe/trunk/Parse/Parser.cpp
Modified: cfe/trunk/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/Parser.cpp?rev=41399&r1=41398&r2=41399&view=diff
==============================================================================
--- cfe/trunk/Parse/Parser.cpp (original)
+++ cfe/trunk/Parse/Parser.cpp Sat Aug 25 00:47:03 2007
@@ -245,7 +245,8 @@
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);
}
More information about the cfe-commits
mailing list