[clang-tidy] Exclude template instantiations in modernize-use-override
authorPiotr Zegar <me@piotrzegar.pl>
Sat, 15 Apr 2023 10:07:45 +0000 (10:07 +0000)
committerPiotr Zegar <me@piotrzegar.pl>
Sat, 15 Apr 2023 10:16:03 +0000 (10:16 +0000)
commit9556409957bbf85ca751ccff8f3a4d981a094b73
tree9f277d076ad4c85feb254e902abb2f9c84c6eb6d
parent19ef8e8446df10b6bebf6301c1a3e9e8000f842c
[clang-tidy] Exclude template instantiations in modernize-use-override

Added IgnoreTemplateInstantiations option to modernize-use-override
check. Allows to ignore virtual function overrides that are part of
template instantiations. This can be useful in cases where the use
of the "override" keyword is not appropriate or causes issues with
template specialization.

Fixes #38276.

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D147924
clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/modernize/use-override.rst
clang-tools-extra/test/clang-tidy/checkers/modernize/use-override-templates.cpp [new file with mode: 0644]