llvm-project/clang/lib
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
..
ARCMigrate Objective-C SDK modernization. import Foundation even 2014-10-09 22:04:27 +00:00
AST Itanium ABI: Template template parameters are usable as substitutions 2014-10-24 20:22:57 +00:00
ASTMatchers ASTMatchers: Peel off a layer of indirection from true matcher. NFC. 2014-10-24 13:29:21 +00:00
Analysis Remove unused member variable. 2014-10-21 04:19:18 +00:00
Basic Add frontend support for __vectorcall 2014-10-24 17:42:17 +00:00
CodeGen Update for LLVM api change. 2014-10-25 04:06:14 +00:00
Driver [Thumb] Clang thinks "char" is signed when using a thumb triple 2014-10-24 11:28:47 +00:00
Edit Edit: Do not extend a removal to include trailing whitespace if we're at the end 2014-09-15 11:47:10 +00:00
Format clang-format: Fix incorrect space after "<". 2014-10-23 20:22:22 +00:00
Frontend Add a new -fmerge-functions -cc1 flag that enables function merging. 2014-10-24 00:49:29 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers <float.h>: Don't seek #include_next if -ffreestanding for targeting mingw. 2014-10-22 01:25:49 +00:00
Index Format: ArrayRefize some implicit copies away. 2014-10-03 18:52:48 +00:00
Lex Lex: Fix an invalid access into a SmallString 2014-10-25 11:40:40 +00:00
Parse Add frontend support for __vectorcall 2014-10-24 17:42:17 +00:00
Rewrite [CMake] clangRewrite: Roll back clangAST in libdeps, due to clang::Stmt::printPretty(). 2014-10-24 08:44:01 +00:00
Sema Add frontend support for __vectorcall 2014-10-24 17:42:17 +00:00
Serialization [modules] Support combining 'textual' with 'private'. 2014-10-24 20:23:01 +00:00
StaticAnalyzer [analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus package. 2014-10-21 12:41:36 +00:00
Tooling Driver: Use pointee_iterator rather than iterating over unique_ptrs 2014-10-03 01:04:53 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00