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 | f715ca12bfc9fddfde75f98a197424434428b821 (patch) | |
tree | bd19f3ce3d9a7850942f25d25c03633954e91faa /lib/Sema/SemaChecking.cpp | |
parent | f9b0a58a103784495309543dce4469e44861b4cc (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/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 7e66d7e910..5ec01d0011 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/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; |