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