diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-16 00:06:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-16 00:06:06 +0000 |
commit | e0fbb83b8b132f6fd0a33467a082d16cc9ba4a8f (patch) | |
tree | 7d0cb0cc387455b71f68bfaef2a6a5609a1b6d2b /clang/lib/Sema/SemaChecking.cpp | |
parent | 55992564152f0fce6758a4495cc39422f5e1cc94 (diff) | |
download | bcm5719-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/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 7e66d7e910d..5ec01d00116 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -59,9 +59,10 @@ SourceLocation Sema::getLocationOfStringLiteralByte(const StringLiteral *SL, // Re-lex the token to get its length and original spelling. std::pair<FileID, unsigned> LocInfo = SourceMgr.getDecomposedLoc(StrTokSpellingLoc); + bool Invalid = false; std::pair<const char *,const char *> Buffer = - SourceMgr.getBufferData(LocInfo.first, Diags); - if (!Buffer.first) + SourceMgr.getBufferData(LocInfo.first, &Invalid); + if (Invalid) return StrTokSpellingLoc; const char *StrData = Buffer.first+LocInfo.second; |