[PATCH] D97683: [clang-tidy] Add <utility> include to misc-uniqueptr-reset-release
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 1 07:09:17 PST 2021
njames93 added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp:22
+ : ClangTidyCheck(Name, Context),
+ Inserter(Options.getLocalOrGlobal("IncludeStyle",
+ utils::IncludeSorter::IS_LLVM)) {}
----------------
Eugene.Zelenko wrote:
> I think it'll be reasonable to try to get default from `.clang-format`. Same in other checks.
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97683/new/
https://reviews.llvm.org/D97683
More information about the cfe-commits
mailing list