llvm-project/clang-tools-extra/clang-tidy/readability
Stephen Kelly a5311d731e [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
2020-12-22 18:44:45 +00:00
..
AvoidConstParamsInDecls.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AvoidConstParamsInDecls.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
BracesAroundStatementsCheck.cpp [clang-tidy] Fix "expression is redundant [misc-redundant-expression]" warning. NFCI. (PR44768) 2020-02-04 21:36:50 +00:00
BracesAroundStatementsCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
CMakeLists.txt [clang-tidy] Implement readability-function-cognitive-complexity check 2020-10-03 00:27:13 +03:00
ConstReturnTypeCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
ConstReturnTypeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ContainerSizeEmptyCheck.cpp [clang-tidy] Handle template instantiations in container size check 2020-12-22 18:44:45 +00:00
ContainerSizeEmptyCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ConvertMemberFunctionsToStatic.cpp [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ConvertMemberFunctionsToStatic.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
DeleteNullPointerCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
DeleteNullPointerCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
DeletedDefaultCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeletedDefaultCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ElseAfterReturnCheck.cpp [clang-tidy] [clangd] Avoid multi-line diagnostic range for else-after-return diagnostic 2020-11-29 18:32:23 -05:00
ElseAfterReturnCheck.h [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved 2020-11-19 18:20:32 +00:00
FunctionCognitiveComplexityCheck.cpp [clang-tidy] Fix crash in readability-function-cognitive-complexity on weak refs 2020-10-11 18:52:38 +03:00
FunctionCognitiveComplexityCheck.h [clang-tidy] Implement readability-function-cognitive-complexity check 2020-10-03 00:27:13 +03:00
FunctionSizeCheck.cpp Fix file headers. NFC 2019-03-01 09:52:53 +00:00
FunctionSizeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
IdentifierNamingCheck.cpp [clang-tidy] Add support for diagnostics with no location 2020-12-08 20:29:31 +00:00
IdentifierNamingCheck.h [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks 2020-11-25 01:18:44 +00:00
ImplicitBoolConversionCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
ImplicitBoolConversionCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
InconsistentDeclarationParameterNameCheck.cpp [NFC] SmallVector<char...> to SmallString<...> 2020-11-27 20:36:09 +00:00
InconsistentDeclarationParameterNameCheck.h [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
IsolateDeclarationCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
IsolateDeclarationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MagicNumbersCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 12:39:33 +01:00
MagicNumbersCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
MakeMemberFunctionConstCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
MakeMemberFunctionConstCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
MisleadingIndentationCheck.cpp [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check. 2020-01-08 16:36:13 +02:00
MisleadingIndentationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MisplacedArrayIndexCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
MisplacedArrayIndexCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NamedParameterCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamedParameterCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NamespaceCommentCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
NamespaceCommentCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
NonConstParameterCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
NonConstParameterCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
QualifiedAutoCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
QualifiedAutoCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ReadabilityTidyModule.cpp [clang-tidy] Implement readability-function-cognitive-complexity check 2020-10-03 00:27:13 +03:00
RedundantAccessSpecifiersCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantAccessSpecifiersCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantControlFlowCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RedundantControlFlowCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantDeclarationCheck.cpp [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
RedundantDeclarationCheck.h [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
RedundantFunctionPtrDereferenceCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantFunctionPtrDereferenceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantMemberInitCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantMemberInitCheck.h [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
RedundantPreprocessorCheck.cpp [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
RedundantPreprocessorCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantSmartptrGetCheck.cpp [NFC][clang-tidy] use hasOperands in place of hasEitherOperand 2020-05-18 10:11:22 +01:00
RedundantSmartptrGetCheck.h [clang-tidy] Convert config options that are bools to use the bool overload of get(GlobalOrLocal)? 2020-04-12 23:06:09 +01:00
RedundantStringCStrCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantStringCStrCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantStringInitCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantStringInitCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
SimplifyBooleanExprCheck.cpp [Ignore Expressions][NFC] Refactor to better use `IgnoreExpr.h` and nits 2020-09-07 09:32:30 +00:00
SimplifyBooleanExprCheck.h [clang-tidy] readability-simplify-boolean-expr detects negated literals 2020-08-22 13:57:36 +01:00
SimplifySubscriptExprCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
SimplifySubscriptExprCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
StaticAccessedThroughInstanceCheck.cpp [clang-tidy] Fix invalid fixit for readability-static-accessed-through-instance (bug 40544) 2019-05-14 18:23:10 +00:00
StaticAccessedThroughInstanceCheck.h [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
StaticDefinitionInAnonymousNamespaceCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StaticDefinitionInAnonymousNamespaceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
StringCompareCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
StringCompareCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UniqueptrDeleteReleaseCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UniqueptrDeleteReleaseCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UppercaseLiteralSuffixCheck.cpp [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
UppercaseLiteralSuffixCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UseAnyOfAllOfCheck.cpp attempt to fix build after add51e152a 2020-06-03 06:49:50 -04:00
UseAnyOfAllOfCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00