[PATCH] D117129: [clang-tidy] Extract Class IncluderClangTidyCheck

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 12 10:18:48 PST 2022


LegalizeAdulthood created this revision.
LegalizeAdulthood added a reviewer: alexfh.
LegalizeAdulthood added a project: clang-tools-extra.
Herald added subscribers: carlosgalvezp, arphaman, kbarton, xazax.hun, mgorny, nemanjai.
LegalizeAdulthood requested review of this revision.

IncluderClangTidyCheck is a base class for checks that
want to insert include files as part of their fixits.

IncluderClangTidyCheck::storeOptions should be called
first by any derived classes that override storeOptions.

IncluderClangTidyCheck::registerPPCallbacks should be
called first by any derived classes that override
registerPPCallbacks and perform additional preprocessor
logic.

Switch the following classes to use IncluderClangTidyCheck:

- abseil::StringFindStartswithCheck
- bugprone::ImplicitWideningOfMultiplicationResultCheck
- cppcoreguidelines::InitVariablesCheck
- cppcoreguidelines::ProBoundsCOnstantArrayIndexCheck
- misc::UniqueptrResetReleaseCheck
- modernize::LoopConvertCheck
- modernize::MakeSmartPtrCheck
- modernize::PassByValueCheck
- modernize::ReplaceAutoPtrCheck
- modernize::ReplaceRandomShuffleCheck
- performance::TypePromotionInMathFnCheck
- performance::UnnecessaryValueParamCheck
- utils::TransformerClangTidyCheck


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117129

Files:
  clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
  clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
  clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h
  clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
  clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
  clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
  clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h
  clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
  clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
  clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
  clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
  clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
  clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h
  clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
  clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
  clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
  clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h
  clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
  clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
  clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
  clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h
  clang-tools-extra/clang-tidy/utils/CMakeLists.txt
  clang-tools-extra/clang-tidy/utils/IncluderClangTidyCheck.cpp
  clang-tools-extra/clang-tidy/utils/IncluderClangTidyCheck.h
  clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
  clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117129.399369.patch
Type: text/x-patch
Size: 50719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220112/074700bc/attachment-0001.bin>


More information about the cfe-commits mailing list