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:
79053ff
)
[Tooling] add a createReplacement overload for StringRef
author
Alexander Kornienko
<alexfh@google.com>
Thu, 4 May 2017 15:34:06 +0000
(15:34 +0000)
committer
Alexander Kornienko
<alexfh@google.com>
Thu, 4 May 2017 15:34:06 +0000
(15:34 +0000)
llvm-svn: 302159
clang/include/clang/Tooling/FixIt.h
patch
|
blob
|
history
diff --git
a/clang/include/clang/Tooling/FixIt.h
b/clang/include/clang/Tooling/FixIt.h
index
e2259d4
..
c1e5088
100644
(file)
--- a/
clang/include/clang/Tooling/FixIt.h
+++ b/
clang/include/clang/Tooling/FixIt.h
@@
-65,6
+65,13
@@
FixItHint createReplacement(const D &Destination, const S &Source,
getText(Source, Context));
}
+// \brief Returns a FixItHint to replace \p Destination by \p Source.
+template <typename D>
+FixItHint createReplacement(const D &Destination, StringRef Source) {
+ return FixItHint::CreateReplacement(internal::getSourceRange(Destination),
+ Source);
+}
+
} // end namespace fixit
} // end namespace tooling
} // end namespace clang