diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-01-15 09:03:45 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-01-15 09:03:45 +0000 |
commit | ae9f85b2c062ac20512a484cfa6e66239dd3d0d9 (patch) | |
tree | 7bf4135d4ca8c13abd6b4a2e76df3f3f69cd6095 /lib/Lex/Lexer.cpp | |
parent | fa16125aaf667c2bd80efcea403a7a71aa65da14 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index d3a97b42b1..c320b3c222 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -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 { |