diff options
author | Yitzhak Mandelbaum <yitzhakm@google.com> | 2019-05-24 15:11:45 +0000 |
---|---|---|
committer | Yitzhak Mandelbaum <yitzhakm@google.com> | 2019-05-24 15:11:45 +0000 |
commit | fab7205ac454cb1459216f0524294aa4beb1b720 (patch) | |
tree | 55c9bd376dfd0d602e449850e1e4c3c0dae722cc /clang/unittests/Tooling/TransformerTest.cpp | |
parent | c1cc8d0eca459a5f49e8e6b99a93b0e1d05a13ba (diff) | |
download | llvm-fab7205ac454cb1459216f0524294aa4beb1b720.zip llvm-fab7205ac454cb1459216f0524294aa4beb1b720.tar.gz llvm-fab7205ac454cb1459216f0524294aa4beb1b720.tar.bz2 |
[LibTooling] Add Explanation parameter to `makeRule`.
Summary:
Conceptually, a single-case RewriteRule has a matcher, edit(s) and an (optional)
explanation. `makeRule` previously only took the matcher and edit(s). This
change adds (optional) support for the explanation.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62390
llvm-svn: 361643
Diffstat (limited to 'clang/unittests/Tooling/TransformerTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/TransformerTest.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/TransformerTest.cpp b/clang/unittests/Tooling/TransformerTest.cpp index 0bf012a..41c7e7a 100644 --- a/clang/unittests/Tooling/TransformerTest.cpp +++ b/clang/unittests/Tooling/TransformerTest.cpp @@ -147,8 +147,7 @@ static RewriteRule ruleStrlenSize() { on(expr(hasType(isOrPointsTo(StringType))) .bind(StringExpr)), callee(cxxMethodDecl(hasName("c_str")))))), - change(text("REPLACED"))); - R.Cases[0].Explanation = text("Use size() method directly on string."); + change(text("REPLACED")), text("Use size() method directly on string.")); return R; } |