diff options
| author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2016-10-14 23:16:25 +0000 |
|---|---|---|
| committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2016-10-14 23:16:25 +0000 |
| commit | 5fe0678bd8879d5d83df5f73e29bc3c1c60b741b (patch) | |
| tree | 43fcd1fbaf4bed19806a14ed15598cb0350fdb5e /clang-tools-extra/clang-move/ClangMove.cpp | |
| parent | 48fd87e4aade5ce15b4d4296f330a5bc8971b508 (diff) | |
| download | bcm5719-llvm-5fe0678bd8879d5d83df5f73e29bc3c1c60b741b.tar.gz bcm5719-llvm-5fe0678bd8879d5d83df5f73e29bc3c1c60b741b.zip | |
[clang-move] Use cl::list for the list of names
This diff replaces manual parsing of the comma-separated list of names with
cl::list and cl::CommaSeparated.
Test plan: make -j8 check-clang-tools
Differential revision: https://reviews.llvm.org/D25586
llvm-svn: 284291
Diffstat (limited to 'clang-tools-extra/clang-move/ClangMove.cpp')
| -rw-r--r-- | clang-tools-extra/clang-move/ClangMove.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-move/ClangMove.cpp b/clang-tools-extra/clang-move/ClangMove.cpp index d954522de46..c8365f07f86 100644 --- a/clang-tools-extra/clang-move/ClangMove.cpp +++ b/clang-tools-extra/clang-move/ClangMove.cpp @@ -311,10 +311,8 @@ ClangMoveTool::ClangMoveTool( } void ClangMoveTool::registerMatchers(ast_matchers::MatchFinder *Finder) { - SmallVector<StringRef, 4> ClassNames; - llvm::StringRef(Spec.Names).split(ClassNames, ','); Optional<ast_matchers::internal::Matcher<NamedDecl>> InMovedClassNames; - for (StringRef ClassName : ClassNames) { + for (StringRef ClassName : Spec.Names) { llvm::StringRef GlobalClassName = ClassName.trim().ltrim(':'); const auto HasName = hasName(("::" + GlobalClassName).str()); InMovedClassNames = |

