llvm-project/clang/lib/Parse
Jordan Rose ccf43ca05c Add pedantic warning -Wempty-translation-unit (C11 6.9p1).
In standard C since C89, a 'translation-unit' is syntactically defined to have
at least one "external-declaration", which is either a decl or a function
definition. In Clang the latter gives us a declaration as well.

The tricky bit about this warning is that our predefines can contain external
declarations (__builtin_va_list and the 128-bit integer types). Therefore our
AST parser now makes sure we have at least one declaration that doesn't come
from the predefines buffer.

Also, remove bogus warning about empty source files. This doesn't catch source
files that only contain comments, and never fired anyway because of our
predefines.

PR12665 and <rdar://problem/9165548>

llvm-svn: 158085
2012-06-06 17:25:21 +00:00
..
CMakeLists.txt Thread Safety: Patch to implement delayed parsing of attributes within a 2011-09-08 17:42:22 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ParseAST.cpp Add pedantic warning -Wempty-translation-unit (C11 6.9p1). 2012-06-06 17:25:21 +00:00
ParseCXXInlineMethods.cpp CXXThisScopeRAII objects aren't free, don't compute one if it's unused. 2012-05-17 12:01:52 +00:00
ParseDecl.cpp Recognize the MS inheritance attributes and turn them into attributes 2012-05-22 21:28:12 +00:00
ParseDeclCXX.cpp Recognize the MS inheritance attributes and turn them into attributes 2012-05-22 21:28:12 +00:00
ParseExpr.cpp Revert most of r154844, which was disabled in r155975. Keep around the 2012-05-02 22:22:32 +00:00
ParseExprCXX.cpp Revert most of r154844, which was disabled in r155975. Keep around the 2012-05-02 22:22:32 +00:00
ParseInit.cpp Disambiguation of '[[': 2012-04-10 01:32:12 +00:00
ParseObjc.cpp objc: position of 'fixit' was off by one. 2012-05-29 21:52:45 +00:00
ParsePragma.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
ParsePragma.h Implement #pragma redefine_extname. 2012-02-18 16:12:34 +00:00
ParseStmt.cpp Include the correct conversion context locations for condition expressions. 2012-05-16 04:20:04 +00:00
ParseTemplate.cpp Refactor DelayedDiagnostics so that it keeps diagnostics in 2012-05-07 06:16:41 +00:00
ParseTentative.cpp Recover better from a missing 'typename' in a function template definition. 2012-05-16 23:40:17 +00:00
Parser.cpp Add pedantic warning -Wempty-translation-unit (C11 6.9p1). 2012-06-06 17:25:21 +00:00
RAIIObjectsForParser.h Change how we suppress access control in explicit instantiations 2012-05-07 06:16:58 +00:00