summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-09-06 22:34:33 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-09-06 22:34:33 +0000
commit935574de2f9d2a9716cc7587a38564aa63c201da (patch)
tree0b42464c599f359676460a3f0f1fda209650ac64
parent1f28e6c7e324337feee8177ed828179b4a6973af (diff)
downloadbcm5719-llvm-935574de2f9d2a9716cc7587a38564aa63c201da.tar.gz
bcm5719-llvm-935574de2f9d2a9716cc7587a38564aa63c201da.zip
Don't recompute the presumed loc twice in 5 lines of code... Spotted by
inspection. llvm-svn: 139196
-rw-r--r--clang/lib/Frontend/TextDiagnosticPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/TextDiagnosticPrinter.cpp b/clang/lib/Frontend/TextDiagnosticPrinter.cpp
index 1da24940ef5..976d3db715b 100644
--- a/clang/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/clang/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -728,7 +728,7 @@ private:
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)
OpenPOWER on IntegriCloud