llvm-project/clang/lib/Basic
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
..
Builtins.cpp Move a method from IdentifierTable.h out of line and remove the SmallString include. 2012-02-04 13:45:25 +00:00
CMakeLists.txt Update CMake dependencies. 2011-12-17 20:08:54 +00:00
ConvertUTF.c When checking the encoding of an 8-bit string literal, don't just check the 2012-03-08 21:59:28 +00:00
Diagnostic.cpp [Basic] Fix up DiagnosticBuilder::{FlushCounts,Emit} to be inline. 2012-03-13 21:02:14 +00:00
DiagnosticIDs.cpp Add new code migrator support for migrating existing Objective-C code to use 2012-03-06 20:06:33 +00:00
FileManager.cpp [PCH] When validating that the files coming from PCH did not change, also 2012-05-03 21:50:39 +00:00
FileSystemStatCache.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
IdentifierTable.cpp Synchronize the representations of DeclarationName and Selector so 2012-05-04 18:24:37 +00:00
LangOptions.cpp Add a -cc1-level option -fmodule-name=<name>, which will be used when 2011-11-15 19:35:01 +00:00
Makefile Use tabs instead of spaces. 2012-03-02 16:06:37 +00:00
Module.cpp Back out my heinous hack that tricked the module generation mechanism 2012-02-02 18:42:48 +00:00
SourceLocation.cpp Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit this into every TU that includes SourceLocation.h. 2012-02-26 16:55:50 +00:00
SourceManager.cpp Add pedantic warning -Wempty-translation-unit (C11 6.9p1). 2012-06-06 17:25:21 +00:00
TargetInfo.cpp objective-c modern translator: buildit objc bool 2012-04-16 21:03:30 +00:00
Targets.cpp Mips: Define __mips_hard_float macro additional to __mips_single_float 2012-06-05 13:06:56 +00:00
TokenKinds.cpp This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling. 2009-11-28 16:09:28 +00:00
Version.cpp Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion already adds some. 2012-05-26 19:39:52 +00:00
VersionTuple.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00