Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure.
llvm-svn: 98672
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 6cdb96f..0b8b624 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -163,6 +163,7 @@
// 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;