[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 14 09:41:25 PST 2021


carlosgalvezp created this revision.
carlosgalvezp added reviewers: aaron.ballman, whisperity.
Herald added subscribers: rnkovacs, xazax.hun, mgorny.
carlosgalvezp requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Currently, ClangTidyDiagnosticConsumer defines 2 additional
classes: ClangTidyContext and ClangTidyError. A reader does
not expect them to be there, and a file needing only one
of them needs to include the heavy ClangTidyDiangosticConsumer.h,
increasing compilation time.

Refactor by moving these classes into their own set of .h/.cpp files.
Besides readability, compilation time is also improved.
Adjust includes accordingly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113848

Files:
  clang-tools-extra/clang-tidy/CMakeLists.txt
  clang-tools-extra/clang-tidy/ClangTidy.cpp
  clang-tools-extra/clang-tidy/ClangTidyCheck.h
  clang-tools-extra/clang-tidy/ClangTidyContext.cpp
  clang-tools-extra/clang-tidy/ClangTidyContext.h
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
  clang-tools-extra/clang-tidy/ClangTidyError.cpp
  clang-tools-extra/clang-tidy/ClangTidyError.h
  clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
  clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
  clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113848.387100.patch
Type: text/x-patch
Size: 34631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211114/02390155/attachment-0001.bin>


More information about the cfe-commits mailing list