summaryrefslogtreecommitdiffstats
path: root/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-16 00:06:06 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-16 00:06:06 +0000
commitf715ca12bfc9fddfde75f98a197424434428b821 (patch)
treebd19f3ce3d9a7850942f25d25c03633954e91faa /lib/Lex/TokenLexer.cpp
parentf9b0a58a103784495309543dce4469e44861b4cc (diff)
Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r--lib/Lex/TokenLexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 7ccaa89fe3..8f68765543 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -439,9 +439,10 @@ bool TokenLexer::PasteTokens(Token &Tok) {
SourceManager &SourceMgr = PP.getSourceManager();
FileID LocFileID = SourceMgr.getFileID(ResultTokLoc);
+ bool Invalid = false;
const char *ScratchBufStart
- = SourceMgr.getBufferData(LocFileID, PP.getDiagnostics()).first;
- if (!ScratchBufStart)
+ = SourceMgr.getBufferData(LocFileID, &Invalid).first;
+ if (Invalid)
return false;
// Make a lexer to lex this string from. Lex just this one token.