[PATCH] D70144: clang-tidy: modernize-use-equals-default avoid adding redundant semicolons

Conrad Poelman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 12:47:10 PST 2019


poelmanc updated this revision to Diff 229161.
poelmanc edited the summary of this revision.
poelmanc added a comment.

Update to add and use new `findNextTokenSkippingComments` and `findNextTokenSkippingKind` utility functions. Since the former calls the latter with just one token type, this required generalizing `Token::isOneOf()` to work with 1-to-N token kinds versus requiring 2-to-N.

Also added a release note.

To me the change to `Token::isOneOf()` is an improvement (less code and more flexibility when calling it from variadic templates), but if the team prefers not to modify `Token::isOneOf()`, we could eliminate the `findNextTokenSkippingKind` utility function and instead implement `findNextTokenSkippingComments` directly.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70144/new/

https://reviews.llvm.org/D70144

Files:
  clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
  clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
  clang-tools-extra/clang-tidy/utils/LexerUtils.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default-copy.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize-use-equals-default.cpp
  clang/include/clang/Lex/Token.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70144.229161.patch
Type: text/x-patch
Size: 7481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191113/bffca2ed/attachment.bin>


More information about the cfe-commits mailing list