diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-04 00:55:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-04 00:55:58 +0000 |
commit | 7da5aea7669e6db3e593162b8a123aef06a04d07 (patch) | |
tree | 4af3a673a35337a49ec9d99787d73fd82588c227 /lib/Driver/TextDiagnosticPrinter.cpp | |
parent | be395f6b29762c37938637ffef5f59514e04751a (diff) |
make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/TextDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Driver/TextDiagnosticPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/TextDiagnosticPrinter.cpp b/lib/Driver/TextDiagnosticPrinter.cpp index 27353b8344..cf3733f2e9 100644 --- a/lib/Driver/TextDiagnosticPrinter.cpp +++ b/lib/Driver/TextDiagnosticPrinter.cpp @@ -56,7 +56,7 @@ void TextDiagnosticPrinter::HighlightRange(const SourceRange &R, // Compute the column number of the start. unsigned StartColNo = 0; if (StartLineNo == LineNo) { - StartColNo = SM.getColumnNumber(Begin); + StartColNo = SM.getInstantiationColumnNumber(Begin); if (StartColNo) --StartColNo; // Zero base the col #. } @@ -68,7 +68,7 @@ void TextDiagnosticPrinter::HighlightRange(const SourceRange &R, // Compute the column number of the end. unsigned EndColNo = CaretLine.size(); if (EndLineNo == LineNo) { - EndColNo = SM.getColumnNumber(End); + EndColNo = SM.getInstantiationColumnNumber(End); if (EndColNo) { --EndColNo; // Zero base the col #. |