From: Manuel Klimek Date: Fri, 9 Jan 2015 10:03:47 +0000 (+0000) Subject: Add the shifted cursor position to XML output, so it can be used by editor integrations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e03d7d792c93418928e4b30a79bc7a19a26b7edb;p=clang Add the shifted cursor position to XML output, so it can be used by editor integrations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225516 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/clang-format/ClangFormat.cpp b/tools/clang-format/ClangFormat.cpp index cacc51fd97..d44d407aa8 100644 --- a/tools/clang-format/ClangFormat.cpp +++ b/tools/clang-format/ClangFormat.cpp @@ -229,6 +229,10 @@ static bool format(StringRef FileName) { if (OutputXML) { llvm::outs() << "\n\n"; + if (Cursor.getNumOccurrences() != 0) + llvm::outs() << "" + << tooling::shiftedCodePosition(Replaces, Cursor) + << "\n"; for (tooling::Replacements::const_iterator I = Replaces.begin(), E = Replaces.end(); I != E; ++I) {