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 | 5b15a9be6ae49b4f5d65578820613c47fee8782c (patch) | |
tree | 2251dd2b5647602cea43b17c2f051d35327284d5 /clang/lib/Lex | |
parent | da22f30e721f1ce3ffc51ead2b06910b436a7d2e (diff) | |
download | bcm5719-llvm-5b15a9be6ae49b4f5d65578820613c47fee8782c.tar.gz bcm5719-llvm-5b15a9be6ae49b4f5d65578820613c47fee8782c.zip |
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
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index d3a97b42b19..c320b3c222e 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/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 { |