diff options
author | Julie Hockett <juliehockett@google.com> | 2018-12-21 17:25:27 +0000 |
---|---|---|
committer | Julie Hockett <juliehockett@google.com> | 2018-12-21 17:25:27 +0000 |
commit | e2e73b221b36dc5547ba2ad4fdf515f7b900a911 (patch) | |
tree | 965cecafa4d6c733f1b6d607eb8e84984b20290b /clang-tools-extra | |
parent | a87fba4e921b462e0c55a404e86a98c713ed816d (diff) |
[clang-tidy] Add export-fixes flag to clang-tidy-diff
Differential Revision: https://reviews.llvm.org/D55848
llvm-svn: 349930
Diffstat (limited to 'clang-tools-extra')
-rwxr-xr-x | clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py index f2c15e5e5598..5eb2e3d656da 100755 --- a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py +++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py @@ -57,6 +57,9 @@ def main(): default='') parser.add_argument('-path', dest='build_path', help='Path used to read a compile command database.') + parser.add_argument('-export-fixes', metavar='FILE', dest='export_fixes', + help='Create a yaml file to store suggested fixes in, ' + 'which can be applied with clang-apply-replacements.') parser.add_argument('-extra-arg', dest='extra_arg', action='append', default=[], help='Additional argument to append to the compiler ' @@ -122,6 +125,8 @@ def main(): command.append('-line-filter=' + quote + line_filter_json + quote) if args.fix: command.append('-fix') + if args.export_fixes: + command.append('-export-fixes=' + args.export_fixes) if args.checks != '': command.append('-checks=' + quote + args.checks + quote) if args.quiet: |