aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-16 20:46:42 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-16 20:46:42 +0000
commita543016fe07030f695d6d56fd22c8c8da617e0d7 (patch)
tree4f007b8435178d3d477774b9f2a69f4b70a1badf /lib/Lex/Lexer.cpp
parent47a3fcd4afe122b23f9e7b6148f147bfa460cfe8 (diff)
Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 6cdb96f37d..0b8b6242db 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -163,6 +163,7 @@ Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc,
// Now that the lexer is created, change the start/end locations so that we
// just lex the subsection of the file that we want. This is lexing from a
// scratch buffer.
+ bool Invalid = false;
const char *StrData = SM.getCharacterData(SpellingLoc);
L->BufferPtr = StrData;