aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-04-26 11:47:03 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-04-26 12:18:14 +0000
commitcd78347b65cf3a4f4f516a9abb42b8b61f26fd03 (patch)
tree019a9e5579dd2d60a0a4202d0598600ac917f6a5
parent050471e40fc58cb5ea745701a43ec5b2b9586b81 (diff)
downloadComputeLibrary-cd78347b65cf3a4f4f516a9abb42b8b61f26fd03.tar.gz
COMPMID-1995: Update clang-tidy rules
Change-Id: I81db96471c3d5988546c6b0e64a736c1ea444822 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/1033 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--.clang-tidy436
1 files changed, 120 insertions, 316 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 7ee4757259..4d1313bd6f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,35 +1,67 @@
---
-Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cert-err58-cpp,-cppcoreguidelines-pro-type-reinterpret-cast,-google-runtime-references,-google-build-using-namespace,-readability-redundant-member-init,-readability-redundant-declaration,-readability-else-after-return,-performance-type-promotion-in-math-fn,-cert-err60-cpp'
+Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-abseil-*,-fuchsia-*,-bugprone-*,-hicpp-*,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cert-err58-cpp,-cppcoreguidelines-pro-type-reinterpret-cast,-google-runtime-references,-google-build-using-namespace,-readability-redundant-member-init,-readability-redundant-declaration,-readability-else-after-return,-performance-type-promotion-in-math-fn,-cert-err60-cpp,-cppcoreguidelines-narrowing-conversions,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-named-parameter,-readability-implicit-bool-conversion,-readability-uppercase-literal-suffix'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
-CheckOptions:
+CheckOptions:
+ - key: cert-dcl16-c.IgnoreMacros
+ value: '1'
+ - key: cert-dcl16-c.NewSuffixes
+ value: 'L;LL;LU;LLU'
- key: cert-dcl59-cpp.HeaderFileExtensions
- value: h,hh,hpp,hxx
+ value: ',h,hh,hpp,hxx'
- key: cert-err09-cpp.CheckThrowTemporaries
value: '1'
- key: cert-err61-cpp.CheckThrowTemporaries
value: '1'
+ - key: cert-msc32-c.DisallowedSeedTypes
+ value: 'time_t,std::time_t'
+ - key: cert-msc51-cpp.DisallowedSeedTypes
+ value: 'time_t,std::time_t'
- key: cert-oop11-cpp.IncludeStyle
value: llvm
- - key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
- value: ''
- - key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
+ - key: cppcoreguidelines-macro-usage.AllowedRegexp
+ value: '^DEBUG_*'
+ - key: cppcoreguidelines-macro-usage.CheckCapsOnly
value: '0'
+ - key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
+ value: '1'
+ - key: cppcoreguidelines-no-malloc.Allocations
+ value: '::malloc;::calloc'
+ - key: cppcoreguidelines-no-malloc.Deallocations
+ value: '::free'
+ - key: cppcoreguidelines-no-malloc.Reallocations
+ value: '::realloc'
+ - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
+ value: '1'
+ - key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
+ value: '::free;::realloc;::freopen;::fclose'
+ - key: cppcoreguidelines-owning-memory.LegacyResourceProducers
+ value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: '0'
+ - key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
+ value: '0'
+ - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
+ value: '0'
- key: google-build-namespaces.HeaderFileExtensions
- value: h,hh,hpp,hxx
+ value: ',h,hh,hpp,hxx'
- key: google-global-names-in-headers.HeaderFileExtensions
- value: h
+ value: ',h,hh,hpp,hxx'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.BranchThreshold
value: '4294967295'
- key: google-readability-function-size.LineThreshold
value: '4294967295'
+ - key: google-readability-function-size.NestingThreshold
+ value: '4294967295'
+ - key: google-readability-function-size.ParameterThreshold
+ value: '4294967295'
- key: google-readability-function-size.StatementThreshold
value: '800'
+ - key: google-readability-function-size.VariableThreshold
+ value: '4294967295'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
@@ -40,371 +72,143 @@ CheckOptions:
value: ''
- key: google-runtime-int.UnsignedTypePrefix
value: uint
- - key: google-runtime-references.WhiteListTypes
- value: ''
- - key: llvm-header-guard.HeaderFileExtensions
- value: ',h,hh,hpp,hxx'
- key: llvm-namespace-comment.ShortNamespaceLines
value: '1'
- key: llvm-namespace-comment.SpacesBeforeComments
value: '1'
- - key: misc-argument-comment.StrictMode
- value: '0'
- - key: misc-assert-side-effect.AssertMacros
- value: assert
- - key: misc-assert-side-effect.CheckFunctionCalls
- value: '0'
- - key: misc-dangling-handle.HandleClasses
- value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: misc-definitions-in-headers.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: misc-definitions-in-headers.UseHeaderFileExtension
value: '1'
- - key: misc-misplaced-widening-cast.CheckImplicitCasts
- value: '0'
- - key: misc-move-constructor-init.IncludeStyle
- value: llvm
- - key: misc-sizeof-expression.WarnOnSizeOfCompareToConstant
- value: '1'
- - key: misc-sizeof-expression.WarnOnSizeOfConstant
- value: '1'
- - key: misc-sizeof-expression.WarnOnSizeOfThis
- value: '1'
- - key: misc-string-constructor.LargeLengthThreshold
- value: '8388608'
- - key: misc-string-constructor.WarnOnLargeLength
- value: '1'
- - key: misc-suspicious-enum-usage.StrictMode
- value: '0'
- - key: misc-suspicious-missing-comma.MaxConcatenatedTokens
- value: '5'
- - key: misc-suspicious-missing-comma.RatioThreshold
- value: '0.200000'
- - key: misc-suspicious-missing-comma.SizeThreshold
- value: '5'
- - key: misc-suspicious-string-compare.StringCompareLikeFunctions
- value: ''
- - key: misc-suspicious-string-compare.WarnOnImplicitComparison
- value: '1'
- - key: misc-suspicious-string-compare.WarnOnLogicalNotComparison
- value: '0'
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
value: '1'
+ - key: misc-unused-parameters.StrictMode
+ value: '0'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
+ - key: modernize-make-shared.IgnoreMacros
+ value: '1'
+ - key: modernize-make-shared.IncludeStyle
+ value: '0'
+ - key: modernize-make-shared.MakeSmartPtrFunction
+ value: 'std::make_shared'
+ - key: modernize-make-shared.MakeSmartPtrFunctionHeader
+ value: memory
+ - key: modernize-make-unique.IgnoreMacros
+ value: '1'
+ - key: modernize-make-unique.IncludeStyle
+ value: '0'
+ - key: modernize-make-unique.MakeSmartPtrFunction
+ value: 'std::make_unique'
+ - key: modernize-make-unique.MakeSmartPtrFunctionHeader
+ value: memory
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-pass-by-value.ValuesOnly
value: '0'
+ - key: modernize-raw-string-literal.ReplaceShorterLiterals
+ value: '0'
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
+ - key: modernize-replace-random-shuffle.IncludeStyle
+ value: llvm
+ - key: modernize-use-auto.MinTypeNameLength
+ value: '5'
- key: modernize-use-auto.RemoveStars
value: '0'
+ - key: modernize-use-default-member-init.IgnoreMacros
+ value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '0'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
+ - key: modernize-use-emplace.TupleMakeFunctions
+ value: '::std::make_pair;::std::make_tuple'
+ - key: modernize-use-emplace.TupleTypes
+ value: '::std::pair;::std::tuple'
+ - key: modernize-use-equals-default.IgnoreMacros
+ value: '1'
+ - key: modernize-use-equals-delete.IgnoreMacros
+ value: '1'
+ - key: modernize-use-nodiscard.ReplacementString
+ value: '[[nodiscard]]'
+ - key: modernize-use-noexcept.ReplacementString
+ value: ''
+ - key: modernize-use-noexcept.UseNoexceptFalse
+ value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
+ - key: modernize-use-using.IgnoreMacros
+ value: '1'
+ - key: objc-forbidden-subclassing.ForbiddenSuperClassNames
+ value: 'ABNewPersonViewController;ABPeoplePickerNavigationController;ABPersonViewController;ABUnknownPersonViewController;NSHashTable;NSMapTable;NSPointerArray;NSPointerFunctions;NSTimer;UIActionSheet;UIAlertView;UIImagePickerController;UITextInputMode;UIWebView'
+ - key: objc-property-declaration.Acronyms
+ value: ''
+ - key: objc-property-declaration.IncludeDefaultAcronyms
+ value: '1'
- key: performance-faster-string-find.StringLikeClasses
value: 'std::basic_string'
+ - key: performance-for-range-copy.AllowedTypes
+ value: ''
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: '0'
- key: performance-inefficient-string-concatenation.StrictMode
value: '0'
- - key: performance-type-promotion-in-math-fn.IncludeStyle
+ - key: performance-inefficient-vector-operation.VectorLikeClasses
+ value: '::std::vector'
+ - key: performance-move-const-arg.CheckTriviallyCopyableMove
+ value: '1'
+ - key: performance-move-constructor-init.IncludeStyle
value: llvm
+ - key: performance-unnecessary-copy-initialization.AllowedTypes
+ value: ''
+ - key: performance-unnecessary-value-param.AllowedTypes
+ value: ''
- key: performance-unnecessary-value-param.IncludeStyle
value: llvm
+ - key: portability-simd-intrinsics.Std
+ value: ''
+ - key: portability-simd-intrinsics.Suggest
+ value: '0'
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
- key: readability-function-size.BranchThreshold
value: '4294967295'
- key: readability-function-size.LineThreshold
value: '4294967295'
+ - key: readability-function-size.NestingThreshold
+ value: '4294967295'
+ - key: readability-function-size.ParameterThreshold
+ value: '4294967295'
- key: readability-function-size.StatementThreshold
value: '800'
- - key: readability-identifier-naming.AbstractClassCase
- value: aNy_CasE
- - key: readability-identifier-naming.AbstractClassPrefix
- value: ''
- - key: readability-identifier-naming.AbstractClassSuffix
- value: ''
- - key: readability-identifier-naming.ClassCase
- value: aNy_CasE
- - key: readability-identifier-naming.ClassConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.ClassConstantPrefix
- value: ''
- - key: readability-identifier-naming.ClassConstantSuffix
- value: ''
- - key: readability-identifier-naming.ClassMemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.ClassMemberPrefix
- value: ''
- - key: readability-identifier-naming.ClassMemberSuffix
- value: ''
- - key: readability-identifier-naming.ClassMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.ClassMethodPrefix
- value: ''
- - key: readability-identifier-naming.ClassMethodSuffix
- value: ''
- - key: readability-identifier-naming.ClassPrefix
- value: ''
- - key: readability-identifier-naming.ClassSuffix
- value: ''
- - key: readability-identifier-naming.ConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstantMemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstantMemberPrefix
- value: ''
- - key: readability-identifier-naming.ConstantMemberSuffix
- value: ''
- - key: readability-identifier-naming.ConstantParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstantParameterPrefix
- value: ''
- - key: readability-identifier-naming.ConstantParameterSuffix
- value: ''
- - key: readability-identifier-naming.ConstantPrefix
- value: ''
- - key: readability-identifier-naming.ConstantSuffix
- value: ''
- - key: readability-identifier-naming.ConstexprFunctionCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstexprFunctionPrefix
- value: ''
- - key: readability-identifier-naming.ConstexprFunctionSuffix
- value: ''
- - key: readability-identifier-naming.ConstexprMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstexprMethodPrefix
- value: ''
- - key: readability-identifier-naming.ConstexprMethodSuffix
- value: ''
- - key: readability-identifier-naming.ConstexprVariableCase
- value: aNy_CasE
- - key: readability-identifier-naming.ConstexprVariablePrefix
- value: ''
- - key: readability-identifier-naming.ConstexprVariableSuffix
- value: ''
- - key: readability-identifier-naming.EnumCase
- value: aNy_CasE
- - key: readability-identifier-naming.EnumConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.EnumConstantPrefix
- value: ''
- - key: readability-identifier-naming.EnumConstantSuffix
- value: ''
- - key: readability-identifier-naming.EnumPrefix
- value: ''
- - key: readability-identifier-naming.EnumSuffix
- value: ''
- - key: readability-identifier-naming.FunctionCase
- value: aNy_CasE
- - key: readability-identifier-naming.FunctionPrefix
- value: ''
- - key: readability-identifier-naming.FunctionSuffix
- value: ''
- - key: readability-identifier-naming.GlobalConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.GlobalConstantPrefix
- value: ''
- - key: readability-identifier-naming.GlobalConstantSuffix
- value: ''
- - key: readability-identifier-naming.GlobalFunctionCase
- value: aNy_CasE
- - key: readability-identifier-naming.GlobalFunctionPrefix
- value: ''
- - key: readability-identifier-naming.GlobalFunctionSuffix
- value: ''
- - key: readability-identifier-naming.GlobalVariableCase
- value: aNy_CasE
- - key: readability-identifier-naming.GlobalVariablePrefix
- value: ''
- - key: readability-identifier-naming.GlobalVariableSuffix
- value: ''
+ - key: readability-function-size.VariableThreshold
+ value: '4294967295'
- key: readability-identifier-naming.IgnoreFailedSplit
value: '0'
- - key: readability-identifier-naming.InlineNamespaceCase
- value: aNy_CasE
- - key: readability-identifier-naming.InlineNamespacePrefix
- value: ''
- - key: readability-identifier-naming.InlineNamespaceSuffix
- value: ''
- - key: readability-identifier-naming.LocalConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.LocalConstantPrefix
- value: ''
- - key: readability-identifier-naming.LocalConstantSuffix
- value: ''
- - key: readability-identifier-naming.LocalVariableCase
- value: aNy_CasE
- - key: readability-identifier-naming.LocalVariablePrefix
- value: ''
- - key: readability-identifier-naming.LocalVariableSuffix
- value: ''
- - key: readability-identifier-naming.MacroDefinitionCase
- value: aNy_CasE
- - key: readability-identifier-naming.MacroDefinitionPrefix
- value: ''
- - key: readability-identifier-naming.MacroDefinitionSuffix
- value: ''
- - key: readability-identifier-naming.MemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.MemberPrefix
- value: ''
- - key: readability-identifier-naming.MemberSuffix
- value: ''
- - key: readability-identifier-naming.MethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.MethodPrefix
- value: ''
- - key: readability-identifier-naming.MethodSuffix
- value: ''
- - key: readability-identifier-naming.NamespaceCase
- value: aNy_CasE
- - key: readability-identifier-naming.NamespacePrefix
- value: ''
- - key: readability-identifier-naming.NamespaceSuffix
- value: ''
- - key: readability-identifier-naming.ParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.ParameterPackCase
- value: aNy_CasE
- - key: readability-identifier-naming.ParameterPackPrefix
- value: ''
- - key: readability-identifier-naming.ParameterPackSuffix
- value: ''
- - key: readability-identifier-naming.ParameterPrefix
- value: ''
- - key: readability-identifier-naming.ParameterSuffix
- value: ''
- - key: readability-identifier-naming.PrivateMemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.PrivateMemberPrefix
- value: ''
- - key: readability-identifier-naming.PrivateMemberSuffix
- value: ''
- - key: readability-identifier-naming.PrivateMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.PrivateMethodPrefix
- value: ''
- - key: readability-identifier-naming.PrivateMethodSuffix
- value: ''
- - key: readability-identifier-naming.ProtectedMemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.ProtectedMemberPrefix
- value: ''
- - key: readability-identifier-naming.ProtectedMemberSuffix
- value: ''
- - key: readability-identifier-naming.ProtectedMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.ProtectedMethodPrefix
- value: ''
- - key: readability-identifier-naming.ProtectedMethodSuffix
- value: ''
- - key: readability-identifier-naming.PublicMemberCase
- value: aNy_CasE
- - key: readability-identifier-naming.PublicMemberPrefix
- value: ''
- - key: readability-identifier-naming.PublicMemberSuffix
- value: ''
- - key: readability-identifier-naming.PublicMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.PublicMethodPrefix
- value: ''
- - key: readability-identifier-naming.PublicMethodSuffix
- value: ''
- - key: readability-identifier-naming.StaticConstantCase
- value: aNy_CasE
- - key: readability-identifier-naming.StaticConstantPrefix
- value: ''
- - key: readability-identifier-naming.StaticConstantSuffix
- value: ''
- - key: readability-identifier-naming.StaticVariableCase
- value: aNy_CasE
- - key: readability-identifier-naming.StaticVariablePrefix
- value: ''
- - key: readability-identifier-naming.StaticVariableSuffix
- value: ''
- - key: readability-identifier-naming.StructCase
- value: aNy_CasE
- - key: readability-identifier-naming.StructPrefix
- value: ''
- - key: readability-identifier-naming.StructSuffix
- value: ''
- - key: readability-identifier-naming.TemplateParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.TemplateParameterPrefix
- value: ''
- - key: readability-identifier-naming.TemplateParameterSuffix
- value: ''
- - key: readability-identifier-naming.TemplateTemplateParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.TemplateTemplateParameterPrefix
- value: ''
- - key: readability-identifier-naming.TemplateTemplateParameterSuffix
- value: ''
- - key: readability-identifier-naming.TypeAliasCase
- value: aNy_CasE
- - key: readability-identifier-naming.TypeAliasPrefix
- value: ''
- - key: readability-identifier-naming.TypeAliasSuffix
- value: ''
- - key: readability-identifier-naming.TypeTemplateParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.TypeTemplateParameterPrefix
- value: ''
- - key: readability-identifier-naming.TypeTemplateParameterSuffix
- value: ''
- - key: readability-identifier-naming.TypedefCase
- value: aNy_CasE
- - key: readability-identifier-naming.TypedefPrefix
- value: ''
- - key: readability-identifier-naming.TypedefSuffix
- value: ''
- - key: readability-identifier-naming.UnionCase
- value: aNy_CasE
- - key: readability-identifier-naming.UnionPrefix
- value: ''
- - key: readability-identifier-naming.UnionSuffix
- value: ''
- - key: readability-identifier-naming.ValueTemplateParameterCase
- value: aNy_CasE
- - key: readability-identifier-naming.ValueTemplateParameterPrefix
- value: ''
- - key: readability-identifier-naming.ValueTemplateParameterSuffix
- value: ''
- - key: readability-identifier-naming.VariableCase
- value: aNy_CasE
- - key: readability-identifier-naming.VariablePrefix
- value: ''
- - key: readability-identifier-naming.VariableSuffix
- value: ''
- - key: readability-identifier-naming.VirtualMethodCase
- value: aNy_CasE
- - key: readability-identifier-naming.VirtualMethodPrefix
- value: ''
- - key: readability-identifier-naming.VirtualMethodSuffix
- value: ''
- - key: readability-implicit-bool-cast.AllowConditionalIntegerCasts
- value: '0'
- - key: readability-implicit-bool-cast.AllowConditionalPointerCasts
+ - key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
+ value: '1'
+ - key: readability-inconsistent-declaration-parameter-name.Strict
value: '0'
+ - key: readability-redundant-smartptr-get.IgnoreMacros
+ value: '1'
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: '0'
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: '0'
+ - key: readability-simplify-subscript-expr.Types
+ value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
+ - key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
+ value: '3'
+ - key: zircon-temporary-objects.Names
+ value: ''
...