summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/FixIt.cpp
diff options
context:
space:
mode:
authorYitzhak Mandelbaum <yitzhakm@google.com>2019-04-05 14:05:03 +0000
committerYitzhak Mandelbaum <yitzhakm@google.com>2019-04-05 14:05:03 +0000
commit84f2271acd818e50c598fef7ce9586e7ee0ac553 (patch)
tree0e5a3b4f6e9fc4fd25830d88fe1cb56fb7d68fb7 /clang/lib/Tooling/FixIt.cpp
parent106429b4e4155a279114ab8cd6d6383872ef2835 (diff)
downloadbcm5719-llvm-84f2271acd818e50c598fef7ce9586e7ee0ac553.tar.gz
bcm5719-llvm-84f2271acd818e50c598fef7ce9586e7ee0ac553.zip
[LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.
Summary: Introduces a utility library in Refactoring/ to collect routines related to source-code manipulation. In this change, we move "extended-range" functions from the FixIt library (in clangTooling) to this new library. We need to use this functionality in Refactoring/ and cannot access it if it resides in Tooling/, because that would cause clangToolingRefactor to depend on clangTooling, which would be a circular dependency. Reviewers: ilya-biryukov, ioeric Reviewed By: ilya-biryukov Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60269 llvm-svn: 357764
Diffstat (limited to 'clang/lib/Tooling/FixIt.cpp')
-rw-r--r--clang/lib/Tooling/FixIt.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/clang/lib/Tooling/FixIt.cpp b/clang/lib/Tooling/FixIt.cpp
index ca12a5642a1..76c92c54373 100644
--- a/clang/lib/Tooling/FixIt.cpp
+++ b/clang/lib/Tooling/FixIt.cpp
@@ -22,15 +22,6 @@ StringRef getText(CharSourceRange Range, const ASTContext &Context) {
return Lexer::getSourceText(Range, Context.getSourceManager(),
Context.getLangOpts());
}
-
-CharSourceRange maybeExtendRange(CharSourceRange Range, tok::TokenKind Next,
- ASTContext &Context) {
- Optional<Token> Tok = Lexer::findNextToken(
- Range.getEnd(), Context.getSourceManager(), Context.getLangOpts());
- if (!Tok || !Tok->is(Next))
- return Range;
- return CharSourceRange::getTokenRange(Range.getBegin(), Tok->getLocation());
-}
} // namespace internal
} // end namespace fixit
OpenPOWER on IntegriCloud