[all-commits] [llvm/llvm-project] a5311d: [clang-tidy] Handle template instantiations in con...
Stephen Kelly via All-commits
all-commits at lists.llvm.org
Tue Dec 22 10:52:05 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a5311d731e1b95e93b35b1e9183a4a531df386e7
https://github.com/llvm/llvm-project/commit/a5311d731e1b95e93b35b1e9183a4a531df386e7
Author: Stephen Kelly <steveire at gmail.com>
Date: 2020-12-22 (Tue, 22 Dec 2020)
Changed paths:
M clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/readability-container-size-empty.cpp
Log Message:
-----------
[clang-tidy] Handle template instantiations in container size check
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 declarations
instead of instantiations.
Differential Revision: https://reviews.llvm.org/D91302
More information about the All-commits
mailing list