From e03d7d792c93418928e4b30a79bc7a19a26b7edb Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Fri, 9 Jan 2015 10:03:47 +0000 Subject: [PATCH] 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 --- tools/clang-format/ClangFormat.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.40.0