diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 20:44:45 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 20:44:45 +0000 |
commit | fae9061769fe2114f1a7875c781cc369ff303a11 (patch) | |
tree | 50a603f7e1932cd42f58e26687ce907933014db0 /contrib/llvm/tools/clang/lib/Lex/Lexer.cpp | |
parent | 5ef8fd3549d38e883a31881636be3dc2a275de20 (diff) | |
parent | 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (diff) | |
download | FreeBSD-src-fae9061769fe2114f1a7875c781cc369ff303a11.zip FreeBSD-src-fae9061769fe2114f1a7875c781cc369ff303a11.tar.gz |
Merge clang trunk r238337 from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Lex/Lexer.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Lex/Lexer.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp b/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp index ca5252e..3f89ea6 100644 --- a/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp +++ b/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp @@ -143,14 +143,8 @@ Lexer::Lexer(SourceLocation fileloc, const LangOptions &langOpts, /// range will outlive it, so it doesn't take ownership of it. Lexer::Lexer(FileID FID, const llvm::MemoryBuffer *FromFile, const SourceManager &SM, const LangOptions &langOpts) - : FileLoc(SM.getLocForStartOfFile(FID)), LangOpts(langOpts) { - - InitLexer(FromFile->getBufferStart(), FromFile->getBufferStart(), - FromFile->getBufferEnd()); - - // We *are* in raw mode. - LexingRawMode = true; -} + : Lexer(SM.getLocForStartOfFile(FID), langOpts, FromFile->getBufferStart(), + FromFile->getBufferStart(), FromFile->getBufferEnd()) {} /// Create_PragmaLexer: Lexer constructor - Create a new lexer object for /// _Pragma expansion. This has a variety of magic semantics that this method @@ -1860,7 +1854,7 @@ bool Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) { char C = getAndAdvanceChar(CurPtr, Result); while (C != '>') { // Skip escaped characters. - if (C == '\\') { + if (C == '\\' && CurPtr < BufferEnd) { // Skip the escaped character. getAndAdvanceChar(CurPtr, Result); } else if (C == '\n' || C == '\r' || // Newline. |