summaryrefslogtreecommitdiffstats
path: root/clang/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
commite0fbb83b8b132f6fd0a33467a082d16cc9ba4a8f (patch)
tree7d0cb0cc387455b71f68bfaef2a6a5609a1b6d2b /clang/lib/Lex/TokenLexer.cpp
parent55992564152f0fce6758a4495cc39422f5e1cc94 (diff)
downloadbcm5719-llvm-e0fbb83b8b132f6fd0a33467a082d16cc9ba4a8f.tar.gz
bcm5719-llvm-e0fbb83b8b132f6fd0a33467a082d16cc9ba4a8f.zip
Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
Diffstat (limited to 'clang/lib/Lex/TokenLexer.cpp')
-rw-r--r--clang/lib/Lex/TokenLexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp
index 7ccaa89fe3e..8f687655430 100644
--- a/clang/lib/Lex/TokenLexer.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud