]> granicus.if.org Git - clang/commitdiff
Patch by
authorTed Kremenek <kremenek@apple.com>
Sat, 19 Jul 2008 19:10:04 +0000 (19:10 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 19 Jul 2008 19:10:04 +0000 (19:10 +0000)
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53796 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 32ee8f0c817c8580777734db1f52e30cba6168a2..631b8361e90a56209fb32f675385acd078a226d6 100644 (file)
@@ -172,7 +172,7 @@ void Preprocessor::DumpLocation(SourceLocation Loc) const {
   SourceLocation LogLoc = SourceMgr.getLogicalLoc(Loc);
   llvm::cerr << SourceMgr.getSourceName(LogLoc) << ':'
              << SourceMgr.getLineNumber(LogLoc) << ':'
-             << SourceMgr.getLineNumber(LogLoc);
+             << SourceMgr.getColumnNumber(LogLoc);
   
   SourceLocation PhysLoc = SourceMgr.getPhysicalLoc(Loc);
   if (PhysLoc != LogLoc) {