projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aabcb80
)
Add the shifted cursor position to XML output, so it can be used by editor integrations.
author
Manuel Klimek
<klimek@google.com>
Fri, 9 Jan 2015 10:03:47 +0000
(10:03 +0000)
committer
Manuel Klimek
<klimek@google.com>
Fri, 9 Jan 2015 10:03:47 +0000
(10:03 +0000)
llvm-svn: 225516
clang/tools/clang-format/ClangFormat.cpp
patch
|
blob
|
history
diff --git
a/clang/tools/clang-format/ClangFormat.cpp
b/clang/tools/clang-format/ClangFormat.cpp
index
cacc51f
..
d44d407
100644
(file)
--- a/
clang/tools/clang-format/ClangFormat.cpp
+++ b/
clang/tools/clang-format/ClangFormat.cpp
@@
-229,6
+229,10
@@
static bool format(StringRef FileName) {
if (OutputXML) {
llvm::outs()
<< "<?xml version='1.0'?>\n<replacements xml:space='preserve'>\n";
+ if (Cursor.getNumOccurrences() != 0)
+ llvm::outs() << "<cursor>"
+ << tooling::shiftedCodePosition(Replaces, Cursor)
+ << "</cursor>\n";
for (tooling::Replacements::const_iterator I = Replaces.begin(),
E = Replaces.end();
I != E; ++I) {