diff options
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; |