This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Add <utility> include to misc-uniqueptr-reset-release
ClosedPublic

Authored by njames93 on Mar 1 2021, 6:17 AM.

Details

Summary

This is the only remaining check that creates std::move includes but doesn't add a <utility> include.

Diff Detail

Event Timeline

njames93 created this revision.Mar 1 2021, 6:17 AM
njames93 requested review of this revision.Mar 1 2021, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2021, 6:17 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Eugene.Zelenko added inline comments.
clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
22

I think it'll be reasonable to try to get default from .clang-format. Same in other checks.

njames93 added inline comments.Mar 1 2021, 7:09 AM
clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
22

There isn't a nice way to get the default from .clang-format as the FormatStyle doesn't have a nice field that says if llvm or google style is used(because it's more flexible than that). Besides that, If there is a .clang-format config. clang-tidy will reformat all changes using that style, which in turn would reorder any added includes even if they were of the wrong style.

Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2021, 3:39 PM
aaron.ballman accepted this revision.Apr 12 2021, 8:20 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 12 2021, 8:20 AM
njames93 updated this revision to Diff 336982.Apr 12 2021, 3:31 PM

Add store options method.

This revision was landed with ongoing or failed builds.Apr 12 2021, 3:32 PM
This revision was automatically updated to reflect the committed changes.