[PATCH] D91302: Handle template instantiations better in clang-tidy check
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 11 15:12:25 PST 2020
steveire created this revision.
steveire added a reviewer: alexfh.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
steveire requested review of this revision.
readability-container-size-empty currently modifies source code based on
AST nodes in template instantiations, which means that it makes
transformations based on substituted types. This can lead to
transforming code to be broken.
Change the matcher implementation to ignore template instantiations
explicitly, and add a matcher to explicitly handle template declatations
instead of instantiations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91302
Files:
clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/readability-container-size-empty.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91302.304668.patch
Type: text/x-patch
Size: 12871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201111/e743389b/attachment.bin>
More information about the cfe-commits
mailing list