[cfe-commits] r139196 - /cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
Chandler Carruth
chandlerc at gmail.com
Tue Sep 6 15:34:33 PDT 2011
Author: chandlerc
Date: Tue Sep 6 17:34:33 2011
New Revision: 139196
URL: http://llvm.org/viewvc/llvm-project?rev=139196&view=rev
Log:
Don't recompute the presumed loc twice in 5 lines of code... Spotted by
inspection.
Modified:
cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
Modified: cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp?rev=139196&r1=139195&r2=139196&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp Tue Sep 6 17:34:33 2011
@@ -728,7 +728,7 @@
break;
OS << "fix-it:\"";
- OS.write_escaped(SM.getPresumedLoc(BLoc).getFilename());
+ OS.write_escaped(PLoc.getFilename());
OS << "\":{" << SM.getLineNumber(BInfo.first, BInfo.second)
<< ':' << SM.getColumnNumber(BInfo.first, BInfo.second)
<< '-' << SM.getLineNumber(EInfo.first, EInfo.second)
More information about the cfe-commits
mailing list