forked from OSchip/llvm-project
Two variables had been added for an assert, but their values were
re-computed rather than the variables be re-used just after the assert. Just use the variables since we have them already. Fixes an unused variable warning. Also fix an 80-column violation. llvm-svn: 148212
This commit is contained in:
parent
da22f30e72
commit
5b15a9be6a
|
@ -489,11 +489,11 @@ SourceLocation Lexer::GetBeginningOfToken(SourceLocation Loc,
|
|||
SourceLocation FileLoc = SM.getSpellingLoc(Loc);
|
||||
SourceLocation BeginFileLoc = getBeginningOfFileToken(FileLoc, SM, LangOpts);
|
||||
std::pair<FileID, unsigned> FileLocInfo = SM.getDecomposedLoc(FileLoc);
|
||||
std::pair<FileID, unsigned> BeginFileLocInfo= SM.getDecomposedLoc(BeginFileLoc);
|
||||
std::pair<FileID, unsigned> BeginFileLocInfo
|
||||
= SM.getDecomposedLoc(BeginFileLoc);
|
||||
assert(FileLocInfo.first == BeginFileLocInfo.first &&
|
||||
FileLocInfo.second >= BeginFileLocInfo.second);
|
||||
return Loc.getLocWithOffset(SM.getDecomposedLoc(BeginFileLoc).second -
|
||||
SM.getDecomposedLoc(FileLoc).second);
|
||||
return Loc.getLocWithOffset(BeginFileLocInfo.second - FileLocInfo.second);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in New Issue