From: Ted Kremenek Date: Sat, 19 Jul 2008 19:10:04 +0000 (+0000) Subject: Patch by X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=109949a5f5f8c1e9f917095706639167cfe9260f;p=clang Patch by "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 --- diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 32ee8f0c81..631b8361e9 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -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) {