[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 10:24:54 PDT 2020
alexfh added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:1011-1015
+ if (Header.front() == '<' && Header.back() == '>') {
+ IsSystemInclude = true;
+ Header.pop_back();
+ Header.erase(0, 1);
+ }
----------------
alexfh wrote:
> It looks like this should be a feature of the `IncludeInserter`. Not necessarily in this patch though. The `createIncludeInsertion` in other checks could be made a bit more self-descriptive too, e.g. this one in clang-tidy/modernize/MakeSmartPtrCheck.cpp:
> ```
> Diag << Inserter.createIncludeInsertion(
> FD, MakeSmartPtrFunctionHeader,
> /*IsAngled=*/MakeSmartPtrFunctionHeader == StdMemoryHeader);
> ```
> could have angle brackets in `MakeSmartPtrFunctionHeader` instead of making a special case for `memory`.
I've posted a patch for this for review: https://reviews.llvm.org/D85666.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82089/new/
https://reviews.llvm.org/D82089
More information about the cfe-commits
mailing list