llvm-project/clang/lib/Lex
David Majnemer d3c3e78ac1 Lex: Fix an invalid access into a SmallString
We would crash because we used operator[] to access past the end of a
SmallString.  This occured because our token had length zero.

Instead, form the pointer using .data() and arithmetic.  This is safe
because this forms a one-past-the-end pointer and it is only used to
compare with another one-past-the-end pointer.

This fixes PR21379.

llvm-svn: 220614
2014-10-25 11:40:40 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp unique_ptrify HeaderMap::FileBuffer 2014-08-29 19:51:32 +00:00
HeaderSearch.cpp PR21215: Support -fmodule-map-file being specified multiple times. Support 2014-10-17 01:42:53 +00:00
Lexer.cpp C++1y is now C++14! 2014-08-19 15:55:55 +00:00
LiteralSupport.cpp C++1y is now C++14! 2014-08-19 15:55:55 +00:00
MacroArgs.cpp Lex: Fix an invalid access into a SmallString 2014-10-25 11:40:40 +00:00
MacroInfo.cpp Reinstate r213348, reverted in r213395, with an additional bug fix and more 2014-07-18 22:13:40 +00:00
Makefile
ModuleMap.cpp [modules] Support combining 'textual' with 'private'. 2014-10-24 20:23:01 +00:00
PPCaching.cpp Fix the build break introduced by r195799 by restoring two close 2013-11-27 01:40:12 +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
PPConditionalDirectiveRecord.cpp Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum. 2013-12-07 08:41:15 +00:00
PPDirectives.cpp Use enumerators instead of hardcoded integers when processing macro names. 2014-10-24 17:31:32 +00:00
PPExpressions.cpp Use enumerators instead of hardcoded integers when processing macro names. 2014-10-24 17:31:32 +00:00
PPLexerChange.cpp [modules] Add support for 'textual header' directives. 2014-10-22 23:50:56 +00:00
PPMacroExpansion.cpp [modules] Add support for #include_next. 2014-10-20 00:15:49 +00:00
PTHLexer.cpp unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter 2014-08-29 22:04:45 +00:00
Pragma.cpp [modules] Add support for #include_next. 2014-10-20 00:15:49 +00:00
PreprocessingRecord.cpp [C++11] Use 'nullptr'. Lex edition. 2014-05-17 23:10:59 +00:00
Preprocessor.cpp [libclang] If the code-completion point is inside the preamble, adjust the position at the beginning of the file after the preamble. 2014-10-18 06:23:50 +00:00
PreprocessorLexer.cpp Make Preprocessor::Lex non-recursive. 2013-09-19 00:41:32 +00:00
ScratchBuffer.cpp unique_ptrify SourceManager::createFileID 2014-08-29 07:59:55 +00:00
TokenConcatenation.cpp Avoid a couple of assertions when preprocessing with modules 2014-09-10 21:29:41 +00:00
TokenLexer.cpp Lex: Fix an invalid access into a SmallString 2014-10-25 11:40:40 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00