diff options
Diffstat (limited to 'Parse/Parser.cpp')
-rw-r--r-- | Parse/Parser.cpp | 3 |
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); } |