[PATCH] D43500: modernize-use-default-member-init: Remove trailing comma and colon.
Jeremy Demeule via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 23:37:29 PST 2018
jdemeule created this revision.
jdemeule added a reviewer: alexfh.
Herald added subscribers: cfe-commits, mgorny.
'modernize-user-default-member-init' does not automatically ask to remove comma and colon when replacements are produced.
It seems, when they are apply directly from clang-tidy, the RefactoringTool engine is smart enough to remove trailing tokens.
However, when fixes are exported, clang-apply-replacements cannot do the same trick and will lead trailing commas and colon as reported on https://bugs.llvm.org/show_bug.cgi?id=35051.
This patch made “modernize-use-default-member-init” generate explicitly the removal of these locations to made it work correctly in both case (-fix and -export-fixes).
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43500
Files:
clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
clang-tidy/modernize/UseDefaultMemberInitCheck.h
unittests/clang-tidy/CMakeLists.txt
unittests/clang-tidy/ModernizerModuleTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43500.135012.patch
Type: text/x-patch
Size: 11609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180220/597bcf77/attachment-0001.bin>
More information about the cfe-commits
mailing list