llvm-project/clang/lib/Lex
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 Update the CMake build for r146959's new files. 2011-12-20 08:42:15 +00:00
HeaderMap.cpp Basic: import SmallString<> into clang namespace 2012-02-05 02:13:05 +00:00
HeaderSearch.cpp [Lex] Add support for 'user specified system frameworks' (see test case). 2012-04-05 17:10:06 +00:00
Lexer.cpp Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way. 2012-05-18 19:32:16 +00:00
LiteralSupport.cpp In StringLiteralParser::init, make sure we emit an error when 2012-05-03 17:50:32 +00:00
MacroArgs.cpp Correct handling of _Pragma macro inside a macro argument. 2012-04-03 16:47:40 +00:00
MacroArgs.h Fixed exapnsion range for # and ##. 2011-10-03 18:39:03 +00:00
MacroInfo.cpp For modules, all macros that aren't include guards are implicitly 2011-10-17 15:32:29 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ModuleMap.cpp Make ModuleMapParser own its TargetInfo, so it doesn't get leaked. 2012-03-29 14:07:03 +00:00
PPCaching.cpp [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens 2012-04-04 02:57:01 +00:00
PPCallbacks.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PPDirectives.cpp Lexer::ReadToEndOfLine: Only build the string if it's actually used and do so in a less malloc-intensive way. 2012-05-18 19:32:16 +00:00
PPExpressions.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
PPLexerChange.cpp From Vassil Vassilev: 2012-03-16 10:40:17 +00:00
PPMacroExpansion.cpp [preprocessor] Make sure that MacroExpands callbacks are always in source order. 2012-05-10 18:57:19 +00:00
PTHLexer.cpp Basic: import OwningPtr<> into clang namespace 2012-02-05 02:12:40 +00:00
Pragma.cpp Correct handling of _Pragma macro inside a macro argument. 2012-04-03 16:47:40 +00:00
PreprocessingRecord.cpp [preprocessor] Handle correctly inclusion directives that have macro expansions, e.g 2012-03-27 18:47:48 +00:00
Preprocessor.cpp Add pedantic warning -Wempty-translation-unit (C11 6.9p1). 2012-06-06 17:25:21 +00:00
PreprocessorLexer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
ScratchBuffer.cpp Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset. 2011-09-19 20:40:19 +00:00
TokenConcatenation.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00
TokenLexer.cpp Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). 2012-03-11 07:00:24 +00:00