[clang-tools-extra] 4718da5 - [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 23 13:23:30 PST 2023
Author: Carlos Galvez
Date: 2023-01-23T21:23:16Z
New Revision: 4718da506091a37ca4863d979bc541e359b79b10
URL: https://github.com/llvm/llvm-project/commit/4718da506091a37ca4863d979bc541e359b79b10
DIFF: https://github.com/llvm/llvm-project/commit/4718da506091a37ca4863d979bc541e359b79b10.diff
LOG: [clang-tidy][NFC] Use C++17 nested namespaces in clang-tidy headers
We forgot to apply the change to headers in the previous patch,
due to missing "-header-filter" in the run-clang-tidy invocation.
Differential Revision: https://reviews.llvm.org/D142307
Added:
Modified:
clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
clang-tools-extra/clang-tidy/ClangTidyModule.h
clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h
clang-tools-extra/clang-tidy/ClangTidyOptions.h
clang-tools-extra/clang-tidy/ClangTidyProfiling.h
clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h
clang-tools-extra/clang-tidy/GlobList.h
clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h
clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.h
clang-tools-extra/clang-tidy/abseil/DurationAdditionCheck.h
clang-tools-extra/clang-tidy/abseil/DurationComparisonCheck.h
clang-tools-extra/clang-tidy/abseil/DurationConversionCastCheck.h
clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.h
clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.h
clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.h
clang-tools-extra/clang-tidy/abseil/DurationRewriter.h
clang-tools-extra/clang-tidy/abseil/DurationSubtractionCheck.h
clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h
clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.h
clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.h
clang-tools-extra/clang-tidy/abseil/NoNamespaceCheck.h
clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.h
clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.h
clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h
clang-tools-extra/clang-tidy/abseil/TimeComparisonCheck.h
clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h
clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h
clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.h
clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.h
clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.h
clang-tools-extra/clang-tidy/android/CloexecAccept4Check.h
clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h
clang-tools-extra/clang-tidy/android/CloexecCheck.h
clang-tools-extra/clang-tidy/android/CloexecCreatCheck.h
clang-tools-extra/clang-tidy/android/CloexecDupCheck.h
clang-tools-extra/clang-tidy/android/CloexecEpollCreate1Check.h
clang-tools-extra/clang-tidy/android/CloexecEpollCreateCheck.h
clang-tools-extra/clang-tidy/android/CloexecFopenCheck.h
clang-tools-extra/clang-tidy/android/CloexecInotifyInit1Check.h
clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h
clang-tools-extra/clang-tidy/android/CloexecMemfdCreateCheck.h
clang-tools-extra/clang-tidy/android/CloexecOpenCheck.h
clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h
clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h
clang-tools-extra/clang-tidy/android/CloexecSocketCheck.h
clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h
clang-tools-extra/clang-tidy/boost/UseToStringCheck.h
clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h
clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h
clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h
clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.h
clang-tools-extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.h
clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
clang-tools-extra/clang-tidy/bugprone/CopyConstructorInitCheck.h
clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.h
clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h
clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h
clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.h
clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.h
clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.h
clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.h
clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h
clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.h
clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.h
clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.h
clang-tools-extra/clang-tidy/bugprone/IntegerDivisionCheck.h
clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h
clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.h
clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.h
clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h
clang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.h
clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.h
clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.h
clang-tools-extra/clang-tidy/bugprone/MultipleStatementMacroCheck.h
clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.h
clang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.h
clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.h
clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h
clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.h
clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h
clang-tools-extra/clang-tidy/bugprone/SizeofContainerCheck.h
clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.h
clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h
clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.h
clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h
clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h
clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.h
clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h
clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.h
clang-tools-extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.h
clang-tools-extra/clang-tidy/bugprone/SwappedArgumentsCheck.h
clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.h
clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.h
clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.h
clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.h
clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.h
clang-tools-extra/clang-tidy/bugprone/UndelegatedConstructorCheck.h
clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.h
clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.h
clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.h
clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.h
clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h
clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.h
clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.h
clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h
clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.h
clang-tools-extra/clang-tidy/cert/FloatLoopCounter.h
clang-tools-extra/clang-tidy/cert/LimitedRandomnessCheck.h
clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.h
clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h
clang-tools-extra/clang-tidy/cert/PostfixOperatorCheck.h
clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h
clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
clang-tools-extra/clang-tidy/cert/StrToNumCheck.h
clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.h
clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/NoMallocCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.h
clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.h
clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h
clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.h
clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.h
clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
clang-tools-extra/clang-tidy/fuchsia/OverloadedOperatorCheck.h
clang-tools-extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.h
clang-tools-extra/clang-tidy/fuchsia/TrailingReturnCheck.h
clang-tools-extra/clang-tidy/fuchsia/VirtualInheritanceCheck.h
clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h
clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h
clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h
clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h
clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
clang-tools-extra/clang-tidy/google/FunctionNamingCheck.h
clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h
clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.h
clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
clang-tools-extra/clang-tidy/google/TodoCommentCheck.h
clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h
clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h
clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h
clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.h
clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.h
clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.h
clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h
clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.h
clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h
clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.h
clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.h
clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h
clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h
clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.h
clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.h
clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h
clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h
clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.h
clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.h
clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.h
clang-tools-extra/clang-tidy/misc/NoRecursionCheck.h
clang-tools-extra/clang-tidy/misc/NonCopyableObjects.h
clang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
clang-tools-extra/clang-tidy/misc/StaticAssertCheck.h
clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h
clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.h
clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.h
clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.h
clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h
clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h
clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.h
clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h
clang-tools-extra/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.h
clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h
clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.h
clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h
clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h
clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.h
clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.h
clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h
clang-tools-extra/clang-tidy/modernize/ReturnBracedInitListCheck.h
clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h
clang-tools-extra/clang-tidy/modernize/UnaryStaticAssertCheck.h
clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h
clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h
clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h
clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h
clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.h
clang-tools-extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.h
clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.h
clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.h
clang-tools-extra/clang-tidy/objc/AssertEquals.h
clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.h
clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h
clang-tools-extra/clang-tidy/objc/ForbiddenSubclassingCheck.h
clang-tools-extra/clang-tidy/objc/MissingHashCheck.h
clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.h
clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h
clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h
clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.h
clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.h
clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h
clang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h
clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.h
clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h
clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h
clang-tools-extra/clang-tidy/performance/NoAutomaticMoveCheck.h
clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.h
clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h
clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h
clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h
clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h
clang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.h
clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.h
clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h
clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.h
clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.h
clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h
clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h
clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h
clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.h
clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.h
clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.h
clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h
clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h
clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h
clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.h
clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h
clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h
clang-tools-extra/clang-tidy/readability/MisleadingIndentationCheck.h
clang-tools-extra/clang-tidy/readability/MisplacedArrayIndexCheck.h
clang-tools-extra/clang-tidy/readability/NamedParameterCheck.h
clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.h
clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.h
clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
clang-tools-extra/clang-tidy/readability/RedundantAccessSpecifiersCheck.h
clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.h
clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h
clang-tools-extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.h
clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h
clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.h
clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h
clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.h
clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.h
clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.h
clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h
clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.h
clang-tools-extra/clang-tidy/readability/StringCompareCheck.h
clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h
clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h
clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
clang-tools-extra/clang-tidy/tool/ClangTidyMain.h
clang-tools-extra/clang-tidy/utils/ASTUtils.h
clang-tools-extra/clang-tidy/utils/Aliasing.h
clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
clang-tools-extra/clang-tidy/utils/ExprSequence.h
clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
clang-tools-extra/clang-tidy/utils/FixItHintUtils.h
clang-tools-extra/clang-tidy/utils/HeaderGuard.h
clang-tools-extra/clang-tidy/utils/IncludeInserter.h
clang-tools-extra/clang-tidy/utils/IncludeSorter.h
clang-tools-extra/clang-tidy/utils/LexerUtils.h
clang-tools-extra/clang-tidy/utils/Matchers.h
clang-tools-extra/clang-tidy/utils/NamespaceAliaser.h
clang-tools-extra/clang-tidy/utils/OptionsUtils.h
clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h
clang-tools-extra/clang-tidy/utils/TypeTraits.h
clang-tools-extra/clang-tidy/utils/UsingInserter.h
clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.h
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
index 2691d90fa5216..adde9136ff1dd 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
@@ -12,8 +12,7 @@
#include "clang-tidy-config.h"
#include "llvm/Support/Compiler.h"
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
// This anchor is used to force the linker to link the AbseilModule.
extern volatile int AbseilModuleAnchorSource;
@@ -138,7 +137,6 @@ extern volatile int ZirconModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
ZirconModuleAnchorSource;
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
#endif
diff --git a/clang-tools-extra/clang-tidy/ClangTidyModule.h b/clang-tools-extra/clang-tidy/ClangTidyModule.h
index 9a7c1448b8126..0e55c1ef9dfea 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyModule.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyModule.h
@@ -15,8 +15,7 @@
#include <functional>
#include <memory>
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
class ClangTidyCheck;
class ClangTidyContext;
@@ -94,7 +93,6 @@ class ClangTidyModule {
virtual ClangTidyOptions getModuleOptions();
};
-} // end namespace tidy
-} // end namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
diff --git a/clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h b/clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h
index 891671a7d0822..30ffe1818431b 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h
@@ -12,12 +12,10 @@
#include "ClangTidyModule.h"
#include "llvm/Support/Registry.h"
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
typedef llvm::Registry<ClangTidyModule> ClangTidyModuleRegistry;
-} // end namespace tidy
-} // end namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULEREGISTRY_H
diff --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.h b/clang-tools-extra/clang-tidy/ClangTidyOptions.h
index 927371558d3bc..d0df474bc38e0 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyOptions.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.h
@@ -22,8 +22,7 @@
#include <utility>
#include <vector>
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
/// Contains a list of line ranges in a single file.
struct FileFilter {
@@ -328,7 +327,6 @@ parseConfigurationWithDiags(llvm::MemoryBufferRef Config, DiagCallback Handler);
/// Serializes configuration to a YAML-encoded string.
std::string configurationAsText(const ClangTidyOptions &Options);
-} // end namespace tidy
-} // end namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYOPTIONS_H
diff --git a/clang-tools-extra/clang-tidy/ClangTidyProfiling.h b/clang-tools-extra/clang-tidy/ClangTidyProfiling.h
index bf21659a502fb..b6f7d66343fa4 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyProfiling.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyProfiling.h
@@ -19,8 +19,7 @@ namespace llvm {
class raw_ostream;
} // namespace llvm
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
class ClangTidyProfiling {
public:
@@ -54,7 +53,6 @@ class ClangTidyProfiling {
~ClangTidyProfiling();
};
-} // end namespace tidy
-} // end namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYPROFILING_H
diff --git a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h
index 7585fd36673f8..91c3a62d2139d 100644
--- a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h
+++ b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h
@@ -13,12 +13,10 @@
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/DenseSet.h"
-namespace llvm {
-namespace vfs {
+namespace llvm::vfs {
class OverlayFileSystem;
class InMemoryFileSystem;
-} // namespace vfs
-} // namespace llvm
+} // namespace llvm::vfs
namespace clang {
class CompilerInstance;
diff --git a/clang-tools-extra/clang-tidy/GlobList.h b/clang-tools-extra/clang-tidy/GlobList.h
index 3eec92edaa695..44af182e43b00 100644
--- a/clang-tools-extra/clang-tidy/GlobList.h
+++ b/clang-tools-extra/clang-tidy/GlobList.h
@@ -15,8 +15,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Regex.h"
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
/// Read-only set of strings represented as a list of positive and negative
/// globs.
@@ -62,7 +61,6 @@ class CachedGlobList final : public GlobList {
mutable llvm::StringMap<bool> Cache;
};
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GLOBLIST_H
diff --git a/clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h b/clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h
index db9fd593283c7..e862195abaabb 100644
--- a/clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h
+++ b/clang-tools-extra/clang-tidy/NoLintDirectiveHandler.h
@@ -13,18 +13,15 @@
#include "llvm/ADT/StringRef.h"
#include <memory>
-namespace clang {
-namespace tooling {
+namespace clang::tooling {
struct Diagnostic;
-} // namespace tooling
-} // namespace clang
+} // namespace clang::tooling
namespace llvm {
template <typename T> class SmallVectorImpl;
} // namespace llvm
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
/// This class is used to locate NOLINT comments in the file being analyzed, to
/// decide whether a diagnostic should be suppressed.
@@ -45,7 +42,6 @@ class NoLintDirectiveHandler {
std::unique_ptr<Impl> PImpl;
};
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_NOLINTDIRECTIVEHANDLER_H
diff --git a/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h b/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
index 576cbc5711f4f..f15026ea50cb3 100644
--- a/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
+++ b/clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
@@ -10,8 +10,7 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <algorithm>
-namespace clang {
-namespace ast_matchers {
+namespace clang::ast_matchers {
/// Matches AST nodes that were found within Abseil files.
///
@@ -57,5 +56,4 @@ AST_POLYMORPHIC_MATCHER(
});
}
-} // namespace ast_matchers
-} // namespace clang
+} // namespace clang::ast_matchers
diff --git a/clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.h b/clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.h
index d8b94ebbdca94..5e2350e071bdf 100644
--- a/clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.h
@@ -11,9 +11,7 @@
#include "../utils/TransformerClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Suggests switching the initialization pattern of `absl::Cleanup`
/// instances from the factory function to class template argument
@@ -30,8 +28,6 @@ class CleanupCtadCheck : public utils::TransformerClangTidyCheck {
}
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_CLEANUPCTADCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationAdditionCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationAdditionCheck.h
index 7d2c73592a75c..7f6b652058cfd 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationAdditionCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationAdditionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Checks for cases where addition should be performed in the
/// ``absl::Time`` domain.
@@ -28,8 +26,6 @@ class DurationAdditionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEADDITIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationComparisonCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationComparisonCheck.h
index 378fa638bea90..d759e1d8bb789 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationComparisonCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationComparisonCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Prefer comparison in the absl::Duration domain instead of the numeric
/// domain.
@@ -28,8 +26,6 @@ class DurationComparisonCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCOMPARISONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationConversionCastCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationConversionCastCheck.h
index 5ead9ac4c70a1..fea9f703bae65 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationConversionCastCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationConversionCastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Checks for casts of ``absl::Duration`` conversion functions, and recommends
/// the right conversion function instead.
@@ -28,8 +26,6 @@ class DurationConversionCastCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCONVERSIONCASTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.h
index 3c2ff9fec6c1b..6b194e3d2664a 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
// Find potential incorrect uses of integer division of absl::Duration objects.
//
@@ -30,8 +28,6 @@ class DurationDivisionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONDIVISIONCHECK_H_
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.h
index 244671831e003..6394b3f2b4675 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// This check finds cases where `Duration` factories are being called with
/// floating point arguments, but could be called using integer arguments.
@@ -30,8 +28,6 @@ class DurationFactoryFloatCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYFLOATCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.h
index 251b4591d3964..40ffb30b4769c 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// This check finds cases where the incorrect `Duration` factory function is
/// being used by looking for scaling constants inside the factory argument
@@ -30,8 +28,6 @@ class DurationFactoryScaleCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYSCALECHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h
index c73418886a675..dc05b3fe3b55a 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationRewriter.h
@@ -14,9 +14,7 @@
#include <cinttypes>
#include <optional>
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Duration factory and conversion scales
enum class DurationScale : std::uint8_t {
@@ -135,8 +133,6 @@ AST_MATCHER_FUNCTION_P(ast_matchers::internal::Matcher<Stmt>,
hasEitherOperand(ignoringImpCasts(callExpr(callee(funcDecl)))));
}
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONREWRITER_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationSubtractionCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationSubtractionCheck.h
index bdded5e5b52be..17f7853adabd6 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationSubtractionCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationSubtractionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Checks for cases where subtraction should be performed in the
/// `absl::Duration` domain.
@@ -28,8 +26,6 @@ class DurationSubtractionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONSUBTRACTIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h
index 7dfdcea5d54ff..aa25c5f43e0f0 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds and fixes cases where ``absl::Duration`` values are being converted
/// to numeric types and back again.
@@ -28,8 +26,6 @@ class DurationUnnecessaryConversionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.h b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.h
index 764743da28597..b6caacd505c31 100644
--- a/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds instances of absl::StrSplit() or absl::MaxSplits() where the delimiter
/// is a single character string literal and replaces it with a character.
@@ -31,8 +29,6 @@ class FasterStrsplitDelimiterCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_FASTERSTRSPLITDELIMITERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.h b/clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.h
index fa6e4403e95f2..dfaa2cbf8f900 100644
--- a/clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds instances where the user depends on internal details and warns them
/// against doing so.
@@ -31,8 +29,6 @@ class NoInternalDependenciesCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NOINTERNALDEPSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/NoNamespaceCheck.h b/clang-tools-extra/clang-tidy/abseil/NoNamespaceCheck.h
index 626e15f0fc524..be56adad03bcf 100644
--- a/clang-tools-extra/clang-tidy/abseil/NoNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/NoNamespaceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// This check ensures users don't open namespace absl, as that violates
/// Abseil's compatibility guidelines.
@@ -31,8 +29,6 @@ class NoNamespaceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NONAMESPACECHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.h b/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.h
index f84ae3a35e457..04c7c9cb4b783 100644
--- a/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Flags redundant calls to absl::StrCat when the result is being passed to
/// another call of absl::StrCat/absl::StrAppend. Also suggests a fix to
@@ -34,8 +32,6 @@ class RedundantStrcatCallsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_REDUNDANTSTRCATCALLSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.h b/clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.h
index da97a455b51e7..22b55abfd83be 100644
--- a/clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Flags uses of absl::StrCat to append to a string. Suggests absl::StrAppend
/// should be used instead.
@@ -31,8 +29,6 @@ class StrCatAppendCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRCATAPPENDCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h b/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
index 39dd594e42429..923b5caece543 100644
--- a/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.h
@@ -17,9 +17,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
// Find string.find(...) == 0 comparisons and suggest replacing with StartsWith.
// FIXME(niko): Add similar check for EndsWith
@@ -40,8 +38,6 @@ class StringFindStartswithCheck : public ClangTidyCheck {
const StringRef AbseilStringsMatchHeader;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTARTSWITHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h b/clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h
index 67ebd6f172e10..68b827c5de0e1 100644
--- a/clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/TransformerClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds s.find(...) == string::npos comparisons (for various string-like
/// types) and suggests replacing with absl::StrContains.
@@ -32,8 +30,6 @@ class StringFindStrContainsCheck : public utils::TransformerClangTidyCheck {
const StringRef AbseilStringsMatchHeaderOption;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTRCONTAINSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/TimeComparisonCheck.h b/clang-tools-extra/clang-tidy/abseil/TimeComparisonCheck.h
index 03a249f8f884c..0c64708758b46 100644
--- a/clang-tools-extra/clang-tidy/abseil/TimeComparisonCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/TimeComparisonCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Prefer comparison in the `absl::Time` domain instead of the numeric
/// domain.
@@ -28,8 +26,6 @@ class TimeComparisonCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMECOMPARECHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h
index c35504e255d1d..7e7dc73511812 100644
--- a/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds and fixes `absl::Time` subtraction expressions to do subtraction
/// in the time domain instead of the numeric domain.
@@ -31,8 +29,6 @@ class TimeSubtractionCheck : public ClangTidyCheck {
void emitDiagnostic(const Expr* Node, llvm::StringRef Replacement);
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
index 844034db2e6ad..beb5479aa6aae 100644
--- a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
+++ b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
@@ -14,9 +14,7 @@
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseSet.h"
-namespace clang {
-namespace tidy {
-namespace abseil {
+namespace clang::tidy::abseil {
/// Finds deprecated uses of `absl::Duration` arithmetic operators and factories.
///
@@ -36,8 +34,6 @@ class UpgradeDurationConversionsCheck : public ClangTidyCheck {
llvm::DenseSet<SourceLocation> MatchedTemplateLocations;
};
-} // namespace abseil
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::abseil
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_UPGRADEDURATIONCONVERSIONSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h b/clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
index 2950340130f90..cf964a2d5d6f6 100644
--- a/clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
+++ b/clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace altera {
+namespace clang::tidy::altera {
/// Finds ID-dependent variables and fields used within loops, and warns of
/// their usage. Using these variables in loops can lead to performance
@@ -76,8 +74,6 @@ class IdDependentBackwardBranchCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace altera
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::altera
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_IDDEPENDENTBACKWARDBRANCHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h b/clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h
index 8dcf099346849..02d82f4d6891a 100644
--- a/clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h
+++ b/clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace altera {
+namespace clang::tidy::altera {
/// Finds kernel files and include directives whose filename is `kernel.cl`,
/// `Verilog.cl`, or `VHDL.cl`.
@@ -28,8 +26,6 @@ class KernelNameRestrictionCheck : public ClangTidyCheck {
Preprocessor *) override;
};
-} // namespace altera
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::altera
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_KERNEL_NAME_RESTRICTION_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.h b/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.h
index ea9b0a1243f35..62a055b094645 100644
--- a/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.h
+++ b/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace altera {
+namespace clang::tidy::altera {
/// Detects OpenCL kernel functions that call a barrier but do not call an
/// ID-function function. These functions will be treated as single work-item
@@ -33,8 +31,6 @@ class SingleWorkItemBarrierCheck : public ClangTidyCheck {
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
};
-} // namespace altera
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::altera
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_SINGLE_WORK_ITEM_BARRIER_H
diff --git a/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.h b/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.h
index 681ab79f8f4c6..f46d8e3b875a9 100644
--- a/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.h
+++ b/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace altera {
+namespace clang::tidy::altera {
/// Finds structs that are inefficiently packed or aligned, and recommends
/// packing and/or aligning of said structs as needed.
@@ -34,8 +32,6 @@ class StructPackAlignCheck : public ClangTidyCheck {
CharUnits computeRecommendedAlignment(CharUnits MinByteSize);
};
-} // namespace altera
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::altera
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_STRUCTPACKALIGNCHECK_H
diff --git a/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.h b/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.h
index 2fbd70931f616..e4bf7464c688e 100644
--- a/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.h
+++ b/clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace altera {
+namespace clang::tidy::altera {
/// Finds inner loops that have not been unrolled, as well as fully unrolled
/// loops with unknown loop bounds or a large number of iterations.
@@ -71,8 +69,6 @@ class UnrollLoopsCheck : public ClangTidyCheck {
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
};
-} // namespace altera
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::altera
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ALTERA_UNROLLLOOPSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecAccept4Check.h b/clang-tools-extra/clang-tidy/android/CloexecAccept4Check.h
index de266a5f22a52..a34d12041cf3c 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecAccept4Check.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecAccept4Check.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses accept4() without using the SOCK_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecAccept4Check : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT4_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h b/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h
index 4440df2ffec27..013fa5fa1725e 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// accept() is better to be replaced by accept4().
///
@@ -27,8 +25,6 @@ class CloexecAcceptCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_ACCEPT_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecCheck.h b/clang-tools-extra/clang-tidy/android/CloexecCheck.h
index 336ed56f5bf3f..edbff70fbd33e 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecCheck.h
@@ -17,9 +17,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// The base class for all close-on-exec checks in Android module.
/// To be specific, there are some functions that need the close-on-exec flag to
@@ -97,8 +95,6 @@ class CloexecCheck : public ClangTidyCheck {
static const char *FuncBindingStr;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecCreatCheck.h b/clang-tools-extra/clang-tidy/android/CloexecCreatCheck.h
index 8cdcd2e623f74..b1ab914d57d15 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecCreatCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecCreatCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// creat() is better to be replaced by open().
/// Find the usage of creat() and redirect user to use open().
@@ -27,8 +25,6 @@ class CloexecCreatCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_CREAT_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecDupCheck.h b/clang-tools-extra/clang-tidy/android/CloexecDupCheck.h
index fe4ccfa44847b..9554b7cf4ed8f 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecDupCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecDupCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// dup() is better to be replaced by fcntl(), which has close-on-exec flag.
/// Find the usage of dup() and redirect user to use fcntl().
@@ -28,8 +26,6 @@ class CloexecDupCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_DUP_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecEpollCreate1Check.h b/clang-tools-extra/clang-tidy/android/CloexecEpollCreate1Check.h
index e4560f829088c..b7912aba30962 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecEpollCreate1Check.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecEpollCreate1Check.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses epoll_create1() without using the EPOLL_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecEpollCreate1Check : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_EPOLL_CREATE1_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecEpollCreateCheck.h b/clang-tools-extra/clang-tidy/android/CloexecEpollCreateCheck.h
index 36d4376b2794d..1dbbcb1e98502 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecEpollCreateCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecEpollCreateCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// epoll_create() is better to be replaced by epoll_create1().
///
@@ -27,8 +25,6 @@ class CloexecEpollCreateCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_EPOLL_CREATE_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecFopenCheck.h b/clang-tools-extra/clang-tidy/android/CloexecFopenCheck.h
index 729a2f4e5c5e6..96517f55a5b55 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecFopenCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecFopenCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// fopen() is suggested to include "e" in their mode string; like "re" would be
/// better than "r".
@@ -30,8 +28,6 @@ class CloexecFopenCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_FOPEN_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecInotifyInit1Check.h b/clang-tools-extra/clang-tidy/android/CloexecInotifyInit1Check.h
index 5d6d07c2a9eb5..c87f1fdd956e4 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecInotifyInit1Check.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecInotifyInit1Check.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses inotify_init1() without using the IN_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecInotifyInit1Check : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT1_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h b/clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h
index 6f5dd87a99edd..1ef07de6cad54 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecInotifyInitCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// inotify_init() is better to be replaced by inotify_init1().
///
@@ -27,8 +25,6 @@ class CloexecInotifyInitCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_INOTIFY_INIT_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecMemfdCreateCheck.h b/clang-tools-extra/clang-tidy/android/CloexecMemfdCreateCheck.h
index 41ef7bc6d56cd..1518d20fd4c5c 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecMemfdCreateCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecMemfdCreateCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses memfd_create() without using the MFD_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecMemfdCreateCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_MEMFD_CREATE_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecOpenCheck.h b/clang-tools-extra/clang-tidy/android/CloexecOpenCheck.h
index eb3319c769c21..692d2a2319c1c 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecOpenCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecOpenCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that opens file without using the O_CLOEXEC flag.
///
@@ -32,8 +30,6 @@ class CloexecOpenCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_OPEN_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h b/clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h
index 1abae7f2d6cf2..68e5f4270ceb0 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecPipe2Check.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses pipe2() without using the O_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecPipe2Check : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE2_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h b/clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h
index 55fbf0079389c..b5ef892196b5a 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecPipeCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Suggests to replace calls to pipe() with calls to pipe2().
///
@@ -27,8 +25,6 @@ class CloexecPipeCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_PIPE_H
diff --git a/clang-tools-extra/clang-tidy/android/CloexecSocketCheck.h b/clang-tools-extra/clang-tidy/android/CloexecSocketCheck.h
index 9bff81cb6a2c7..c046337f1d229 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecSocketCheck.h
+++ b/clang-tools-extra/clang-tidy/android/CloexecSocketCheck.h
@@ -11,9 +11,7 @@
#include "CloexecCheck.h"
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Finds code that uses socket() without using the SOCK_CLOEXEC flag.
///
@@ -27,8 +25,6 @@ class CloexecSocketCheck : public CloexecCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_CLOEXEC_SOCKET_H
diff --git a/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h b/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h
index 2c45f2248678d..201c16fe70aa3 100644
--- a/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h
+++ b/clang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h
@@ -14,9 +14,7 @@
#include "llvm/ADT/StringRef.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace android {
+namespace clang::tidy::android {
/// Attempts to catch calls to TEMP_FAILURE_RETRY with a top-level comparison
/// operation, like `TEMP_FAILURE_RETRY(read(...) != N)`. In these cases, the
@@ -35,8 +33,6 @@ class ComparisonInTempFailureRetryCheck : public ClangTidyCheck {
SmallVector<StringRef, 5> RetryMacros;
};
-} // namespace android
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::android
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ANDROID_COMPARISONINTEMPFAILURERETRYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/boost/UseToStringCheck.h b/clang-tools-extra/clang-tidy/boost/UseToStringCheck.h
index 5b11e412d04cf..f62df83ed8e54 100644
--- a/clang-tools-extra/clang-tidy/boost/UseToStringCheck.h
+++ b/clang-tools-extra/clang-tidy/boost/UseToStringCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace boost {
+namespace clang::tidy::boost {
/// Finds calls to ``boost::lexical_cast<std::string>`` and
/// ``boost::lexical_cast<std::wstring>`` and replaces them with
@@ -32,8 +30,6 @@ class UseToStringCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace boost
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::boost
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BOOST_USE_TO_STRING_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h
index 0c66ffbdb3554..3d608df752c03 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/Support/Regex.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks that argument comments match parameter names.
///
@@ -58,8 +56,6 @@ class ArgumentCommentCheck : public ClangTidyCheck {
bool shouldAddComment(const Expr *Arg) const;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ARGUMENTCOMMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h b/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h
index 6b5dcf015ba62..5cd1132bbd839 100644
--- a/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h
@@ -14,9 +14,7 @@
#include "llvm/ADT/StringRef.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds `assert()` with side effect.
///
@@ -45,8 +43,6 @@ class AssertSideEffectCheck : public ClangTidyCheck {
const std::vector<StringRef> IgnoredFunctions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ASSERTSIDEEFFECTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h b/clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h
index ea116c73f8362..072b4dd79fe5d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/AssignmentInIfConditionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Catches assignments within the condition clause of an if statement.
///
@@ -28,8 +26,6 @@ class AssignmentInIfConditionCheck : public ClangTidyCheck {
void report(const Expr *AssignmentExpr);
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_ASSIGNMENTINIFCONDITIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.h b/clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.h
index f3f7f88c3c0eb..f21b8c09eb0c6 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds ``pthread_kill`` function calls when thread is terminated by
/// ``SIGTERM`` signal.
@@ -31,8 +29,6 @@ class BadSignalToKillThreadCheck : public ClangTidyCheck {
std::optional<unsigned> SigtermValue;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BADSIGNALTOKILLTHREADCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.h b/clang-tools-extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.h
index 2eed471134508..ef62e3d8b0fb1 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for conditions based on implicit conversion from a bool pointer to
/// bool.
@@ -34,8 +32,6 @@ class BoolPointerImplicitConversionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BOOLPOINTERIMPLICITCONVERSIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
index edee81b0665f6..03486cc40d876 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// A check for detecting if/else if/else chains where two or more branches are
/// Type I clones of each other (that is, they contain identical code), for
@@ -31,8 +29,6 @@ class BranchCloneCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BRANCHCLONECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/CopyConstructorInitCheck.h b/clang-tools-extra/clang-tidy/bugprone/CopyConstructorInitCheck.h
index 836f6e47e8b72..4aef892476c46 100644
--- a/clang-tools-extra/clang-tidy/bugprone/CopyConstructorInitCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/CopyConstructorInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds copy constructors where the ctor don't call the copy constructor of
/// the base class.
@@ -31,8 +29,6 @@ class CopyConstructorInitCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_COPY_CONSTRUCTOR_INIT_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.h b/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.h
index 0b11d8a65ed3c..3044304892029 100644
--- a/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Detect dangling references in value handlers like
/// std::experimental::string_view.
@@ -35,8 +33,6 @@ class DanglingHandleCheck : public ClangTidyCheck {
const ast_matchers::internal::Matcher<RecordDecl> IsAHandle;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_DANGLING_HANDLE_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h b/clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h
index 06c2f2acbbc86..b1385723ee149 100644
--- a/clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds dynamically initialized static variables in header files.
///
@@ -40,8 +38,6 @@ class DynamicStaticInitializersCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_DYNAMIC_STATIC_INITIALIZERS_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h b/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h
index 9e061b49bb5fb..055ae80dee8f3 100644
--- a/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds function definitions where parameters of convertible types follow
/// each other directly, making call sites prone to calling the function with
@@ -59,8 +57,6 @@ class EasilySwappableParametersCheck : public ClangTidyCheck {
const std::size_t NamePrefixSuffixSilenceDissimilarityTreshold;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_EASILYSWAPPABLEPARAMETERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.h b/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.h
index 5468c94b258de..14b9e8cc0a77f 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.h
@@ -13,9 +13,7 @@
#include "../utils/ExceptionAnalyzer.h"
#include "llvm/ADT/StringSet.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds functions which should not throw exceptions: Destructors, move
/// constructors, move assignment operators, the main() function,
@@ -42,8 +40,6 @@ class ExceptionEscapeCheck : public ClangTidyCheck {
utils::ExceptionAnalyzer Tracer;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_EXCEPTION_ESCAPE_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.h b/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.h
index 46024b91e3c1b..af8c1e50ef86c 100644
--- a/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/FoldInitTypeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find and flag invalid initializer values in folds, e.g. std::accumulate.
/// Example:
@@ -36,8 +34,6 @@ class FoldInitTypeCheck : public ClangTidyCheck {
const ASTContext &Context, const CallExpr &CallNode);
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FOLD_INIT_TYPE_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.h b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.h
index d580ffbd93ae0..266346960a141 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.h
@@ -14,9 +14,7 @@
#include <set>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks if an unused forward declaration is in a wrong namespace.
///
@@ -51,8 +49,6 @@ class ForwardDeclarationNamespaceCheck : public ClangTidyCheck {
llvm::SmallPtrSet<const Type *, 16> FriendTypes;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FORWARDDECLARATIONNAMESPACECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.h b/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.h
index f867c0c578b26..75297dbbdf41d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// The checker looks for constructors that can act as copy or move constructors
/// through their forwarding reference parameters. If a non const lvalue
@@ -37,8 +35,6 @@ class ForwardingReferenceOverloadCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_FORWARDINGREFERENCEOVERLOADCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h b/clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h
index ed68bb6cea767..8b99930ae7a89 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.h
@@ -13,9 +13,7 @@
#include "../utils/IncludeInserter.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Diagnoses instances of an implicit widening of multiplication result.
///
@@ -46,8 +44,6 @@ class ImplicitWideningOfMultiplicationResultCheck : public ClangTidyCheck {
utils::IncludeInserter IncludeInserter;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_IMPLICITWIDENINGOFMULTIPLICATIONRESULTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.h b/clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.h
index 76216109540ea..5bf29d04e4068 100644
--- a/clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for inaccurate use of the `erase()` method.
///
@@ -36,8 +34,6 @@ class InaccurateEraseCheck : public ClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INACCURATEERASECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.h b/clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.h
index 7b6f15be7b5f9..292cfbaa688f9 100644
--- a/clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/IncorrectRoundingsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks the usage of patterns known to produce incorrect rounding.
/// Programmers often use
@@ -31,8 +29,6 @@ class IncorrectRoundingsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INCORRECTROUNDINGSCHECK_H_
diff --git a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.h b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.h
index 77bbf3987953f..6d0c6d75f2262 100644
--- a/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds obvious infinite loops (loops where the condition variable is
/// not changed at all).
@@ -28,8 +26,6 @@ class InfiniteLoopCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INFINITELOOPCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/IntegerDivisionCheck.h b/clang-tools-extra/clang-tidy/bugprone/IntegerDivisionCheck.h
index 1d5d64b29063f..b74b206f07373 100644
--- a/clang-tools-extra/clang-tidy/bugprone/IntegerDivisionCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/IntegerDivisionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds cases where integer division in a floating point context is likely to
/// cause unintended loss of precision.
@@ -28,8 +26,6 @@ class IntegerDivisionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_INTEGER_DIVISION_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h b/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h
index 735585d20af07..03f1c4544aee1 100644
--- a/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Detect when __func__ or __FUNCTION__ is being used from within a lambda. In
/// that context, those expressions expand to the name of the call operator
@@ -44,8 +42,6 @@ class LambdaFunctionNameCheck : public ClangTidyCheck {
SourceRangeSet SuppressMacroExpansions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_LAMBDAFUNCTIONNAMECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.h b/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.h
index 8b6edaac9111d..47c18d8d60bdd 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds macros that can have unexpected behaviour due to missing parentheses.
///
@@ -36,8 +34,6 @@ class MacroParenthesesCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MACROPARENTHESESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.h b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.h
index 0189c7a624e24..a15b8d4671e1b 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for repeated argument with side effects in macros.
class MacroRepeatedSideEffectsCheck : public ClangTidyCheck {
@@ -24,8 +22,6 @@ class MacroRepeatedSideEffectsCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MACROREPEATEDSIDEEFFECTSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h
index fa2982c8f59b2..3a09ddb4a6c03 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds cases where ``1`` is added to the string in the argument to a function
/// in the ``strlen()`` family instead of the result and value is used as an
@@ -29,8 +27,6 @@ class MisplacedOperatorInStrlenInAllocCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MISPLACED_OPERATOR_IN_STRLEN_IN_ALLOC_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.h b/clang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.h
index ce0ec8b81f2f7..83cd0ddf3cc49 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds cases where an integer is added to or subracted from the result of a
/// memory allocation function instead of its argument.
@@ -29,8 +27,6 @@ class MisplacedPointerArithmeticInAllocCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MISPLACED_OPERATOR_IN_ALLOC_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.h b/clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.h
index 857c4d1090285..d03506838d07e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find casts of calculation results to bigger type. Typically from int to
/// long. If the intention of the cast is to avoid loss of precision then
@@ -38,8 +36,6 @@ class MisplacedWideningCastCheck : public ClangTidyCheck {
const bool CheckImplicitCasts;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif
diff --git a/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.h b/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.h
index 4c628bdc71d27..2bbafe716124b 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// The check warns if std::move is applied to a forwarding reference (i.e. an
/// rvalue reference of a function template argument type).
@@ -44,8 +42,6 @@ class MoveForwardingReferenceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MOVEFORWARDINGREFERENCECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/MultipleStatementMacroCheck.h b/clang-tools-extra/clang-tidy/bugprone/MultipleStatementMacroCheck.h
index d1d17c08e2413..626cddce6734c 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MultipleStatementMacroCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/MultipleStatementMacroCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Detect multiple statement macros that are used in unbraced conditionals.
/// Only the first statement of the macro will be inside the conditional and the
@@ -29,8 +27,6 @@ class MultipleStatementMacroCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_MULTIPLE_STATEMENT_MACRO_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h b/clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
index c6caee6aebe03..476c7749d6e04 100644
--- a/clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Block arguments in `dispatch_async()` and `dispatch_after()` are guaranteed
/// to escape. If those blocks capture any pointers with the `noescape`
@@ -32,8 +30,6 @@ class NoEscapeCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOESCAPECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.h b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.h
index b1c2c8682583d..caed870cd1ca5 100644
--- a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds function calls where it is possible to cause a not null-terminated
/// result. Usually the proper length of a string is 'strlen(src) + 1' or
@@ -60,8 +58,6 @@ class NotNullTerminatedResultCheck : public ClangTidyCheck {
const ast_matchers::MatchFinder::MatchResult &Result);
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.h b/clang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.h
index c40de5bb91e97..f552965e1876b 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds calls to grand..-parent virtual methods instead of parent's.
///
@@ -27,8 +25,6 @@ class ParentVirtualCallCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_PARENTVIRTUALCALLCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.h b/clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.h
index fe5c94c6ac7ca..254ae6c7f1acc 100644
--- a/clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
class PosixReturnCheck: public ClangTidyCheck {
public:
@@ -23,8 +21,6 @@ class PosixReturnCheck: public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_POSIX_RETURN_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h b/clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h
index 40e1898fd5eef..1dfab69db0a22 100644
--- a/clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds condition variables in nested `if` statements that were also checked
/// in the outer `if` statement and were not changed.
@@ -31,8 +29,6 @@ class RedundantBranchConditionCheck : public ClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_REDUNDANTBRANCHCONDITIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h b/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
index e92724a7acd79..e7a410119e579 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
@@ -14,9 +14,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for usages of identifiers reserved for use by the implementation.
///
@@ -50,8 +48,6 @@ class ReservedIdentifierCheck final : public RenamerClangTidyCheck {
const NamingCheckFailure &Failure) const override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_RESERVEDIDENTIFIERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
index 95b8e22588a50..3787eb345b857 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
@@ -11,9 +11,7 @@
#include "SmartPtrArrayMismatchCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find `std::shared_ptr<T>(new T[...])`, replace it (if applicable) with
/// `std::shared_ptr<T[]>(new T[...])`.
@@ -31,8 +29,6 @@ class SharedPtrArrayMismatchCheck : public SmartPtrArrayMismatchCheck {
SmartPtrClassMatcher getSmartPointerClassMatcher() const override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SHAREDPTRARRAYMISMATCHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.h b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.h
index 083e917696e7f..3573cdf49e1d1 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.h
@@ -14,9 +14,7 @@
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/StringSet.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checker for signal handler functions.
///
@@ -76,8 +74,6 @@ class SignalHandlerCheck : public ClangTidyCheck {
llvm::StringSet<> ConformingFunctions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIGNALHANDLERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h b/clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h
index 57340950084f0..42d6080736d30 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds those ``signed char`` -> integer conversions which might indicate a
/// programming error. The basic problem with the ``signed char``, that it might
@@ -41,8 +39,6 @@ class SignedCharMisuseCheck : public ClangTidyCheck {
const bool DiagnoseSignedUnsignedCharComparisons;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIGNEDCHARMISUSECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SizeofContainerCheck.h b/clang-tools-extra/clang-tidy/bugprone/SizeofContainerCheck.h
index b1c52bad94c55..7227c3d106f43 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SizeofContainerCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SizeofContainerCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find usages of sizeof on expressions of STL container types. Most likely the
/// user wanted to use `.size()` instead.
@@ -28,8 +26,6 @@ class SizeofContainerCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIZEOFCONTAINERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.h b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.h
index a9291c40640de..55becdd4ecdba 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find suspicious usages of sizeof expression.
///
@@ -34,8 +32,6 @@ class SizeofExpressionCheck : public ClangTidyCheck {
const bool WarnOnSizeOfPointerToAggregate;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SIZEOFEXPRESSIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h b/clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h
index 74b46eb7c216f..e9f1a6ac5a6a2 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find constructions of smart (unique or shared) pointers where the pointer
/// is declared with non-array target type and an array (created with a
@@ -45,8 +43,6 @@ class SmartPtrArrayMismatchCheck : public ClangTidyCheck {
StringRef const SmartPointerName;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SMARTPTRARRAYMISMATCHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.h b/clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.h
index 77f562726adb3..5e143411f9b6d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds ``cnd_wait``, ``cnd_timedwait``, ``wait``, ``wait_for``, or
/// ``wait_until`` function calls when the function is not invoked from a loop
@@ -30,8 +28,6 @@ class SpuriouslyWakeUpFunctionsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SPURIOUSLYWAKEUPFUNCTIONSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h b/clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h
index d4cb50e50e16a..6eaf3e40cb782 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for ignored calls to `empty()` on a range and suggests `clear()`
/// as an alternative if it is an existing member function.
@@ -31,8 +29,6 @@ class StandaloneEmptyCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STANDALONEEMPTYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h b/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h
index 5cbe28e4548b3..e90cf44b07680 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds suspicious string constructor and check their parameters.
///
@@ -36,8 +34,6 @@ class StringConstructorCheck : public ClangTidyCheck {
std::vector<StringRef> StringNames;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRING_CONSTRUCTOR_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.h b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.h
index de007ff82c53b..1e86fdfaa3a89 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds instances where an integer is assigned to a string.
///
@@ -30,8 +28,6 @@ class StringIntegerAssignmentCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGINTEGERASSIGNMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h
index 87f36c6b44ee7..85d172d835d21 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find suspicious string literals with embedded NUL characters.
///
@@ -27,8 +25,6 @@ class StringLiteralWithEmbeddedNulCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGLITERALWITHEMBEDDEDNULCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h b/clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h
index 41958fb1d0f6c..20757cbbaaf7a 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.h
@@ -11,9 +11,7 @@
#include "../utils/TransformerClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for various ways that the `const CharT*` constructor of
/// `std::basic_string_view` can be passed a null argument and replaces them
@@ -42,8 +40,6 @@ class StringviewNullptrCheck : public utils::TransformerClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_STRINGVIEWNULLPTRCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h
index 644f68dc7ac28..63c4bea6e5657 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// The checker detects various cases when an enum is probably misused (as a
/// bitmask).
@@ -34,8 +32,6 @@ class SuspiciousEnumUsageCheck : public ClangTidyCheck {
const bool StrictMode;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSENUMUSAGECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h
index 4fbb397d702fe..07edd85069f71 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Warns on inclusion of files whose names suggest that they're implementation
/// files, instead of headers. E.g:
@@ -50,8 +48,6 @@ class SuspiciousIncludeCheck : public ClangTidyCheck {
const StringRef RawStringImplementationFileExtensions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSINCLUDECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h
index c24837d3a13cc..5625739ef1327 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds potentially incorrect calls to ``memcmp()`` based on properties of the
/// arguments.
@@ -28,8 +26,6 @@ class SuspiciousMemoryComparisonCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSMEMORYCOMPARISONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h
index 0b77a541483f8..db2c09a86ddbd 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds memset calls with potential mistakes in their arguments.
///
@@ -30,8 +28,6 @@ class SuspiciousMemsetUsageCheck : public ClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUS_MEMSET_USAGE_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.h
index 324843350c341..215344b6bfe53 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// This check finds string literals which are probably concatenated
/// accidentally.
@@ -36,8 +34,6 @@ class SuspiciousMissingCommaCheck : public ClangTidyCheck {
const unsigned MaxConcatenatedTokens;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSMISSINGCOMMACHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h
index 150a7637c8859..2dcbd348697b4 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousReallocUsageCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds usages of ``realloc`` where the return value is assigned to the same
/// variable as passed to the first argument.
@@ -29,8 +27,6 @@ class SuspiciousReallocUsageCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSREALLOCUSAGECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.h
index 3dc926fe93f29..c97bfad665595 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// This check finds semicolon that modifies the meaning of the program
/// unintendedly.
@@ -28,8 +26,6 @@ class SuspiciousSemicolonCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSEMICOLONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.h b/clang-tools-extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.h
index ec936173795b8..c399c26786d89 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Find suspicious calls to string compare functions.
///
@@ -32,8 +30,6 @@ class SuspiciousStringCompareCheck : public ClangTidyCheck {
const StringRef StringCompareLikeFunctions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SUSPICIOUSSTRINGCOMPARECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/SwappedArgumentsCheck.h b/clang-tools-extra/clang-tidy/bugprone/SwappedArgumentsCheck.h
index 484972cc84b70..dcf57eca956f5 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SwappedArgumentsCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SwappedArgumentsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds potentially swapped arguments by looking at implicit conversions.
class SwappedArgumentsCheck : public ClangTidyCheck {
@@ -24,8 +22,6 @@ class SwappedArgumentsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_SWAPPEDARGUMENTSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.h b/clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.h
index 316ac2a5c8622..0593c7433c94e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/TerminatingContinueCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks if a 'continue' statement terminates the loop (i.e. the loop has
/// a condition which always evaluates to false).
@@ -28,8 +26,6 @@ class TerminatingContinueCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_TERMINATINGCONTINUECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.h b/clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.h
index 442caabe735d7..018dceb010c26 100644
--- a/clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Emits a warning about temporary objects whose type is (or is derived from) a
/// class that has 'EXCEPTION', 'Exception' or 'exception' in its name.
@@ -34,8 +32,6 @@ class ThrowKeywordMissingCheck : public ClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_THROWKEYWORDMISSINGCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.h b/clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.h
index 6b4f7fd36d405..03065e3a706a7 100644
--- a/clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// This check gives a warning if a loop variable has a too small type which
/// might not be able to represent all values which are part of the whole range
@@ -39,8 +37,6 @@ class TooSmallLoopVariableCheck : public ClangTidyCheck {
const unsigned MagnitudeBitsUpperLimit;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_TOOSMALLLOOPVARIABLECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.h b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.h
index 4e76e5992204b..2d1570f7df8ab 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.h
@@ -14,9 +14,7 @@
#include "clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Warns when the code is unwrapping a `std::optional<T>`, `absl::optional<T>`,
/// or `base::std::optional<T>` object without assuring that it contains a
@@ -44,8 +42,6 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
dataflow::UncheckedOptionalAccessModelOptions ModelOptions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNCHECKEDOPTIONALACCESSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.h b/clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.h
index 2b6da9ba5b465..1050d39130610 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds calls of memory manipulation functions ``memset()``, ``memcpy()`` and
/// ``memmove()`` on not TriviallyCopyable objects resulting in undefined
@@ -29,8 +27,6 @@ class UndefinedMemoryManipulationCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNDEFINED_MEMORY_MANIPULATION_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UndelegatedConstructorCheck.h b/clang-tools-extra/clang-tidy/bugprone/UndelegatedConstructorCheck.h
index 8b95f9c42e5cf..03cf5606ef529 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UndelegatedConstructorCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UndelegatedConstructorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds creation of temporary objects in constructors that look like a
/// function call to another constructor of the same class.
@@ -31,8 +29,6 @@ class UndelegatedConstructorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNDELEGATEDCONSTRUCTOR_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.h b/clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.h
index 4f6b49e7f0e3c..6e2c6aa373de7 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds calls to 'new' that may throw unhandled exception at allocation
/// failure.
@@ -31,8 +29,6 @@ class UnhandledExceptionAtNewCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNHANDLEDEXCEPTIONATNEWCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.h b/clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.h
index 2da37b20766b8..f666e6bfad2e6 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds user-defined copy assignment operators which do not protect the code
/// against self-assignment either by checking self-assignment explicitly or
@@ -36,8 +34,6 @@ class UnhandledSelfAssignmentCheck : public ClangTidyCheck {
const bool WarnOnlyIfThisHasSuspiciousField;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNHANDLEDSELFASSIGNMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.h b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.h
index 9a13fa277a1df..219fa07fe8265 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Finds temporaries that look like RAII objects.
///
@@ -33,8 +31,6 @@ class UnusedRaiiCheck : public ClangTidyCheck {
}
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNUSEDRAIICHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.h b/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.h
index 74255971a0b91..f16815b0f839e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Detects function calls where the return value is unused.
///
@@ -31,8 +29,6 @@ class UnusedReturnValueCheck : public ClangTidyCheck {
std::string CheckedFunctions;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNUSEDRETURNVALUECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h
index 3a825e2f206c6..c14e802847415 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// The check warns if an object is used after it has been moved, without an
/// intervening reinitialization.
@@ -31,8 +29,6 @@ class UseAfterMoveCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_USEAFTERMOVECHECK_H
diff --git a/clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.h b/clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.h
index 61091bf8b3e29..0d6b6db7f9a7f 100644
--- a/clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMap.h"
-namespace clang {
-namespace tidy {
-namespace bugprone {
+namespace clang::tidy::bugprone {
/// Checks for near miss of virtual methods.
///
@@ -60,8 +58,6 @@ class VirtualNearMissCheck : public ClangTidyCheck {
const unsigned EditDistanceThreshold = 1;
};
-} // namespace bugprone
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::bugprone
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_VIRTUAL_NEAR_MISS_H
diff --git a/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.h b/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.h
index 2e3ad905fc94b..1f9206cae73d7 100644
--- a/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/CommandProcessorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Execution of a command processor can lead to security vulnerabilities,
/// and is generally not required. Instead, prefer to launch executables
@@ -30,8 +28,6 @@ class CommandProcessorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_COMMAND_PROCESSOR_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h b/clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h
index e4f42cc7a6ec6..d38a9edb0f95d 100644
--- a/clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Checks if an object of type with extended alignment is allocated by using
/// the default operator new.
@@ -31,8 +29,6 @@ class DefaultOperatorNewAlignmentCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_DEFAULTOPERATORNEWALIGNMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.h b/clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.h
index 75d8fdddeb73c..d35affa0adc9c 100644
--- a/clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Modification of the std or posix namespace can result in undefined behavior.
/// This check warns for such modifications.
@@ -31,8 +29,6 @@ class DontModifyStdNamespaceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_DONT_MODIFY_STD_NAMESPACE_H
diff --git a/clang-tools-extra/clang-tidy/cert/FloatLoopCounter.h b/clang-tools-extra/clang-tidy/cert/FloatLoopCounter.h
index e3be23358f3df..7bc4422aef29b 100644
--- a/clang-tools-extra/clang-tidy/cert/FloatLoopCounter.h
+++ b/clang-tools-extra/clang-tidy/cert/FloatLoopCounter.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// This check diagnoses when the loop induction expression of a for loop has
/// floating-point type. The check corresponds to:
@@ -29,8 +27,6 @@ class FloatLoopCounter : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_FLOAT_LOOP_COUNTER_H
diff --git a/clang-tools-extra/clang-tidy/cert/LimitedRandomnessCheck.h b/clang-tools-extra/clang-tidy/cert/LimitedRandomnessCheck.h
index d9df9a4bbc54a..051e100e2cec8 100644
--- a/clang-tools-extra/clang-tidy/cert/LimitedRandomnessCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/LimitedRandomnessCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Pseudorandom number generators are not genuinely random. The result of the
/// std::rand() function makes no guarantees as to the quality of the random
@@ -30,8 +28,6 @@ class LimitedRandomnessCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_LIMITED_RANDOMNESS_H
diff --git a/clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.h b/clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.h
index eb0f8c65f6975..8cb7b8e5fa2ce 100644
--- a/clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Finds assignments to the copied object and its direct or indirect members
/// in copy constructors and copy assignment operators.
@@ -31,8 +29,6 @@ class MutatingCopyCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_MUTATINGCOPYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h b/clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h
index d3cc3644fe2e5..aecb37dd7c739 100644
--- a/clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/NonTrivialTypesLibcMemoryCallsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Flags use of the `C` standard library functions 'memset', 'memcpy' and
/// 'memcmp' and similar derivatives on non-trivial types.
@@ -37,8 +35,6 @@ class NonTrivialTypesLibcMemoryCallsCheck : public ClangTidyCheck {
const StringRef MemCmpNames;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_NONTRIVIALTYPESLIBCMEMORYCALLSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/PostfixOperatorCheck.h b/clang-tools-extra/clang-tidy/cert/PostfixOperatorCheck.h
index 5b84cf4ec7cd7..782b9a99ba413 100644
--- a/clang-tools-extra/clang-tidy/cert/PostfixOperatorCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/PostfixOperatorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Checks if the overloaded postfix ++ and -- operator return a constant
/// object.
@@ -31,8 +29,6 @@ class PostfixOperatorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_POSTFIX_OPERATOR_H
diff --git a/clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h b/clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h
index d71ab93d998ad..9f96c6124c6f0 100644
--- a/clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Random number generator must be seeded properly.
///
@@ -39,8 +37,6 @@ class ProperlySeededRandomGeneratorCheck : public ClangTidyCheck {
SmallVector<StringRef, 5> DisallowedSeedTypes;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_PROPERLY_SEEDED_RANDOM_GENERATOR_H
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
index b7f0d27307e08..6e5d8385d9428 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Guards against use of setjmp/longjmp in C++ code
///
@@ -32,8 +30,6 @@ class SetLongJmpCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SETLONGJMPCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
index 222603a7ffb38..26ae6b478b44d 100644
--- a/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/StaticObjectExceptionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Checks whether the constructor for a static or thread_local object will
/// throw.
@@ -31,8 +29,6 @@ class StaticObjectExceptionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_ERR58_CPP_H
diff --git a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.h b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.h
index a291021820795..5306bde77f2be 100644
--- a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Guards against use of string conversion functions that do not have
/// reasonable error handling for conversion errors.
@@ -28,8 +26,6 @@ class StrToNumCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_STRTONUMCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
index ac4e9300ca5b3..47469a1e82c7c 100644
--- a/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/ThrownExceptionTypeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Checks whether a thrown object is nothrow copy constructible.
///
@@ -30,8 +28,6 @@ class ThrownExceptionTypeCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_THROWNEXCEPTIONTYPECHECK_H
diff --git a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
index 0e10c5c78974e..a082e370c3228 100644
--- a/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
+++ b/clang-tools-extra/clang-tidy/cert/VariadicFunctionDefCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cert {
+namespace clang::tidy::cert {
/// Guards against any C-style variadic function definitions (not declarations).
///
@@ -30,8 +28,6 @@ class VariadicFunctionDefCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cert
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cert
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_VARIADICFUNCTIONDEF_H
diff --git a/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.h b/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.h
index 3d3646918cdf8..ccee5b3a748a3 100644
--- a/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.h
+++ b/clang-tools-extra/clang-tidy/concurrency/MtUnsafeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace concurrency {
+namespace clang::tidy::concurrency {
/// Checks that non-thread-safe functions are not used.
///
@@ -36,8 +34,6 @@ class MtUnsafeCheck : public ClangTidyCheck {
const FunctionSet FuncSet;
};
-} // namespace concurrency
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::concurrency
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CONCURRENCY_MTUNSAFECHECK_H
diff --git a/clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.h b/clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.h
index 2d08dd3ee0b8c..dbfcb265640c9 100644
--- a/clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.h
+++ b/clang-tools-extra/clang-tidy/concurrency/ThreadCanceltypeAsynchronousCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace concurrency {
+namespace clang::tidy::concurrency {
/// Finds ``pthread_setcanceltype`` function calls where a thread's
/// cancellation type is set to asynchronous.
@@ -27,8 +25,6 @@ class ThreadCanceltypeAsynchronousCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace concurrency
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::concurrency
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CONCURRENCY_THREADCANCELTYPEASYNCHRONOUSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h
index 7fd94aa7daa26..de55e0049eaf7 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Const-qualified or reference data members in classes should be avoided, as
/// they make the class non-copy-assignable.
@@ -31,8 +29,6 @@ class AvoidConstOrRefDataMembersCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDCONSTORREFDATAMEMBERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h
index 757842bf525bf..45259c23e26de 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// do-while loops are less readable than plan while loops, and can lead to
/// subtle bugs.
@@ -34,8 +32,6 @@ class AvoidDoWhileCheck : public ClangTidyCheck {
bool IgnoreMacros;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDDOWHILECHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.h
index fafa32876be8f..883ba78855e7c 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// The usage of ``goto`` for control flow is error prone and should be replaced
/// with looping constructs. Only forward jumps in nested loops are accepted.
@@ -31,8 +29,6 @@ class AvoidGotoCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDGOTOCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
index 4de6a1b5cc09f..e816ca9b47d41 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Non-const global variables hide dependencies and make the dependencies
/// subject to unpredictable changes.
@@ -28,8 +26,6 @@ class AvoidNonConstGlobalVariablesCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDNONCONSTGLOBALVARIABLESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h
index 502b5717893b3..0a4d5b33f2396 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidReferenceCoroutineParametersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Warns on coroutines that accept reference parameters. Accessing a reference
/// after a coroutine suspension point is not safe since the reference may no
@@ -33,8 +31,6 @@ class AvoidReferenceCoroutineParametersCheck : public ClangTidyCheck {
}
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDREFERENCECOROUTINEPARAMETERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
index 02256eb28a45d..901500ac4b915 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
@@ -13,9 +13,7 @@
#include "../utils/IncludeInserter.h"
#include "../utils/OptionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Find uninitialized local variables.
///
@@ -35,8 +33,6 @@ class InitVariablesCheck : public ClangTidyCheck {
const StringRef MathHeader;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_INITVARIABLESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h
index 2c387f40ed5d9..4b04ec112486b 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Flags possible initialization order issues of static variables.
///
@@ -27,8 +25,6 @@ class InterfacesGlobalInitCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_INTERFACES_GLOBAL_INIT_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.h
index 48b803a2a14f4..876a18256080e 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.h
@@ -15,8 +15,7 @@
namespace clang {
class MacroDirective;
-namespace tidy {
-namespace cppcoreguidelines {
+namespace tidy::cppcoreguidelines {
/// Find macro usage that is considered problematic because better language
/// constructs exist for the task.
@@ -48,8 +47,7 @@ class MacroUsageCheck : public ClangTidyCheck {
bool IgnoreCommandLineMacros;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
+} // namespace tidy::cppcoreguidelines
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_MACROUSAGECHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h
index d9e2ddd6113e2..1add40b91778a 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Checks for narrowing conversions, e.g:
/// int i = 0;
@@ -106,8 +104,6 @@ class NarrowingConversionsCheck : public ClangTidyCheck {
const bool PedanticMode;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NARROWING_CONVERSIONS_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/NoMallocCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/NoMallocCheck.h
index 634b926760c1f..8dea1465c3de7 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/NoMallocCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/NoMallocCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This checker is concerned with C-style memory management and suggest modern
/// alternatives to it.
@@ -56,8 +54,6 @@ class NoMallocCheck : public ClangTidyCheck {
const StringRef DeallocList;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NO_MALLOC_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.h
index e90076c47825a..4dd2f569d0f2e 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Checks for common use cases for gsl::owner and enforces the unique owner
/// nature of it whenever possible.
@@ -58,8 +56,6 @@ class OwningMemoryCheck : public ClangTidyCheck {
const StringRef LegacyResourceConsumers;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_OWNING_MEMORY_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h
index 9617a34b16305..7b39da1fd3c54 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Finds member initializations in the constructor body which can be placed
/// into the initialization list instead.
@@ -34,8 +32,6 @@ class PreferMemberInitializerCheck : public ClangTidyCheck {
const bool UseAssignment;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PREFERMEMBERINITIALIZERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
index 2126818ff253a..bcbe40b5dd14c 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This check flags all array to pointer decays
///
@@ -30,8 +28,6 @@ class ProBoundsArrayToPointerDecayCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_ARRAY_TO_POINTER_DECAY_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
index 1d07cea6825e9..a583cc78b2c54 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This checks that all array subscriptions on static arrays and std::arrays
/// have a constant index and are within bounds
@@ -37,8 +35,6 @@ class ProBoundsConstantArrayIndexCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_CONSTANT_ARRAY_INDEX_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
index 41afb8a61c69b..67f7d1bf9dd69 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Flags all kinds of pointer arithmetic that have result of pointer type, i.e.
/// +, -, +=, -=, ++, --. In addition, the [] operator on pointers (not on
@@ -29,8 +27,6 @@ class ProBoundsPointerArithmeticCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_POINTER_ARITHMETIC_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
index 9d477f22b0bd8..f7ae9bbb60dcd 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This check flags all instances of const_cast
///
@@ -30,8 +28,6 @@ class ProTypeConstCastCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CONST_CAST_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
index 18a68c8489dac..b7e3525e397b2 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This check flags all use of C-style casts that perform a static_cast
/// downcast, const_cast, or reinterpret_cast.
@@ -31,8 +29,6 @@ class ProTypeCstyleCastCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CSTYLE_CAST_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
index 3a5aebfcd09b0..cfe7c8735a0e0 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseSet.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Implements C++ Core Guidelines Type.6.
///
@@ -79,8 +77,6 @@ class ProTypeMemberInitCheck : public ClangTidyCheck {
llvm::DenseSet<const FieldDecl *> HasRecordClassMemberSet;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_MEMBER_INIT_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
index d8e103b7ed3a4..da001bfb85d78 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Flags all occurrences of reinterpret_cast
///
@@ -30,8 +28,6 @@ class ProTypeReinterpretCastCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_REINTERPRETCAST_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
index 2088a4892886f..33ec8a071c108 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Checks for usages of static_cast, where a base class is downcasted to a
/// derived class.
@@ -31,8 +29,6 @@ class ProTypeStaticCastDowncastCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_STATIC_CAST_DOWNCAST_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
index 0a40dc836f30a..e90d154f9630f 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This check flags all access to members of unions.
/// Access to a union as a whole (e.g. passing to a function) is not flagged.
@@ -31,8 +29,6 @@ class ProTypeUnionAccessCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_UNION_ACCESS_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
index 5e535d7d76ccf..acb3d274908da 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// This check flags all calls to c-style variadic functions and all use
/// of va_arg.
@@ -33,8 +31,6 @@ class ProTypeVarargCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_VARARG_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.h
index f6509321f4ac9..00f6e93fec200 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Flags slicing (incomplete copying of an object's state) of member variables
/// or vtable. See:
@@ -37,8 +35,6 @@ class SlicingCheck : public ClangTidyCheck {
const CXXRecordDecl &BaseDecl);
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_SLICING_H
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
index ff2b438ca7f34..8a5e7b14f3e7c 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/DenseMapInfo.h"
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Checks for classes where some, but not all, of the special member functions
/// are defined.
@@ -72,9 +70,7 @@ class SpecialMemberFunctionsCheck : public ClangTidyCheck {
ClassDefiningSpecialMembersMap ClassWithSpecialMembers;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
namespace llvm {
/// Specialization of DenseMapInfo to allow ClassDefId objects in DenseMaps
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.h
index 34c81df7b97b2..11bd598f81ac3 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace cppcoreguidelines {
+namespace clang::tidy::cppcoreguidelines {
/// Finds base classes whose destructor is neither public and virtual
/// nor protected and non-virtual.
@@ -34,8 +32,6 @@ class VirtualClassDestructorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace cppcoreguidelines
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::cppcoreguidelines
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_VIRTUALCLASSDESTRUCTORCHECK_H
diff --git a/clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.h b/clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.h
index f2286c73eb72f..727878b258b2c 100644
--- a/clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.h
+++ b/clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace darwin {
+namespace clang::tidy::darwin {
/// Finds usages of OSSpinlock, which is deprecated due to potential livelock
/// problems.
@@ -28,8 +26,6 @@ class AvoidSpinlockCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace darwin
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::darwin
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_DARWIN_AVOIDSPINLOCKCHECK_H
diff --git a/clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h b/clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h
index 12756c1f4ec8e..ddf6dfa22cf0a 100644
--- a/clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h
+++ b/clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace darwin {
+namespace clang::tidy::darwin {
/// Finds variables of type dispatch_once_t that do not have static or global
/// storage duration, as required by the libdispatch documentation.
@@ -28,8 +26,6 @@ class DispatchOnceNonstaticCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace darwin
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::darwin
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_DARWIN_DISPATCHONCENONSTATICCHECK_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.h b/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.h
index 97c1e6fb90365..49d7820d04410 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsCallsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Default arguments are not allowed in called functions.
///
@@ -27,8 +25,6 @@ class DefaultArgumentsCallsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_DEFAULT_ARGUMENTS_CALLS_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.h b/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.h
index a57fc6450c216..d03d0b7a10f05 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/DefaultArgumentsDeclarationsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Default parameters are not allowed in declared functions.
///
@@ -27,8 +25,6 @@ class DefaultArgumentsDeclarationsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_DEFAULT_ARGUMENTS_DECLARATIONS_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
index 3ce572db99a3b..be5942c9520ae 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Multiple implementation inheritance is discouraged.
///
@@ -43,8 +41,6 @@ class MultipleInheritanceCheck : public ClangTidyCheck {
llvm::StringMap<bool> InterfaceMap;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_MULTIPLE_INHERITANCE_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/OverloadedOperatorCheck.h b/clang-tools-extra/clang-tidy/fuchsia/OverloadedOperatorCheck.h
index f7388ce063f79..007f410a6eac6 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/OverloadedOperatorCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/OverloadedOperatorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Overloading operators is disallowed by the Fuchsia coding standard.
///
@@ -27,8 +25,6 @@ class OverloadedOperatorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_OVERLOADED_OPERATOR_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.h b/clang-tools-extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.h
index 19122f5877296..fc18273ad73b8 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Constructing global, non-trivial objects with static storage is
/// disallowed, unless the object is statically initialized with a constexpr
@@ -32,8 +30,6 @@ class StaticallyConstructedObjectsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_STATICALLY_CONSTRUCTED_OBJECTS_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/TrailingReturnCheck.h b/clang-tools-extra/clang-tidy/fuchsia/TrailingReturnCheck.h
index 951396adae290..2ba8e27d00bfd 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/TrailingReturnCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/TrailingReturnCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Functions that have trailing returns are disallowed, except for those
/// using decltype specifiers and lambda with otherwise unutterable
@@ -32,8 +30,6 @@ class TrailingReturnCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_TRAILING_RETURN_H
diff --git a/clang-tools-extra/clang-tidy/fuchsia/VirtualInheritanceCheck.h b/clang-tools-extra/clang-tidy/fuchsia/VirtualInheritanceCheck.h
index f5ebd396ba5ca..d109bd52a1a66 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/VirtualInheritanceCheck.h
+++ b/clang-tools-extra/clang-tidy/fuchsia/VirtualInheritanceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace fuchsia {
+namespace clang::tidy::fuchsia {
/// Defining classes with virtual inheritance is disallowed.
///
@@ -27,8 +25,6 @@ class VirtualInheritanceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace fuchsia
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::fuchsia
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_FUCHSIA_VIRTUAL_INHERITANCE_H
diff --git a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
index 2665f032b5e18..485640d230280 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
+++ b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace readability {
+namespace clang::tidy::google::readability {
/// Finds usages of C-style casts.
///
@@ -36,9 +33,6 @@ class AvoidCStyleCastsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_AVOIDCSTYLECASTSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h b/clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h
index 940069a0d41c2..37b9440396948 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h
+++ b/clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace objc {
+namespace clang::tidy::google::objc {
/// This check finds Objective-C code that uses +new to create object instances,
/// or overrides +new in classes. Both are forbidden by Google's Objective-C
@@ -33,9 +30,6 @@ class AvoidNSObjectNewCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_AVOIDNSOBJECTNEWCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h b/clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h
index dfba4ce53d204..f8b191a376204 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h
+++ b/clang-tools-extra/clang-tidy/google/AvoidThrowingObjCExceptionCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace objc {
+namespace clang::tidy::google::objc {
/// The check is to find usage of @throw invocation in Objective-C code.
/// We should avoid using @throw for Objective-C exceptions according to
@@ -33,9 +30,6 @@ class AvoidThrowingObjCExceptionCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OBJC_AVOID_THROWING_EXCEPTION_H
diff --git a/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h b/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h
index b1f597a40a97c..baec40e440cbd 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h
+++ b/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace readability {
+namespace clang::tidy::google::readability {
// Check for underscores in the names of googletest tests, per
// https://google.github.io/googletest/faq.html#why-should-test-suite-names-and-test-names-not-contain-underscore
@@ -29,9 +26,6 @@ class AvoidUnderscoreInGoogletestNameCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace readability
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_AVOIDUNDERSCOREINGOOGLETESTNAMECHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h b/clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
index 3fbbc07383df3..a8f0b0112fb94 100644
--- a/clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
+++ b/clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
+namespace clang::tidy::google {
/// Checks that default parameters are not given for virtual methods.
///
@@ -29,8 +27,6 @@ class DefaultArgumentsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_DEFAULT_ARGUMENTS_H
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h
index ccfa80169b9a3..e4434ac71d786 100644
--- a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h
+++ b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
+namespace clang::tidy::google {
/// Checks that all single-argument constructors are explicit.
///
@@ -32,8 +30,6 @@ class ExplicitConstructorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_EXPLICITCONSTRUCTORCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h b/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
index 4d78624727947..2c796a2811314 100644
--- a/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
+++ b/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace build {
+namespace clang::tidy::google::build {
/// Check that `make_pair`'s template arguments are deduced.
///
@@ -36,9 +33,6 @@ class ExplicitMakePairCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace build
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::build
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_EXPLICITMAKEPAIRCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.h b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.h
index 540b8955f9895..560bb52f15a00 100644
--- a/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.h
+++ b/clang-tools-extra/clang-tidy/google/FunctionNamingCheck.h
@@ -12,10 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/StringRef.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace objc {
+namespace clang::tidy::google::objc {
/// Finds function names that do not conform to the recommendations of the
/// Google Objective-C Style Guide. Function names should be in upper camel case
@@ -37,9 +34,6 @@ class FunctionNamingCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OBJC_FUNCTION_NAMING_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h
index bca146912fc10..a152e2c3606b3 100644
--- a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h
+++ b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h
@@ -12,10 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace readability {
+namespace clang::tidy::google::readability {
/// Flag global namespace pollution in header files.
/// Right now it only triggers on using declarations and directives.
@@ -42,9 +39,6 @@ class GlobalNamesInHeadersCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace readability
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_GLOBALNAMESINHEADERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.h b/clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.h
index c9a27d5774975..550224b26d140 100644
--- a/clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.h
+++ b/clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace objc {
+namespace clang::tidy::google::objc {
/// The check for Objective-C global variables and constants naming convention.
/// The declaration should follow the patterns of 'k[A-Z].*' (constants) or
@@ -33,9 +30,6 @@ class GlobalVariableDeclarationCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OBJC_GLOBAL_VARIABLE_DECLARATION_H
diff --git a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
index d2231677c0c86..e7c3f659bf385 100644
--- a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
+++ b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
@@ -17,9 +17,7 @@ namespace clang {
class IdentifierTable;
-namespace tidy {
-namespace google {
-namespace runtime {
+namespace tidy::google::runtime {
/// Finds uses of `short`, `long` and `long long` and suggest replacing them
/// with `u?intXX(_t)?`.
@@ -46,9 +44,7 @@ class IntegerTypesCheck : public ClangTidyCheck {
std::unique_ptr<IdentifierTable> IdentTable;
};
-} // namespace runtime
-} // namespace google
-} // namespace tidy
+} // namespace tidy::google::runtime
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_INTEGERTYPESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
index ba87b68a25db1..3c3b668754ac1 100644
--- a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
+++ b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace runtime {
+namespace clang::tidy::google::runtime {
/// Finds overloads of unary `operator &`.
///
@@ -35,9 +32,6 @@ class OverloadedUnaryAndCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace runtime
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::runtime
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OVERLOADEDUNARYANDCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/TodoCommentCheck.h b/clang-tools-extra/clang-tidy/google/TodoCommentCheck.h
index 23bc798a1f1c1..de540d810afaa 100644
--- a/clang-tools-extra/clang-tidy/google/TodoCommentCheck.h
+++ b/clang-tools-extra/clang-tidy/google/TodoCommentCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace readability {
+namespace clang::tidy::google::readability {
/// Finds TODO comments without a username or bug number.
///
@@ -35,9 +32,6 @@ class TodoCommentCheck : public ClangTidyCheck {
std::unique_ptr<TodoCommentHandler> Handler;
};
-} // namespace readability
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_TODOCOMMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h b/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
index ff4fd6b4145f7..ac26746a4711d 100644
--- a/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
+++ b/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
@@ -12,10 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace build {
+namespace clang::tidy::google::build {
/// Finds anonymous namespaces in headers.
///
@@ -48,9 +45,6 @@ class UnnamedNamespaceInHeaderCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace build
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::build
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_UNNAMEDNAMESPACEINHEADERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h
index 3866fdc0b346a..61b09b9a9f7de 100644
--- a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h
+++ b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
+namespace clang::tidy::google {
/// Finds uses of deprecated Googletest APIs with names containing "case" and
/// replaces them with equivalent names containing "suite".
@@ -36,8 +34,6 @@ class UpgradeGoogletestCaseCheck : public ClangTidyCheck {
llvm::DenseSet<SourceLocation> MatchedTemplateLocations;
};
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_UPGRADEGOOGLETESTCASECHECK_H
diff --git a/clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h b/clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h
index 779bb469fdddc..b7abac1311045 100644
--- a/clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h
+++ b/clang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h
@@ -11,10 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace google {
-namespace build {
+namespace clang::tidy::google::build {
/// Finds using namespace directives.
///
@@ -48,9 +45,6 @@ class UsingNamespaceDirectiveCheck : public ClangTidyCheck {
static bool isStdLiteralsNamespace(const NamespaceDecl *NS);
};
-} // namespace build
-} // namespace google
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::google::build
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_USINGNAMESPACEDIRECTIVECHECK_H
diff --git a/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h b/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h
index 144c1f06d66ea..036db35a2290b 100644
--- a/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h
+++ b/clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace hicpp {
+namespace clang::tidy::hicpp {
/// Check for thrown exceptions and enforce they are all derived from std::exception.
///
@@ -30,8 +28,6 @@ class ExceptionBaseclassCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace hicpp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::hicpp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_EXCEPTION_BASECLASS_H
diff --git a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.h b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.h
index fb3a34200ccbe..c26fb3e72211d 100644
--- a/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.h
+++ b/clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace hicpp {
+namespace clang::tidy::hicpp {
/// Find occasions where not all codepaths are explicitly covered in code.
/// This includes 'switch' without a 'default'-branch and 'if'-'else if'-chains
@@ -41,8 +39,6 @@ class MultiwayPathsCoveredCheck : public ClangTidyCheck {
const bool WarnOnMissingElse;
};
-} // namespace hicpp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::hicpp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H
diff --git a/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.h b/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.h
index 8f4f140bd9d6d..7ade7a33091f1 100644
--- a/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.h
+++ b/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace hicpp {
+namespace clang::tidy::hicpp {
/// Find assembler statements. No fix is offered.
///
@@ -27,8 +25,6 @@ class NoAssemblerCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace hicpp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::hicpp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H
diff --git a/clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.h b/clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.h
index 71e4e0c37e908..5a18d3295318f 100644
--- a/clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.h
+++ b/clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace hicpp {
+namespace clang::tidy::hicpp {
/// This check implements the rule 5.6.1 of the HICPP Standard, which disallows
/// bitwise operations on signed integer types.
@@ -31,8 +29,6 @@ class SignedBitwiseCheck : public ClangTidyCheck {
bool IgnorePositiveIntegerLiterals;
};
-} // namespace hicpp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::hicpp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_SIGNED_BITWISE_H
diff --git a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
index b81dd6cbe71c2..f08fed4798392 100644
--- a/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
+++ b/clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace linuxkernel {
+namespace clang::tidy::linuxkernel {
/// Checks Linux kernel code to see if it uses the results from the functions in
/// linux/err.h. Also checks to see if code uses the results from functions that
@@ -36,8 +34,6 @@ class MustCheckErrsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace linuxkernel
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::linuxkernel
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LINUXKERNEL_MUSTCHECKERRSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h b/clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h
index 08ab30e55e31f..93acfb3ad2e2f 100644
--- a/clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h
+++ b/clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.h
@@ -11,9 +11,7 @@
#include "../utils/HeaderGuard.h"
-namespace clang {
-namespace tidy {
-namespace llvm_check {
+namespace clang::tidy::llvm_check {
/// Finds and fixes header guards that do not adhere to LLVM style.
/// For the user-facing documentation see:
@@ -33,8 +31,6 @@ class LLVMHeaderGuardCheck : public utils::HeaderGuardCheck {
std::string getHeaderGuard(StringRef Filename, StringRef OldGuard) override;
};
-} // namespace llvm_check
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_check
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_HEADERGUARDCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.h b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.h
index 930fa90be31f2..d992d151734ce 100644
--- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.h
+++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_check {
+namespace clang::tidy::llvm_check {
/// Checks the correct order of `#includes`.
///
@@ -26,8 +24,6 @@ class IncludeOrderCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace llvm_check
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_check
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_INCLUDEORDERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h b/clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h
index 601a859d0c086..dd9c5fec6af54 100644
--- a/clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h
+++ b/clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_check {
+namespace clang::tidy::llvm_check {
/// Looks at conditionals and finds and replaces cases of ``cast<>``, which will
/// assert rather than return a null pointer, and ``dyn_cast<>`` where
@@ -60,8 +58,6 @@ class PreferIsaOrDynCastInConditionalsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace llvm_check
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_check
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_PREFERISAORDYNCASTINCONDITIONALSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.h b/clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.h
index f5918fa00bd18..1099ab0cd0e44 100644
--- a/clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.h
+++ b/clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_check {
+namespace clang::tidy::llvm_check {
/// Historically, LLVM has used `unsigned` to represent registers. Since then
/// a `Register` object has been introduced for improved type-safety and make
@@ -29,8 +27,6 @@ class PreferRegisterOverUnsignedCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace llvm_check
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_check
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_PREFERREGISTEROVERUNSIGNEDCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.h b/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.h
index e6356263480af..e1f25e530289a 100644
--- a/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.h
+++ b/clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_check {
+namespace clang::tidy::llvm_check {
/// Looks for local `Twine` variables which are prone to use after frees and
/// should be generally avoided.
@@ -25,8 +23,6 @@ class TwineLocalCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace llvm_check
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_check
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_TWINELOCALCHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h b/clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h
index e19f8f5e8edea..e718c990c4baa 100644
--- a/clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_libc {
+namespace clang::tidy::llvm_libc {
/// Checks all calls resolve to functions within __llvm_libc namespace.
///
@@ -31,8 +29,6 @@ class CalleeNamespaceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace llvm_libc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_libc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVMLIBC_CALLEENAMESPACECHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h b/clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h
index d9753c81f3d2a..42da38f728bb8 100644
--- a/clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_libc {
+namespace clang::tidy::llvm_libc {
/// Checks all llvm-libc implementation is within the correct namespace.
///
@@ -31,8 +29,6 @@ class ImplementationInNamespaceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace llvm_libc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_libc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVMLIBC_IMPLEMENTATIONINNAMESPACECHECK_H
diff --git a/clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.h b/clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.h
index a3701cf46c395..f7e613cec5f0e 100644
--- a/clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.h
+++ b/clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../portability/RestrictSystemIncludesCheck.h"
-namespace clang {
-namespace tidy {
-namespace llvm_libc {
+namespace clang::tidy::llvm_libc {
/// Warns of accidental inclusions of system libc headers that aren't
/// compiler provided.
@@ -30,8 +28,6 @@ class RestrictSystemLibcHeadersCheck
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace llvm_libc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::llvm_libc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVMLIBC_RESTRICTSYSTEMLIBCHEADERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.h b/clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.h
index 4e166c44b4b56..b656696ef9590 100644
--- a/clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds symbol which have confusable identifiers, i.e. identifiers that look
/// the same visually but have a
diff erent Unicode representation.
@@ -33,8 +31,6 @@ class ConfusableIdentifierCheck : public ClangTidyCheck {
llvm::StringMap<llvm::SmallVector<const NamedDecl *>> Mapper;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_CONFUSABLE_IDENTIFIER_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h b/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
index 81ab07321a1d9..08ffde524522a 100644
--- a/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
@@ -13,10 +13,7 @@
#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h"
#include "llvm/ADT/DenseSet.h"
-namespace clang {
-namespace tidy {
-
-namespace misc {
+namespace clang::tidy::misc {
/// This check warns on variables which could be declared const but are not.
///
@@ -50,8 +47,6 @@ class ConstCorrectnessCheck : public ClangTidyCheck {
const bool TransformPointersAsValues;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_CONSTCORRECTNESSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h
index 9c5634109ad8f..db32cabc95642 100644
--- a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds non-extern non-inline function and variable definitions in header
/// files, which can lead to potential ODR violations.
@@ -47,8 +45,6 @@ class DefinitionsInHeadersCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DEFINITIONS_IN_HEADERS_H
diff --git a/clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h b/clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h
index 18e7060197a5d..9ffb238aeee35 100644
--- a/clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h
+++ b/clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
class MisleadingBidirectionalCheck : public ClangTidyCheck {
public:
@@ -31,8 +29,6 @@ class MisleadingBidirectionalCheck : public ClangTidyCheck {
std::unique_ptr<MisleadingBidirectionalHandler> Handler;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISLEADINGBIDIRECTIONALCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.h b/clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.h
index 9580ae6252714..7278b741246a3 100644
--- a/clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.h
+++ b/clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
class MisleadingIdentifierCheck : public ClangTidyCheck {
public:
@@ -24,8 +22,6 @@ class MisleadingIdentifierCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISLEADINGIDENTIFIERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.h b/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.h
index 58288c24f0c6a..b2d88d41b5e31 100644
--- a/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// This check diagnoses when a const qualifier is applied to a typedef to a
/// pointer type rather than to the pointee.
@@ -28,8 +26,6 @@ class MisplacedConstCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISPLACED_CONST_H
diff --git a/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.h b/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.h
index a636d1f5514ac..b11a57aebb107 100644
--- a/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/SmallVector.h"
#include <map>
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
class NewDeleteOverloadsCheck : public ClangTidyCheck {
std::map<const clang::CXXRecordDecl *,
@@ -33,8 +31,6 @@ class NewDeleteOverloadsCheck : public ClangTidyCheck {
void onEndOfTranslationUnit() override;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H
diff --git a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.h b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.h
index 106e4dfe40773..fd82ffc6e5aba 100644
--- a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.h
@@ -15,8 +15,7 @@ namespace clang {
class CallGraphNode;
-namespace tidy {
-namespace misc {
+namespace tidy::misc {
/// Finds strongly connected functions (by analyzing call graph for SCC's
/// that are loops), diagnoses each function in the cycle,
@@ -35,8 +34,7 @@ class NoRecursionCheck : public ClangTidyCheck {
void handleSCC(ArrayRef<CallGraphNode *> SCC);
};
-} // namespace misc
-} // namespace tidy
+} // namespace tidy::misc
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NORECURSIONCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/NonCopyableObjects.h b/clang-tools-extra/clang-tidy/misc/NonCopyableObjects.h
index 6529fddfd688e..b886ea948476d 100644
--- a/clang-tools-extra/clang-tidy/misc/NonCopyableObjects.h
+++ b/clang-tools-extra/clang-tidy/misc/NonCopyableObjects.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// The check flags dereferences and non-pointer declarations of objects that
/// are not meant to be passed by value, such as C FILE objects.
@@ -25,8 +23,6 @@ class NonCopyableObjectsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONCOPYABLEOBJECTS_H
diff --git a/clang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h b/clang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
index 95659d0461c5f..5f0687abdd118 100644
--- a/clang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// This checker finds classes that not only contain the data
/// (non-static member variables), but also have logic (non-static member
@@ -42,8 +40,6 @@ class NonPrivateMemberVariablesInClassesCheck : public ClangTidyCheck {
const bool IgnorePublicMemberVariables;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONPRIVATEMEMBERVARIABLESINCLASSESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
index ccc6c5fd12ad6..7b3b84b5b32a3 100644
--- a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// The checker detects expressions that are redundant, because they contain
/// ineffective, useless parts.
@@ -33,8 +31,6 @@ class RedundantExpressionCheck : public ClangTidyCheck {
void checkRelationalExpr(const ast_matchers::MatchFinder::MatchResult &R);
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_REDUNDANT_EXPRESSION_H
diff --git a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.h b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.h
index 0168d1fcd107f..7b378e016408a 100644
--- a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/StringRef.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Replaces `assert()` with `static_assert()` if the condition is evaluatable
/// at compile time.
@@ -36,8 +34,6 @@ class StaticAssertCheck : public ClangTidyCheck {
SourceLocation AssertLoc);
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_STATICASSERTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
index de26b6ab5e0ad..0d4df97c7bdfb 100644
--- a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
///checks for locations that do not throw by value
// or catch by reference.
@@ -49,8 +47,6 @@ class ThrowByValueCatchByReferenceCheck : public ClangTidyCheck {
uint64_t MaxSize; // No `const` because we have to set it in two steps.
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
diff --git a/clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.h b/clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
index e6ea3bbe40be3..c1aefaa8790e8 100644
--- a/clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds declarations of assignment operators with the wrong return and/or
/// argument types and definitions with good return type but wrong return
@@ -37,8 +35,6 @@ class UnconventionalAssignOperatorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ASSIGNOPERATORSIGNATURECHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h b/clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h
index 6744de2be56b8..a76cc77112c6e 100644
--- a/clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Find and replace `unique_ptr::reset(release())` with `std::move()`.
///
@@ -47,8 +45,6 @@ class UniqueptrResetReleaseCheck : public ClangTidyCheck {
utils::IncludeInserter Inserter;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNIQUEPTRRESETRELEASECHECK_H
diff --git a/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.h b/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.h
index 32e5e156812ea..9f995d94c1989 100644
--- a/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMap.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds unused namespace alias declarations.
class UnusedAliasDeclsCheck : public ClangTidyCheck {
@@ -32,8 +30,6 @@ class UnusedAliasDeclsCheck : public ClangTidyCheck {
llvm::DenseMap<const NamedDecl *, CharSourceRange> FoundDecls;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_ALIAS_DECLS_H
diff --git a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.h b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.h
index 7e9b8c96f2883..684c95daaae72 100644
--- a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds unused parameters and fixes them, so that `-Wunused-parameter` can be
/// turned on.
@@ -35,8 +33,6 @@ class UnusedParametersCheck : public ClangTidyCheck {
const FunctionDecl *Function, unsigned ParamIndex);
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_PARAMETERS_H
diff --git a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
index 41eedb3873707..5ca7aef9dffac 100644
--- a/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
@@ -14,9 +14,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include <vector>
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Finds unused using declarations.
///
@@ -53,8 +51,6 @@ class UnusedUsingDeclsCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H
diff --git a/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.h b/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.h
index 42ebdf461cbc3..b3c10a124995f 100644
--- a/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace misc {
+namespace clang::tidy::misc {
/// Warns when using 'static' functions or variables at global scope, and
/// suggests moving them to an anonymous namespace.
@@ -44,8 +42,6 @@ class UseAnonymousNamespaceCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace misc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::misc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_USEANONYMOUSNAMESPACECHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h
index 1b7947f705b38..a9054864c3c11 100644
--- a/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace simple uses of std::bind with a lambda.
///
@@ -34,8 +32,6 @@ class AvoidBindCheck : public ClangTidyCheck {
private:
bool PermissiveParameterList = false;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_AVOID_BIND_H
diff --git a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h
index 613333d546014..7099f99c86949 100644
--- a/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Find C-style array types and recommend to use std::array<> / std::vector<>.
///
@@ -30,8 +28,6 @@ class AvoidCArraysCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_AVOIDCARRAYSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.h b/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.h
index 9dfaee2a4fa1b..841fb1d84d2f6 100644
--- a/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class ConcatNestedNamespacesCheck : public ClangTidyCheck {
public:
@@ -36,8 +34,6 @@ class ConcatNestedNamespacesCheck : public ClangTidyCheck {
NamespaceString concatNamespaces();
NamespaceContextVec Namespaces;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_CONCATNESTEDNAMESPACESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h
index 05e84023bd936..68305efdb5d23 100644
--- a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// This check replaces deprecated C library headers with their C++ STL
/// alternatives.
@@ -57,8 +55,6 @@ class DeprecatedHeadersCheck : public ClangTidyCheck {
bool CheckHeaderFile;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_C_HEADERS_TO_CXX_H
diff --git a/clang-tools-extra/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.h b/clang-tools-extra/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.h
index 064769d0157c4..eb791ec128148 100644
--- a/clang-tools-extra/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// This check warns the uses of the deprecated member types of ``std::ios_base``
/// and replaces those that have a non-deprecated equivalent.
@@ -31,8 +29,6 @@ class DeprecatedIosBaseAliasesCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_DEPRECATEDIOSBASEALIASESCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h b/clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h
index 4499ef983ea4e..e8ccb5bd8df9f 100644
--- a/clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h
+++ b/clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.h
@@ -12,9 +12,7 @@
#include <clang/Lex/Token.h>
#include <llvm/ADT/ArrayRef.h>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
enum class LiteralSize {
Unknown = 0,
@@ -80,8 +78,6 @@ class IntegralLiteralExpressionMatcher {
bool CommaAllowed;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
index b1eda4861451c..4e57b22662da7 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
@@ -13,9 +13,7 @@
#include "../utils/IncludeInserter.h"
#include "LoopConvertUtils.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class LoopConvertCheck : public ClangTidyCheck {
public:
@@ -85,8 +83,6 @@ class LoopConvertCheck : public ClangTidyCheck {
std::string ReverseHeader;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_LOOP_CONVERT_H
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
index 79390ca5e6174..a8aa752de2df4 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
@@ -22,9 +22,7 @@
#include <string>
#include <utility>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
enum LoopFixerKind {
LFK_Array,
@@ -464,8 +462,6 @@ class VariableNamer {
bool declarationExists(llvm::StringRef Symbol);
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_LOOP_CONVERT_UTILS_H
diff --git a/clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h b/clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h
index 8ebc3bf9d8e38..b56d7ac3b22ef 100644
--- a/clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class MacroToEnumCallbacks;
@@ -34,8 +32,6 @@ class MacroToEnumCheck : public ClangTidyCheck {
MacroToEnumCallbacks *PPCallback{};
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_MACROTOENUMCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.h b/clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.h
index 22e254dfa489f..caaf4ae403c34 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.h
@@ -11,9 +11,7 @@
#include "MakeSmartPtrCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace the pattern:
/// \code
@@ -35,8 +33,6 @@ class MakeSharedCheck : public MakeSmartPtrCheck {
SmartPtrTypeMatcher getSmartPointerTypeMatcher() const override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_MAKE_SHARED_H
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
index 6c9bc790bd99e..1c326c6a01b5c 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
@@ -16,9 +16,7 @@
#include "llvm/ADT/StringRef.h"
#include <string>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Base class for MakeSharedCheck and MakeUniqueCheck.
class MakeSmartPtrCheck : public ClangTidyCheck {
@@ -64,8 +62,6 @@ class MakeSmartPtrCheck : public ClangTidyCheck {
void insertHeader(DiagnosticBuilder &Diag, FileID FD);
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_MAKE_SMART_PTR_H
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h
index 113c32947f8a2..7b356823a8cfa 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h
@@ -11,9 +11,7 @@
#include "MakeSmartPtrCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace the pattern:
/// \code
@@ -37,8 +35,6 @@ class MakeUniqueCheck : public MakeSmartPtrCheck {
const bool RequireCPlusPlus14;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_MAKE_UNIQUE_H
diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h
index 82cd9d44c5e3a..c7677edc37dc4 100644
--- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.h
@@ -14,9 +14,7 @@
#include <memory>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class PassByValueCheck : public ClangTidyCheck {
public:
@@ -35,8 +33,6 @@ class PassByValueCheck : public ClangTidyCheck {
const bool ValuesOnly;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_PASS_BY_VALUE_H
diff --git a/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.h b/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.h
index ede689fc481a8..e1a65e1ad8bd6 100644
--- a/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include <bitset>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
using CharsBitSet = std::bitset<1 << CHAR_BIT>;
@@ -44,8 +42,6 @@ class RawStringLiteralCheck : public ClangTidyCheck {
const bool ReplaceShorterLiterals;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_RAW_STRING_LITERAL_H
diff --git a/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h b/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
index ceb123082ba43..bda5f2c253ce9 100644
--- a/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
@@ -14,9 +14,7 @@
#include <string>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Find and remove redundant void argument lists.
///
@@ -73,8 +71,6 @@ class RedundantVoidArgCheck : public ClangTidyCheck {
void removeVoidToken(Token VoidToken, StringRef Diagnostic);
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REDUNDANT_VOID_ARG_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
index 892723b9aaa4d..636481300d730 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Transforms the deprecated `std::auto_ptr` into the C++11 `std::unique_ptr`.
///
@@ -56,8 +54,6 @@ class ReplaceAutoPtrCheck : public ClangTidyCheck {
utils::IncludeInserter Inserter;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REPLACE_AUTO_PTR_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.h b/clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.h
index 1cb56440736eb..71e5ecafd6a6f 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// This check finds macro expansions of ``DISALLOW_COPY_AND_ASSIGN(Type)`` and
/// replaces them with a deleted copy constructor and a deleted assignment
@@ -55,8 +53,6 @@ class ReplaceDisallowCopyAndAssignMacroCheck : public ClangTidyCheck {
const StringRef MacroName;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REPLACEDISALLOWCOPYANDASSIGNMACROCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h b/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h
index 722bafa0420cc..95927c2803e7b 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// std::random_shuffle will be removed as of C++17. This check will find and
/// replace all occurrences of std::random_shuffle with std::shuffle.
@@ -37,8 +35,6 @@ class ReplaceRandomShuffleCheck : public ClangTidyCheck {
utils::IncludeInserter IncludeInserter;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_REPLACE_RANDOM_SHUFFLE_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ReturnBracedInitListCheck.h b/clang-tools-extra/clang-tidy/modernize/ReturnBracedInitListCheck.h
index 0597327d1ca53..e9ea58b06d826 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReturnBracedInitListCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ReturnBracedInitListCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Use a braced init list for return statements rather than unnecessary
/// repeating the return type name.
@@ -34,8 +32,6 @@ class ReturnBracedInitListCheck : public ClangTidyCheck {
}
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_RETURN_BRACED_INIT_LIST_H
diff --git a/clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h b/clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h
index 185d74856e788..30c2ca25b27e5 100644
--- a/clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace copy and swap tricks on shrinkable containers with the
/// `shrink_to_fit()` method call.
@@ -35,8 +33,6 @@ class ShrinkToFitCheck : public ClangTidyCheck {
}
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_SHRINKTOFITCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UnaryStaticAssertCheck.h b/clang-tools-extra/clang-tidy/modernize/UnaryStaticAssertCheck.h
index 71b3556b4e25a..6ec1a68a28fc1 100644
--- a/clang-tools-extra/clang-tidy/modernize/UnaryStaticAssertCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UnaryStaticAssertCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replaces a static_assert declaration with an empty message
/// with the unary version.
@@ -31,8 +29,6 @@ class UnaryStaticAssertCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_UNARY_STATIC_ASSERT_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
index 4ded73220b2d7..76c52b2d28139 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class UseAutoCheck : public ClangTidyCheck {
public:
@@ -35,8 +33,6 @@ class UseAutoCheck : public ClangTidyCheck {
const bool RemoveStars;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_AUTO_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h b/clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h
index 7baf094a228aa..67e6921554852 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Finds integer literals which are cast to bool.
///
@@ -33,8 +31,6 @@ class UseBoolLiteralsCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_BOOL_LITERALS_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h
index a49735cd0505e..099449a3167fa 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Convert a default constructor's member initializers into default member
/// initializers. Remove member initializers that are the same as a default
@@ -44,8 +42,6 @@ class UseDefaultMemberInitCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_DEFAULT_MEMBER_INIT_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h b/clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h
index 4fe788e5d61e4..f51e51dc734a0 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h
@@ -13,9 +13,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// This check looks for cases when inserting new element into std::vector but
/// the element is constructed temporarily.
@@ -45,8 +43,6 @@ class UseEmplaceCheck : public ClangTidyCheck {
const std::vector<StringRef> EmplacyFunctions;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_EMPLACE_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
index 4ffed8c406481..44f26c2bcfc58 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace default bodies of special member functions with '= default;'.
/// \code
@@ -48,8 +46,6 @@ class UseEqualsDefaultCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_EQUALS_DEFAULT_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h b/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
index d6d16be1f5746..7870e18e09279 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Mark unimplemented private special member functions with '= delete'.
/// \code
@@ -50,8 +48,6 @@ class UseEqualsDeleteCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_EQUALS_DELETE_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h b/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
index 2988b6cc9f1ef..cbfe1089c03ca 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Add ``[[nodiscard]]`` to non-void const-member functions with no
/// arguments or pass-by-value or pass by const-reference arguments.
@@ -43,8 +41,6 @@ class UseNodiscardCheck : public ClangTidyCheck {
const StringRef NoDiscardMacro;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USENODISCARDCHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h b/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
index 9f6818f190788..159aa97199534 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Replace dynamic exception specifications, with
/// `noexcept` (or user-defined macro) or `noexcept(false)`.
@@ -44,8 +42,6 @@ class UseNoexceptCheck : public ClangTidyCheck {
const bool UseNoexceptFalse;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_NOEXCEPT_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h
index 1776763546b8b..a8d2a8c0667bb 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
class UseNullptrCheck : public ClangTidyCheck {
public:
@@ -32,8 +30,6 @@ class UseNullptrCheck : public ClangTidyCheck {
SmallVector<StringRef, 1> NullMacros;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_NULLPTR_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h
index 3671bab0dda29..332e65b198c97 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Use C++11's `override` and remove `virtual` where applicable.
class UseOverrideCheck : public ClangTidyCheck {
@@ -34,8 +32,6 @@ class UseOverrideCheck : public ClangTidyCheck {
const StringRef FinalSpelling;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USEOVERRIDECHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
index e28e0be7f45a9..5fb6ae945f466 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
@@ -13,9 +13,7 @@
#include "clang/Lex/Token.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
struct ClassifiedToken {
Token T;
@@ -60,8 +58,6 @@ class UseTrailingReturnTypeCheck : public ClangTidyCheck {
const SourceManager &SM, const LangOptions &LangOpts);
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USETRAILINGRETURNTYPECHECK_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.h b/clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.h
index f047a34e3f358..6f02becc9f9d2 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Prefer using transparent functors to non-transparent ones.
///
@@ -32,8 +30,6 @@ class UseTransparentFunctorsCheck : public ClangTidyCheck {
const bool SafeMode;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_TRANSPARENT_FUNCTORS_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.h b/clang-tools-extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.h
index 26d5e091031e5..79b475c4f850e 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// This check will warn on calls to std::uncaught_exception and replace them with calls to
/// std::uncaught_exceptions, since std::uncaught_exception was deprecated in C++17. In case of
@@ -32,8 +30,6 @@ class UseUncaughtExceptionsCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_UNCAUGHT_EXCEPTIONS_H
diff --git a/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h b/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
index 3b5c3bf31c725..5c741a92d0131 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace modernize {
+namespace clang::tidy::modernize {
/// Check finds typedefs and replaces it with usings.
///
@@ -38,8 +36,6 @@ class UseUsingCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace modernize
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::modernize
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USE_USING_H
diff --git a/clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.h b/clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.h
index 6c3323150e5c6..69e7aa092ebbf 100644
--- a/clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.h
+++ b/clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.h
@@ -13,9 +13,7 @@
#include "clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace mpi {
+namespace clang::tidy::mpi {
/// This check verifies if a buffer passed to an MPI (Message Passing Interface)
/// function is sufficiently dereferenced. Buffers should be passed as a single
@@ -48,8 +46,6 @@ class BufferDerefCheck : public ClangTidyCheck {
std::optional<ento::mpi::MPIFunctionClassifier> FuncClassifier;
};
-} // namespace mpi
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::mpi
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MPI_BUFFER_DEREF_H
diff --git a/clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.h b/clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.h
index d27e27837b3b1..480684b0fac53 100644
--- a/clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.h
+++ b/clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.h
@@ -14,9 +14,7 @@
#include "clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace mpi {
+namespace clang::tidy::mpi {
/// This check verifies if buffer type and MPI (Message Passing Interface)
/// datatype pairs match. All MPI datatypes defined by the MPI standard (3.1)
@@ -49,8 +47,6 @@ class TypeMismatchCheck : public ClangTidyCheck {
std::optional<ento::mpi::MPIFunctionClassifier> FuncClassifier;
};
-} // namespace mpi
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::mpi
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MPI_TYPE_MISMATCH_H
diff --git a/clang-tools-extra/clang-tidy/objc/AssertEquals.h b/clang-tools-extra/clang-tidy/objc/AssertEquals.h
index 88bbcbf656971..59b55273aa118 100644
--- a/clang-tools-extra/clang-tidy/objc/AssertEquals.h
+++ b/clang-tools-extra/clang-tidy/objc/AssertEquals.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Warn if XCTAssertEqual() or XCTAssertNotEqual() is used with at least one
/// operands of type NSString*.
@@ -32,8 +30,6 @@ class AssertEquals final : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // THIRD_PARTY_LLVM_LLVM_PROJECT_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_OBJCASSERTEQUALS_H_
diff --git a/clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.h b/clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.h
index 9b0772739e3e5..72a6c6512f62b 100644
--- a/clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds usages of -[NSError init]. It is not the proper way of creating
/// NSError. errorWithDomain:code:userInfo: should be used instead.
@@ -31,8 +29,6 @@ class AvoidNSErrorInitCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_AVOIDNSERRORINITCHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h b/clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h
index 25a50e07c11d3..aa34d5bff9665 100644
--- a/clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds implementations of -dealloc in Objective-C categories. The category
/// implementation will override any dealloc in the class implementation,
@@ -32,8 +30,6 @@ class DeallocInCategoryCheck final : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_DEALLOCINCATEGORYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/ForbiddenSubclassingCheck.h b/clang-tools-extra/clang-tidy/objc/ForbiddenSubclassingCheck.h
index b09ed04081893..2bb8b0b9d0dec 100644
--- a/clang-tools-extra/clang-tidy/objc/ForbiddenSubclassingCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/ForbiddenSubclassingCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/StringRef.h"
#include <vector>
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds Objective-C classes which have a superclass which is
/// documented to not support subclassing.
@@ -36,8 +34,6 @@ class ForbiddenSubclassingCheck : public ClangTidyCheck {
const std::vector<StringRef> ForbiddenSuperClassNames;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_FORBIDDEN_SUBCLASSING_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/MissingHashCheck.h b/clang-tools-extra/clang-tidy/objc/MissingHashCheck.h
index 2a6e0bcedbe1e..fbb08dc249e60 100644
--- a/clang-tools-extra/clang-tidy/objc/MissingHashCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/MissingHashCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds Objective-C implementations that implement -isEqual: without also
/// appropriately implementing -hash.
@@ -31,8 +29,6 @@ class MissingHashCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_MISSINGHASHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.h b/clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.h
index 2afcf0a5f79d9..48eb4eda192e0 100644
--- a/clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Checks the string pattern used as a date format specifier and reports
/// warnings if it contains any incorrect sub-pattern.
@@ -31,8 +29,6 @@ class NSDateFormatterCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_NSDATEFORMATTERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h b/clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h
index fb57167699b4d..ebb432f5fe32a 100644
--- a/clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/NSInvocationArgumentLifetimeCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "clang/Basic/LangStandard.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds calls to NSInvocation methods under ARC that don't have proper
/// argument object lifetimes.
@@ -32,8 +30,6 @@ class NSInvocationArgumentLifetimeCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_NSINVOCATIONARGUMENTLIFETIMECHECK_H
diff --git a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h
index 2bdc556e991cc..9950f92b8a359 100644
--- a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds Objective-C property declarations which
/// are not in Lower Camel Case.
@@ -34,8 +32,6 @@ class PropertyDeclarationCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H
diff --git a/clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h b/clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
index 4324e0419aba6..ec852e84397a8 100644
--- a/clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
+++ b/clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace objc {
+namespace clang::tidy::objc {
/// Finds invocations of -self on super instances in initializers of subclasses
/// of NSObject and recommends calling a superclass initializer instead.
@@ -31,8 +29,6 @@ class SuperSelfCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace objc
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::objc
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_SUPERSELFCHECK_H
diff --git a/clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.h b/clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.h
index 2d688e6173558..3590c0eacee7f 100644
--- a/clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.h
+++ b/clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/ExceptionAnalyzer.h"
-namespace clang {
-namespace tidy {
-namespace openmp {
+namespace clang::tidy::openmp {
/// Analyzes OpenMP Structured Blocks and checks that no exception escapes
/// out of the Structured Block it was thrown in.
@@ -37,8 +35,6 @@ class ExceptionEscapeCheck : public ClangTidyCheck {
utils::ExceptionAnalyzer Tracer;
};
-} // namespace openmp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::openmp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_EXCEPTIONESCAPECHECK_H
diff --git a/clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.h b/clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.h
index bdaaee5067fdf..3b74f9ad78aee 100644
--- a/clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.h
+++ b/clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace openmp {
+namespace clang::tidy::openmp {
/// Finds OpenMP directives that are allowed to contain a ``default`` clause,
/// but either don't specify it or the clause is specified but with the kind
@@ -32,8 +30,6 @@ class UseDefaultNoneCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace openmp
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::openmp
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_USEDEFAULTNONECHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
index f96dadb54bb0f..93ed32e5b878a 100644
--- a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
@@ -14,9 +14,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Optimize calls to std::string::find() and friends when the needle passed is
/// a single character string literal.
@@ -38,8 +36,6 @@ class FasterStringFindCheck : public ClangTidyCheck {
const std::vector<StringRef> StringLikeClasses;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_FASTER_STRING_FIND_H
diff --git a/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h b/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h
index 03f2dfacd4725..ab9b89d31f93b 100644
--- a/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// A check that detects copied loop variables and suggests using const
/// references.
@@ -45,8 +43,6 @@ class ForRangeCopyCheck : public ClangTidyCheck {
const std::vector<StringRef> AllowedTypes;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_FORRANGECOPYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h b/clang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h
index b95d75e98b3af..2f3c9ae8f2dbc 100644
--- a/clang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
// Checks that in a for range loop, if the provided type is a reference, then
// the underlying type is the one returned by the iterator (i.e. that there
@@ -33,8 +31,6 @@ class ImplicitConversionInLoopCheck : public ClangTidyCheck {
const Expr *OperatorCall);
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_IMPLICIT_CONVERSION_IN_LOOP_CHECK_H_
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
index 8830d7103af93..5ab0513ea8f94 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Warns on inefficient use of STL algorithms on associative containers.
///
@@ -34,8 +32,6 @@ class InefficientAlgorithmCheck : public ClangTidyCheck {
}
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_INEFFICIENTALGORITHMCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.h b/clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.h
index 027eebdc5f736..1c15f0eb49ac7 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/InefficientStringConcatenationCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// This check is to warn about the performance overhead arising from
/// concatenating strings, using the operator+, instead of operator+=.
@@ -36,8 +34,6 @@ class InefficientStringConcatenationCheck : public ClangTidyCheck {
const bool StrictMode;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_INEFFICIENTSTRINGCONCATENATION_H
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h
index 93f4e12e3d7fe..7a2745f7ae5f5 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Finds possible inefficient `std::vector` operations (e.g. `push_back`) in
/// for loops that may cause unnecessary memory reallocations.
@@ -44,8 +42,6 @@ class InefficientVectorOperationCheck : public ClangTidyCheck {
bool EnableProto;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_INEFFICIENT_VECTOR_OPERATION_H
diff --git a/clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h b/clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
index e102847502720..1c2c430d162c7 100644
--- a/clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseSet.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Find casts of calculation results to bigger type. Typically from int to
///
@@ -43,8 +41,6 @@ class MoveConstArgCheck : public ClangTidyCheck {
llvm::DenseSet<const CallExpr *> AlreadyCheckedMoves;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MOVECONSTANTARGUMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h
index 7700c34f06bfd..9c1d20710f51e 100644
--- a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// The check flags user-defined move constructors that have a ctor-initializer
/// initializing a member or base class through a copy constructor instead of a
@@ -30,8 +28,6 @@ class MoveConstructorInitCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_MOVECONSTRUCTORINITCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/NoAutomaticMoveCheck.h b/clang-tools-extra/clang-tidy/performance/NoAutomaticMoveCheck.h
index 01c0016729ebc..aed230d2f1c40 100644
--- a/clang-tools-extra/clang-tidy/performance/NoAutomaticMoveCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/NoAutomaticMoveCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Finds local variables that cannot be automatically moved due to constness.
/// For the user-facing documentation see:
@@ -32,8 +30,6 @@ class NoAutomaticMoveCheck : public ClangTidyCheck {
const std::vector<StringRef> AllowedTypes;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_NOAUTOMATICMOVECHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.h b/clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.h
index 950c9a871bd94..322838da115cc 100644
--- a/clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Diagnoses every integer to pointer cast.
///
@@ -27,8 +25,6 @@ class NoIntToPtrCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_NOINTTOPTRCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h b/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h
index 473b518589548..c68392abf7780 100644
--- a/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/NoexceptMoveConstructorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// The check flags user-defined move constructors and assignment operators not
/// marked with `noexcept` or marked with `noexcept(expr)` where `expr`
@@ -33,8 +31,6 @@ class NoexceptMoveConstructorCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_NOEXCEPTMOVECONSTRUCTORCHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h b/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h
index ca04cb27fcf34..305844715726a 100644
--- a/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// A check that finds classes that would be trivial if not for the defaulted
/// destructors declared out-of-line:
@@ -36,8 +34,6 @@ class TriviallyDestructibleCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_TRIVIALLYDESTRUCTIBLECHECK_H
diff --git a/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h b/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
index dee1e2149ab6e..08a7eea580221 100644
--- a/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// Finds calls to C math library functions with implicit float to double
/// promotions.
@@ -39,8 +37,6 @@ class TypePromotionInMathFnCheck : public ClangTidyCheck {
utils::IncludeInserter IncludeInserter;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_TYPE_PROMOTION_IN_MATH_FN_H
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h b/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
index 97df7e9ca9202..ea009ba9979de 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "clang/AST/Decl.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
// The check detects local variable declarations that are copy initialized with
// the const reference of a function call or the const reference of a method
@@ -46,8 +44,6 @@ class UnnecessaryCopyInitialization : public ClangTidyCheck {
const std::vector<StringRef> ExcludedContainerTypes;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_COPY_INITIALIZATION_H
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h
index ac04d9aa2b712..1872e3bc9bf29 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.h
@@ -13,9 +13,7 @@
#include "../utils/IncludeInserter.h"
#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h"
-namespace clang {
-namespace tidy {
-namespace performance {
+namespace clang::tidy::performance {
/// A check that flags value parameters of expensive to copy types that
/// can safely be converted to const references.
@@ -45,8 +43,6 @@ class UnnecessaryValueParamCheck : public ClangTidyCheck {
const std::vector<StringRef> AllowedTypes;
};
-} // namespace performance
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::performance
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_VALUE_PARAM_H
diff --git a/clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h b/clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h
index 81489bf529667..ad18e6f411dbb 100644
--- a/clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h
+++ b/clang-tools-extra/clang-tidy/portability/RestrictSystemIncludesCheck.h
@@ -13,9 +13,7 @@
#include "../GlobList.h"
#include "clang/Lex/PPCallbacks.h"
-namespace clang {
-namespace tidy {
-namespace portability {
+namespace clang::tidy::portability {
/// Checks for allowed includes and suggests removal of any others. If no
/// includes are specified, the check will exit without issuing any warnings.
@@ -78,8 +76,6 @@ class RestrictedIncludesPPCallbacks : public PPCallbacks {
const SourceManager &SM;
};
-} // namespace portability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::portability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PORTABILITY_RESTRICTINCLUDESSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.h b/clang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.h
index e0d1494c0361d..c254a374ee9d5 100644
--- a/clang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.h
+++ b/clang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/SmallString.h"
-namespace clang {
-namespace tidy {
-namespace portability {
+namespace clang::tidy::portability {
/// Find SIMD intrinsics calls and suggest std::experimental::simd alternatives.
///
@@ -37,8 +35,6 @@ class SIMDIntrinsicsCheck : public ClangTidyCheck {
const bool Suggest;
};
-} // namespace portability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::portability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_SIMD_INTRINSICS_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.h b/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.h
index 2c735e04b43a1..d22d1aafa00af 100644
--- a/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.h
+++ b/clang-tools-extra/clang-tidy/portability/StdAllocatorConstCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace portability {
+namespace clang::tidy::portability {
/// Report use of ``std::vector<const T>`` (and similar containers of const
/// elements). These are not allowed in standard C++ due to undefined
@@ -30,8 +28,6 @@ class StdAllocatorConstCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace portability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::portability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PORTABILITY_STDALLOCATORCONSTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h b/clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h
index 8cd9882c655ef..57bac2b39bb32 100644
--- a/clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h
+++ b/clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
// Detect function declarations that have const value parameters and discourage
// them.
@@ -34,8 +32,6 @@ class AvoidConstParamsInDecls : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_AVOID_CONST_PARAMS_IN_DECLS_H
diff --git a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.h b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.h
index 51f828a53a0d9..9653dd30f078f 100644
--- a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks that bodies of `if` statements and loops (`for`, `range-for`,
/// `do-while`, and `while`) are inside braces
@@ -64,8 +62,6 @@ class BracesAroundStatementsCheck : public ClangTidyCheck {
const unsigned ShortStatementLines;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_BRACESAROUNDSTATEMENTSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.h b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.h
index f28e7c3ecd87e..c3d779eafecb0 100644
--- a/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// For any function whose return type is const-qualified, suggests removal of
/// the `const` qualifier from that return type.
@@ -33,8 +31,6 @@ class ConstReturnTypeCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONSTRETURNTYPECHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h b/clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h
index 9354f9b7207e9..2e8276d684cd7 100644
--- a/clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ContainerContainsCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds usages of `container.count()` and `find() == end()` which should be
/// replaced by a call to the `container.contains()` method introduced in C++20.
@@ -33,8 +31,6 @@ class ContainerContainsCheck : public ClangTidyCheck {
}
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERCONTAINSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h b/clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h
index 5ed1489d134de..65f78b8f6f397 100644
--- a/clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks whether a call to `operator[]` and `&` can be replaced with a call to
/// `data()`.
///
@@ -38,8 +36,6 @@ class ContainerDataPointerCheck : public ClangTidyCheck {
return TK_IgnoreUnlessSpelledInSource;
}
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERDATAPOINTERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
index af3b35c2344ce..90d18393958b2 100644
--- a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks whether a call to the `size()` method can be replaced with a call to
/// `empty()`.
@@ -38,8 +36,6 @@ class ContainerSizeEmptyCheck : public ClangTidyCheck {
}
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h b/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
index 277f96c5fc6ce..79b0d39bed41b 100644
--- a/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
+++ b/clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// This check finds C++ class methods than can be made static
/// because they don't use the 'this' pointer.
@@ -29,8 +27,6 @@ class ConvertMemberFunctionsToStatic : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
diff --git a/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h b/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h
index 32d6ae1bd5b2d..e9e7c942d1d2c 100644
--- a/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Check whether the 'if' statement is unnecessary before calling 'delete' on a
/// pointer.
@@ -31,8 +29,6 @@ class DeleteNullPointerCheck : public ClangTidyCheck {
}
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_DELETE_NULL_POINTER_H
diff --git a/clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.h b/clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.h
index b213e3a4b73cc..05395496d841b 100644
--- a/clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/DuplicateIncludeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// \brief Find and remove duplicate #include directives.
///
@@ -28,8 +26,6 @@ class DuplicateIncludeCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_DUPLICATE_INCLUDE_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.h b/clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.h
index 8962426114648..34860c2853ea8 100644
--- a/clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMap.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Flags the usages of `else` after `return`.
///
@@ -41,8 +39,6 @@ class ElseAfterReturnCheck : public ClangTidyCheck {
ConditionalBranchMap PPConditionals;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_ELSEAFTERRETURNCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.h b/clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.h
index a67c3492364d4..bdb8550eeae23 100644
--- a/clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks function Cognitive Complexity metric.
///
@@ -48,8 +46,6 @@ class FunctionCognitiveComplexityCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONCOGNITIVECOMPLEXITYCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h
index d85dbc92cc59f..5f3fb9a35dd54 100644
--- a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks for large functions based on various metrics.
///
@@ -51,8 +49,6 @@ class FunctionSizeCheck : public ClangTidyCheck {
const unsigned VariableThreshold;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h b/clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h
index b23d95db67ea8..2a4b810264e96 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h
@@ -13,9 +13,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/Support/Regex.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Warns about identifiers names whose length is too short.
///
@@ -47,8 +45,6 @@ class IdentifierLengthCheck : public ClangTidyCheck {
llvm::Regex IgnoredParameterNames;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERLENGTHCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
index 3a7e74f4d513d..cbf0653a280b6 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
@@ -11,8 +11,7 @@
#include "../utils/RenamerClangTidyCheck.h"
#include <optional>
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
namespace readability {
enum StyleKind : int;
@@ -211,7 +210,6 @@ struct OptionEnumMapping<readability::IdentifierNamingCheck::CaseType> {
std::pair<readability::IdentifierNamingCheck::CaseType, StringRef>>
getEnumMapping();
};
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERNAMINGCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h
index 4d303e0c32a55..67fd3ff5c339f 100644
--- a/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks for use of implicit bool conversions in expressions.
///
@@ -40,8 +38,6 @@ class ImplicitBoolConversionCheck : public ClangTidyCheck {
const bool AllowPointerConditions;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IMPLICIT_BOOL_CONVERSION_H
diff --git a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h
index 3dcfd3833e631..11fee1e720bda 100644
--- a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/DenseSet.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks for declarations of functions which
diff er in parameter names.
///
@@ -45,8 +43,6 @@ class InconsistentDeclarationParameterNameCheck : public ClangTidyCheck {
const bool Strict;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_INCONSISTENT_DECLARATION_PARAMETER_NAME_H
diff --git a/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.h b/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.h
index b8d2d1e9dc556..63e37a48ca418 100644
--- a/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// This check diagnoses all DeclStmt's declaring more than one variable and
/// tries to refactor the code to one statement per declaration.
@@ -28,8 +26,6 @@ class IsolateDeclarationCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_ISOLATEDECLCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h
index a096dc0acd942..ba39f17f4d500 100644
--- a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h
@@ -14,9 +14,7 @@
#include <llvm/ADT/APFloat.h>
#include <llvm/ADT/SmallVector.h>
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Detects magic numbers, integer and floating point literals embedded in code.
///
@@ -102,8 +100,6 @@ class MagicNumbersCheck : public ClangTidyCheck {
IgnoredDoublePointValues;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_MAGICNUMBERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h b/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h
index 28c7fc416b83d..dc8d98332793e 100644
--- a/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds non-static member functions that can be made 'const'.
///
@@ -30,8 +28,6 @@ class MakeMemberFunctionConstCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_MAKEMEMBERFUNCTIONCONSTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/MisleadingIndentationCheck.h b/clang-tools-extra/clang-tidy/readability/MisleadingIndentationCheck.h
index 73b6ac853bb97..c336abbc7c4a9 100644
--- a/clang-tools-extra/clang-tidy/readability/MisleadingIndentationCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/MisleadingIndentationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks the code for dangling else, and possible misleading indentations due
/// to missing braces. Note that this check only works as expected when the tabs
@@ -37,8 +35,6 @@ class MisleadingIndentationCheck : public ClangTidyCheck {
void missingBracesCheck(const SourceManager &SM, const CompoundStmt *CStmt);
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_MISLEADING_INDENTATION_H
diff --git a/clang-tools-extra/clang-tidy/readability/MisplacedArrayIndexCheck.h b/clang-tools-extra/clang-tidy/readability/MisplacedArrayIndexCheck.h
index 85c0602440281..1ccd011b30fff 100644
--- a/clang-tools-extra/clang-tidy/readability/MisplacedArrayIndexCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/MisplacedArrayIndexCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Warn about unusual array index syntax (`index[array]` instead of
/// `array[index]`).
@@ -28,8 +26,6 @@ class MisplacedArrayIndexCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_MISPLACED_ARRAY_INDEX_H
diff --git a/clang-tools-extra/clang-tidy/readability/NamedParameterCheck.h b/clang-tools-extra/clang-tidy/readability/NamedParameterCheck.h
index 0e7244ede7263..812d90ef7319c 100644
--- a/clang-tools-extra/clang-tidy/readability/NamedParameterCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/NamedParameterCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Find functions with unnamed arguments.
///
@@ -37,8 +35,6 @@ class NamedParameterCheck : public ClangTidyCheck {
}
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_NAMEDPARAMETERCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.h b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.h
index 84ece6437fb03..fc73d3e06fc04 100644
--- a/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/Support/Regex.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks that long namespaces have a closing comment.
///
@@ -39,8 +37,6 @@ class NamespaceCommentCheck : public ClangTidyCheck {
llvm::SmallVector<SourceLocation, 4> Ends;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_NAMESPACECOMMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.h b/clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.h
index cab3876125b81..e2598dd01d297 100644
--- a/clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Warn when a pointer function parameter can be const.
///
@@ -59,8 +57,6 @@ class NonConstParameterCheck : public ClangTidyCheck {
void diagnoseNonConstParameters();
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_NON_CONST_PARAMETER_H
diff --git a/clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h b/clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
index 74f1c8db26f34..dae9add48e3d7 100644
--- a/clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds variables declared as auto that could be declared as:
/// 'auto*' or 'const auto *' and reference variables declared as:
@@ -37,8 +35,6 @@ class QualifiedAutoCheck : public ClangTidyCheck {
const bool AddConstToQualified;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_QUALIFIEDAUTOCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantAccessSpecifiersCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantAccessSpecifiersCheck.h
index c886ff8739bb1..a5389d063f6cf 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantAccessSpecifiersCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantAccessSpecifiersCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Detects redundant access specifiers inside classes, structs, and unions.
///
@@ -35,8 +33,6 @@ class RedundantAccessSpecifiersCheck : public ClangTidyCheck {
const bool CheckFirstDeclaration;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTACCESSSPECIFIERSCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.h
index 2e70f22f02266..7433005bb7a37 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Eliminates redundant `return` statements at the end of a function that
/// returns `void`.
@@ -47,8 +45,6 @@ class RedundantControlFlowCheck : public ClangTidyCheck {
const char *Diag);
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANT_CONTROL_FLOW_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h
index a2d09f463c62a..a14a8aa70f6cf 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Find redundant variable declarations.
///
@@ -30,8 +28,6 @@ class RedundantDeclarationCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANT_DECLARATION_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.h
index 798d6c442acc3..fdcf821bcf60f 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Eliminate redundant dereferences of a function pointer.
///
@@ -27,8 +25,6 @@ class RedundantFunctionPtrDereferenceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANT_FUNCTION_PTR_DEREFERENCE_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h
index 5eab69b84238e..c0e0a6dac0dbc 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds member initializations that are unnecessary because the same default
/// constructor would be called if they were not present.
@@ -40,8 +38,6 @@ class RedundantMemberInitCheck : public ClangTidyCheck {
bool IgnoreBaseInCopyConstructors;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANT_MEMBER_INIT_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.h
index 7460836af9909..8a6fb6fd98b33 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// This check flags redundant preprocessor directives: nested directives with
/// the same condition.
@@ -28,8 +26,6 @@ class RedundantPreprocessorCheck : public ClangTidyCheck {
Preprocessor *ModuleExpanderPP) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTPREPROCESSORCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h
index 5b4275e357380..ffe8df8857dfe 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Find and remove redundant calls to smart pointer's `.get()` method.
///
@@ -43,8 +41,6 @@ class RedundantSmartptrGetCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGETCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.h
index c808f2a342771..662fb955fc653 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds unnecessary calls to `std::string::c_str()`.
class RedundantStringCStrCheck : public ClangTidyCheck {
@@ -27,8 +25,6 @@ class RedundantStringCStrCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSTRINGCSTRCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.h b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.h
index e3c09a006b5ba..853ea2fcd0313 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.h
@@ -13,9 +13,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds unnecessary string initializations.
class RedundantStringInitCheck : public ClangTidyCheck {
@@ -32,8 +30,6 @@ class RedundantStringInitCheck : public ClangTidyCheck {
std::vector<StringRef> StringNames;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANT_STRING_INIT_H
diff --git a/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h b/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
index bbadfc484f0a7..f9ed331b7bc06 100644
--- a/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Looks for boolean expressions involving boolean constants and simplifies
/// them to use the appropriate boolean expression directly.
@@ -72,8 +70,6 @@ class SimplifyBooleanExprCheck : public ClangTidyCheck {
const bool SimplifyDeMorganRelaxed;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_SIMPLIFY_BOOLEAN_EXPR_H
diff --git a/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.h b/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.h
index 0bd61738d39ee..83bab16b2f7aa 100644
--- a/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/SimplifySubscriptExprCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Simplifies subscript expressions.
///
@@ -36,8 +34,6 @@ class SimplifySubscriptExprCheck : public ClangTidyCheck {
const std::vector<StringRef> Types;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_SIMPLIFYSUBSCRIPTEXPRCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h
index 490a6582f4e74..4044f13769aa5 100644
--- a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Checks for member expressions that access static members through
/// instances and replaces them with uses of the appropriate qualified-id.
@@ -38,8 +36,6 @@ class StaticAccessedThroughInstanceCheck : public ClangTidyCheck {
const unsigned NameSpecifierNestingThreshold;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_STATIC_ACCESSED_THROUGH_INSTANCE_H
diff --git a/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.h b/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.h
index e6688ab6b64ad..c28087e07e9b6 100644
--- a/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds static function and variable definitions in anonymous namespace.
///
@@ -28,8 +26,6 @@ class StaticDefinitionInAnonymousNamespaceCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_STATIC_DEFINITION_IN_ANONYMOUS_NAMESPACE_H
diff --git a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.h b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.h
index ee38b278e9ca0..812736d806b71 100644
--- a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// This check flags all calls compare when used to check for string
/// equality or inequality.
@@ -31,8 +29,6 @@ class StringCompareCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_STRINGCOMPARECHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h b/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h
index ec48b8c439efa..38477d0800f15 100644
--- a/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.h
@@ -13,9 +13,7 @@
#include "llvm/ADT/StringSet.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds function calls where the arguments passed are provided out of order,
/// based on the
diff erence between the argument name and the parameter names
@@ -94,8 +92,6 @@ class SuspiciousCallArgumentCheck : public ClangTidyCheck {
BoundKind BK) const;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_SUSPICIOUSCALLARGUMENTCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h b/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
index 26c15223ae2bc..4dfcf36e4789f 100644
--- a/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
@@ -11,9 +11,7 @@
#include "../ClangTidyCheck.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Flags statements of the form ``delete <unique_ptr expr>.release();`` and
/// replaces them with: ``<unique_ptr expr> = nullptr;``
@@ -34,8 +32,6 @@ class UniqueptrDeleteReleaseCheck : public ClangTidyCheck {
const bool PreferResetCall;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_UNIQUEPTR_DELETE_RELEASE_H
diff --git a/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h b/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h
index 25af7cdf6c778..a8af08f5a8021 100644
--- a/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/OptionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Detects when the integral literal or floating point literal has
/// non-uppercase suffix, and suggests to make the suffix uppercase.
@@ -40,8 +38,6 @@ class UppercaseLiteralSuffixCheck : public ClangTidyCheck {
const bool IgnoreMacros;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_UPPERCASELITERALSUFFIXCHECK_H
diff --git a/clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h b/clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
index 0c12b753a8649..4e53b3f5a8a91 100644
--- a/clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
-namespace clang {
-namespace tidy {
-namespace readability {
+namespace clang::tidy::readability {
/// Finds ranged-based for loops that can be replaced by a call to std::any_of
/// or std::all_of.
@@ -33,8 +31,6 @@ class UseAnyOfAllOfCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};
-} // namespace readability
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::readability
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USEALGORITHMCHECK_H
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.h b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.h
index f87f84b66acad..f3862f93d833b 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.h
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.h
@@ -14,10 +14,8 @@
///
//===----------------------------------------------------------------------===//
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
int clangTidyMain(int argc, const char **argv);
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
diff --git a/clang-tools-extra/clang-tidy/utils/ASTUtils.h b/clang-tools-extra/clang-tidy/utils/ASTUtils.h
index b84808e09ec75..21bdfff0d73ff 100644
--- a/clang-tools-extra/clang-tidy/utils/ASTUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/ASTUtils.h
@@ -11,9 +11,7 @@
#include "clang/AST/AST.h"
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
// Returns the (closest) Function declaration surrounding |Statement| or NULL.
const FunctionDecl *getSurroundingFunction(ASTContext &Context,
const Stmt &Statement);
@@ -38,8 +36,6 @@ bool rangeContainsMacroExpansion(SourceRange Range, const SourceManager *SM);
// FIXME: false-negative if the entire range is fully expanded from a macro.
bool rangeCanBeFixed(SourceRange Range, const SourceManager *SM);
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ASTUTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/Aliasing.h b/clang-tools-extra/clang-tidy/utils/Aliasing.h
index 668c04a2ac22c..7dad16fc57f1e 100644
--- a/clang-tools-extra/clang-tidy/utils/Aliasing.h
+++ b/clang-tools-extra/clang-tidy/utils/Aliasing.h
@@ -11,9 +11,7 @@
#include "clang/AST/Decl.h"
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
/// Returns whether \p Var has a pointer or reference in \p Func.
///
@@ -29,8 +27,6 @@ namespace utils {
bool hasPtrOrReferenceInFunc(const Decl *Func, const VarDecl *Var);
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_ALIASING_H
diff --git a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h
index abf3529cc0f6b..2c16d95408cf6 100644
--- a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h
@@ -13,10 +13,7 @@
#include "clang/AST/Type.h"
#include "llvm/ADT/SmallPtrSet.h"
-namespace clang {
-namespace tidy {
-namespace utils {
-namespace decl_ref_expr {
+namespace clang::tidy::utils::decl_ref_expr {
/// Returns true if all ``DeclRefExpr`` to the variable within ``Stmt``
/// do not modify it.
@@ -51,9 +48,6 @@ bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
ASTContext &Context);
-} // namespace decl_ref_expr
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils::decl_ref_expr
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_DECLREFEXPRUTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
index 2ae08c83f5240..2cb988abc1cd8 100644
--- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
+++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
@@ -14,9 +14,7 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringSet.h"
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
/// This class analysis if a `FunctionDecl` can in principle throw an
/// exception, either directly or indirectly. It can be configured to ignore
@@ -149,8 +147,6 @@ class ExceptionAnalyzer {
std::map<const FunctionDecl *, ExceptionInfo> FunctionCache;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_EXCEPTION_ANALYZER_H
diff --git a/clang-tools-extra/clang-tidy/utils/ExprSequence.h b/clang-tools-extra/clang-tidy/utils/ExprSequence.h
index 7bb87ad8e24ff..6531e1876c4fe 100644
--- a/clang-tools-extra/clang-tidy/utils/ExprSequence.h
+++ b/clang-tools-extra/clang-tidy/utils/ExprSequence.h
@@ -17,9 +17,7 @@
#include "../ClangTidy.h"
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
/// Provides information about the evaluation order of (sub-)expressions within
/// a `CFGBlock`.
@@ -117,8 +115,6 @@ class StmtToBlockMap {
llvm::DenseMap<const Stmt *, const CFGBlock *> Map;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRSEQUENCE_H
diff --git a/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h b/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
index f12e57e1453ed..e4299671c0ec5 100644
--- a/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
@@ -15,9 +15,7 @@
#include "llvm/ADT/StringRef.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
typedef llvm::SmallSet<llvm::StringRef, 5> FileExtensionsSet;
@@ -61,8 +59,6 @@ getFileExtension(StringRef FileName, const FileExtensionsSet &FileExtensions);
bool isFileExtension(StringRef FileName,
const FileExtensionsSet &FileExtensions);
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FILE_EXTENSIONS_UTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h b/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h
index 3ce07195c5a05..6371f999b8ab9 100644
--- a/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h
@@ -14,10 +14,7 @@
#include "clang/Sema/DeclSpec.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace utils {
-namespace fixit {
+namespace clang::tidy::utils::fixit {
/// Creates fix to make ``VarDecl`` a reference by adding ``&``.
FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context);
@@ -47,9 +44,6 @@ addQualifierToVarDecl(const VarDecl &Var, const ASTContext &Context,
DeclSpec::TQ Qualifier,
QualifierTarget CT = QualifierTarget::Pointee,
QualifierPolicy CP = QualifierPolicy::Left);
-} // namespace fixit
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils::fixit
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/HeaderGuard.h b/clang-tools-extra/clang-tidy/utils/HeaderGuard.h
index 584a09c756d49..89429e6a01c51 100644
--- a/clang-tools-extra/clang-tidy/utils/HeaderGuard.h
+++ b/clang-tools-extra/clang-tidy/utils/HeaderGuard.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
/// Finds and fixes header guards.
/// The check supports these options:
@@ -63,8 +61,6 @@ class HeaderGuardCheck : public ClangTidyCheck {
utils::FileExtensionsSet HeaderFileExtensions;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_HEADERGUARD_H
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
index 75e6ddf5948b9..5308f76bd2151 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
+++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
@@ -17,8 +17,7 @@
namespace clang {
class Preprocessor;
-namespace tidy {
-namespace utils {
+namespace tidy::utils {
/// Produces fixes to insert specified includes to source files, if not
/// yet present.
@@ -99,7 +98,6 @@ class IncludeInserter {
friend class IncludeInserterCallback;
};
-} // namespace utils
-} // namespace tidy
+} // namespace tidy::utils
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeSorter.h b/clang-tools-extra/clang-tidy/utils/IncludeSorter.h
index 3ee924e4de84a..5f954af596da1 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeSorter.h
+++ b/clang-tools-extra/clang-tidy/utils/IncludeSorter.h
@@ -13,8 +13,7 @@
#include <optional>
#include <string>
-namespace clang {
-namespace tidy {
+namespace clang::tidy {
namespace utils {
/// Class used by ``IncludeInserterCallback`` to record the names of the
@@ -73,6 +72,5 @@ template <> struct OptionEnumMapping<utils::IncludeSorter::IncludeStyle> {
static ArrayRef<std::pair<utils::IncludeSorter::IncludeStyle, StringRef>>
getEnumMapping();
};
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDESORTER_H
diff --git a/clang-tools-extra/clang-tidy/utils/LexerUtils.h b/clang-tools-extra/clang-tidy/utils/LexerUtils.h
index 7af487dd0d742..888917d733e02 100644
--- a/clang-tools-extra/clang-tidy/utils/LexerUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/LexerUtils.h
@@ -18,9 +18,7 @@ namespace clang {
class Stmt;
-namespace tidy {
-namespace utils {
-namespace lexer {
+namespace tidy::utils::lexer {
/// Returns previous token or ``tok::unknown`` if not found.
Token getPreviousToken(SourceLocation Location, const SourceManager &SM,
@@ -114,9 +112,7 @@ std::optional<Token> getQualifyingToken(tok::TokenKind TK,
SourceLocation getUnifiedEndLoc(const Stmt &S, const SourceManager &SM,
const LangOptions &LangOpts);
-} // namespace lexer
-} // namespace utils
-} // namespace tidy
+} // namespace tidy::utils::lexer
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_LEXER_UTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/Matchers.h b/clang-tools-extra/clang-tidy/utils/Matchers.h
index 28c9389da7168..b3b2c8c636174 100644
--- a/clang-tools-extra/clang-tidy/utils/Matchers.h
+++ b/clang-tools-extra/clang-tidy/utils/Matchers.h
@@ -13,9 +13,7 @@
#include "clang/ASTMatchers/ASTMatchers.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace matchers {
+namespace clang::tidy::matchers {
AST_MATCHER(BinaryOperator, isRelationalOperator) {
return Node.isRelationalOp();
@@ -122,8 +120,6 @@ matchesAnyListedName(llvm::ArrayRef<StringRef> NameList) {
new MatchesAnyListedNameMatcher(NameList));
}
-} // namespace matchers
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::matchers
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
diff --git a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.h b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.h
index f655cfb9946c8..df4d4b95ba421 100644
--- a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.h
+++ b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.h
@@ -18,9 +18,7 @@
#include <map>
#include <optional>
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
// This class creates function-level namespace aliases.
class NamespaceAliaser {
@@ -45,8 +43,6 @@ class NamespaceAliaser {
AddedAliases;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_NAMESPACEALIASER_H
diff --git a/clang-tools-extra/clang-tidy/utils/OptionsUtils.h b/clang-tools-extra/clang-tidy/utils/OptionsUtils.h
index 9c36d71fe0ead..f15c07fe47fad 100644
--- a/clang-tools-extra/clang-tidy/utils/OptionsUtils.h
+++ b/clang-tools-extra/clang-tidy/utils/OptionsUtils.h
@@ -13,10 +13,7 @@
#include <string>
#include <vector>
-namespace clang {
-namespace tidy {
-namespace utils {
-namespace options {
+namespace clang::tidy::utils::options {
/// Parse a semicolon separated list of strings.
std::vector<StringRef> parseStringList(StringRef Option);
@@ -27,9 +24,6 @@ std::vector<StringRef> parseListPair(StringRef L, StringRef R);
/// ``parseStringList``.
std::string serializeStringList(ArrayRef<StringRef> Strings);
-} // namespace options
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils::options
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_OPTIONUTILS_H
diff --git a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h
index f0868f689f082..3f5c4cac52b7b 100644
--- a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h
+++ b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h
@@ -16,9 +16,7 @@
#include "clang/Tooling/Transformer/Transformer.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
/// A base class for defining a ClangTidy check based on a `RewriteRule`.
//
@@ -83,8 +81,6 @@ class TransformerClangTidyCheck : public ClangTidyCheck {
IncludeInserter Inserter;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_TRANSFORMER_CLANG_TIDY_CHECK_H
diff --git a/clang-tools-extra/clang-tidy/utils/TypeTraits.h b/clang-tools-extra/clang-tidy/utils/TypeTraits.h
index 52751393ac6d2..eb4dd0ff3a510 100644
--- a/clang-tools-extra/clang-tidy/utils/TypeTraits.h
+++ b/clang-tools-extra/clang-tidy/utils/TypeTraits.h
@@ -13,10 +13,7 @@
#include "clang/AST/Type.h"
#include <optional>
-namespace clang {
-namespace tidy {
-namespace utils {
-namespace type_traits {
+namespace clang::tidy::utils::type_traits {
/// Returns `true` if `Type` is expensive to copy.
std::optional<bool> isExpensiveToCopy(QualType Type, const ASTContext &Context);
@@ -37,9 +34,6 @@ bool hasNonTrivialMoveConstructor(QualType Type);
/// Return true if `Type` has a non-trivial move assignment operator.
bool hasNonTrivialMoveAssignment(QualType Type);
-} // namespace type_traits
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils::type_traits
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_TYPETRAITS_H
diff --git a/clang-tools-extra/clang-tidy/utils/UsingInserter.h b/clang-tools-extra/clang-tidy/utils/UsingInserter.h
index 809833a637b6c..04274f2470744 100644
--- a/clang-tools-extra/clang-tidy/utils/UsingInserter.h
+++ b/clang-tools-extra/clang-tidy/utils/UsingInserter.h
@@ -16,9 +16,7 @@
#include <optional>
#include <set>
-namespace clang {
-namespace tidy {
-namespace utils {
+namespace clang::tidy::utils {
// UsingInserter adds using declarations for |QualifiedName| to the surrounding
// function.
@@ -44,7 +42,5 @@ class UsingInserter {
std::set<NameInFunction> AddedUsing;
};
-} // namespace utils
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::utils
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_USINGINSERTER_H
diff --git a/clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.h b/clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.h
index 589a1cfa0f457..e1f1f06ab3735 100644
--- a/clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.h
+++ b/clang-tools-extra/clang-tidy/zircon/TemporaryObjectsCheck.h
@@ -12,9 +12,7 @@
#include "../ClangTidyCheck.h"
#include "../utils/OptionsUtils.h"
-namespace clang {
-namespace tidy {
-namespace zircon {
+namespace clang::tidy::zircon {
/// Construction of specific temporary objects in the Zircon kernel is
/// discouraged.
@@ -34,8 +32,6 @@ class TemporaryObjectsCheck : public ClangTidyCheck {
std::vector<StringRef> Names;
};
-} // namespace zircon
-} // namespace tidy
-} // namespace clang
+} // namespace clang::tidy::zircon
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ZIRCON_TEMPORARYOBJECTSCHECK_H
More information about the cfe-commits
mailing list