10 changes: 2 additions & 8 deletions clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace readability {
namespace clang::tidy::google::readability {

void AvoidCStyleCastsCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Expand Down Expand Up @@ -258,7 +255,4 @@ void AvoidCStyleCastsCheck::check(const MatchFinder::MatchResult &Result) {
Diag << "static_cast/const_cast/reinterpret_cast";
}

} // namespace readability
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::readability
10 changes: 2 additions & 8 deletions clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace objc {
namespace clang::tidy::google::objc {

static bool isMessageExpressionInsideMacro(const ObjCMessageExpr *Expr) {
SourceLocation ReceiverLocation = Expr->getReceiverRange().getBegin();
Expand Down Expand Up @@ -123,7 +120,4 @@ void AvoidNSObjectNewCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace objc
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::objc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace objc {
namespace clang::tidy::google::objc {

void AvoidThrowingObjCExceptionCheck::registerMatchers(MatchFinder *Finder) {

Expand Down Expand Up @@ -57,7 +54,4 @@ void AvoidThrowingObjCExceptionCheck::check(
"Objective-C errors");
}

} // namespace objc
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::objc
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"

namespace clang {
namespace tidy {
namespace google {
namespace readability {
namespace clang::tidy::google::readability {

constexpr llvm::StringLiteral KDisabledTestPrefix = "DISABLED_";

Expand Down Expand Up @@ -84,7 +81,4 @@ void AvoidUnderscoreInGoogletestNameCheck::registerPPCallbacks(
std::make_unique<AvoidUnderscoreInGoogletestNameCallback>(PP, this));
}

} // namespace readability
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::readability
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace clang::tidy::google {

void DefaultArgumentsCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand All @@ -30,6 +28,4 @@ void DefaultArgumentsCheck::check(const MatchFinder::MatchResult &Result) {
"default arguments on virtual or override methods are prohibited");
}

} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace clang::tidy::google {

void ExplicitConstructorCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -146,6 +144,4 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) {
<< FixItHint::CreateInsertion(Loc, "explicit ");
}

} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ AST_MATCHER(DeclRefExpr, hasExplicitTemplateArgs) {
}
} // namespace

namespace tidy {
namespace google {
namespace build {
namespace tidy::google::build {

void ExplicitMakePairCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Expand Down Expand Up @@ -66,7 +64,5 @@ void ExplicitMakePairCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace build
} // namespace google
} // namespace tidy
} // namespace tidy::google::build
} // namespace clang
10 changes: 2 additions & 8 deletions clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace objc {
namespace clang::tidy::google::objc {

namespace {

Expand Down Expand Up @@ -117,7 +114,4 @@ void FunctionNamingCheck::check(const MatchFinder::MatchResult &Result) {
<< MatchedDecl << IsGlobal << generateFixItHint(MatchedDecl);
}

} // namespace objc
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::objc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace readability {
namespace clang::tidy::google::readability {

GlobalNamesInHeadersCheck::GlobalNamesInHeadersCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -74,7 +71,4 @@ void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
"using declarations in the global namespace in headers are prohibited");
}

} // namespace readability
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::readability
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace objc {
namespace clang::tidy::google::objc {

namespace {

Expand Down Expand Up @@ -98,7 +95,4 @@ void GlobalVariableDeclarationCheck::check(
}
}

} // namespace objc
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::objc
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace google {

class GoogleModule : public ClangTidyModule {
Expand Down Expand Up @@ -103,5 +102,4 @@ static ClangTidyModuleRegistry::Add<GoogleModule> X("google-module",
// and thus register the GoogleModule.
volatile int GoogleModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ static Token getTokenAtLoc(SourceLocation Loc,
return Tok;
}

namespace tidy {
namespace google {
namespace runtime {
namespace tidy::google::runtime {

IntegerTypesCheck::IntegerTypesCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
Expand Down Expand Up @@ -144,7 +142,5 @@ void IntegerTypesCheck::check(const MatchFinder::MatchResult &Result) {
<< Replacement;
}

} // namespace runtime
} // namespace google
} // namespace tidy
} // namespace tidy::google::runtime
} // namespace clang
10 changes: 2 additions & 8 deletions clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace runtime {
namespace clang::tidy::google::runtime {

void OverloadedUnaryAndCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Expand All @@ -39,7 +36,4 @@ void OverloadedUnaryAndCheck::check(const MatchFinder::MatchResult &Result) {
"do not overload unary operator&, it is dangerous.");
}

} // namespace runtime
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::runtime
10 changes: 2 additions & 8 deletions clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
#include "clang/Lex/Preprocessor.h"
#include <optional>

namespace clang {
namespace tidy {
namespace google {
namespace readability {
namespace clang::tidy::google::readability {

class TodoCommentCheck::TodoCommentHandler : public CommentHandler {
public:
Expand Down Expand Up @@ -64,7 +61,4 @@ void TodoCommentCheck::registerPPCallbacks(const SourceManager &SM,
PP->addCommentHandler(Handler.get());
}

} // namespace readability
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace build {
namespace clang::tidy::google::build {

UnnamedNamespaceInHeaderCheck::UnnamedNamespaceInHeaderCheck(
StringRef Name, ClangTidyContext *Context)
Expand Down Expand Up @@ -54,7 +51,4 @@ void UnnamedNamespaceInHeaderCheck::check(
diag(Loc, "do not use unnamed namespaces in header files");
}

} // namespace build
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::build
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace clang::tidy::google {

static const llvm::StringRef RenameCaseToSuiteMessage =
"Google Test APIs named with 'case' are deprecated; use equivalent APIs "
Expand Down Expand Up @@ -350,6 +348,4 @@ void UpgradeGoogletestCaseCheck::check(const MatchFinder::MatchResult &Result) {
Diag << FixItHint::CreateReplacement(ReplacementRange, ReplacementText);
}

} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace build {
namespace clang::tidy::google::build {

void UsingNamespaceDirectiveCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Expand Down Expand Up @@ -56,7 +53,4 @@ bool UsingNamespaceDirectiveCheck::isStdLiteralsNamespace(
return Parent->getName() == "literals" && Parent->getParent() &&
Parent->getParent()->isStdNamespace();
}
} // namespace build
} // namespace google
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::google::build
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace hicpp {
namespace clang::tidy::hicpp {

void ExceptionBaseclassCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -58,6 +56,4 @@ void ExceptionBaseclassCheck::check(const MatchFinder::MatchResult &Result) {
diag(TypeDecl->getBeginLoc(), "type defined here", DiagnosticIDs::Note);
}

} // namespace hicpp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::hicpp
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/hicpp/HICPPTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
#include "NoAssemblerCheck.h"
#include "SignedBitwiseCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace hicpp {

class HICPPModule : public ClangTidyModule {
Expand Down Expand Up @@ -120,5 +119,4 @@ static ClangTidyModuleRegistry::Add<HICPPModule>
// and thus register the HICPPModule.
volatile int HICPPModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace hicpp {
namespace clang::tidy::hicpp {

void MultiwayPathsCoveredCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) {
Expand Down Expand Up @@ -174,6 +172,4 @@ void MultiwayPathsCoveredCheck::handleSwitchWithoutDefault(
CaseCount == 1 ? "switch with only one case; use an if statement"
: "potential uncovered code path; add a default label");
}
} // namespace hicpp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::hicpp
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace hicpp {
namespace clang::tidy::hicpp {

namespace {
AST_MATCHER(VarDecl, isAsm) { return Node.hasAttr<clang::AsmLabelAttr>(); }
Expand Down Expand Up @@ -44,6 +42,4 @@ void NoAssemblerCheck::check(const MatchFinder::MatchResult &Result) {
diag(ASMLocation, "do not use inline assembler in safety-critical code");
}

} // namespace hicpp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::hicpp
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/hicpp/SignedBitwiseCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
using namespace clang::ast_matchers;
using namespace clang::ast_matchers::internal;

namespace clang {
namespace tidy {
namespace hicpp {
namespace clang::tidy::hicpp {

SignedBitwiseCheck::SignedBitwiseCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -100,6 +98,4 @@ void SignedBitwiseCheck::check(const MatchFinder::MatchResult &Result) {
<< IsUnary << SignedOperand->getSourceRange() << OperatorLoc;
}

} // namespace hicpp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::hicpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include "../ClangTidyModuleRegistry.h"
#include "MustCheckErrsCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace linuxkernel {

/// This module is for checks specific to the Linux kernel.
Expand All @@ -33,5 +32,4 @@ static ClangTidyModuleRegistry::Add<LinuxKernelModule>
// and thus register the LinuxKernelModule.
volatile int LinuxKernelModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace linuxkernel {
namespace clang::tidy::linuxkernel {

void MustCheckErrsCheck::registerMatchers(MatchFinder *Finder) {
auto ErrFn =
Expand Down Expand Up @@ -48,6 +46,4 @@ void MustCheckErrsCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace linuxkernel
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::linuxkernel
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/llvm/HeaderGuardCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/Path.h"

namespace clang {
namespace tidy {
namespace llvm_check {
namespace clang::tidy::llvm_check {

LLVMHeaderGuardCheck::LLVMHeaderGuardCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -66,6 +64,4 @@ std::string LLVMHeaderGuardCheck::getHeaderGuard(StringRef Filename,
return StringRef(Guard).upper();
}

} // namespace llvm_check
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_check
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

#include <map>

namespace clang {
namespace tidy {
namespace llvm_check {
namespace clang::tidy::llvm_check {

namespace {
class IncludeOrderPPCallbacks : public PPCallbacks {
Expand Down Expand Up @@ -183,6 +181,4 @@ void IncludeOrderPPCallbacks::EndOfMainFile() {
IncludeDirectives.clear();
}

} // namespace llvm_check
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_check
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#include "PreferRegisterOverUnsignedCheck.h"
#include "TwineLocalCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace llvm_check {

class LLVMModule : public ClangTidyModule {
Expand Down Expand Up @@ -60,5 +59,4 @@ static ClangTidyModuleRegistry::Add<LLVMModule> X("llvm-module",
// and thus register the LLVMModule.
volatile int LLVMModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ namespace ast_matchers {
AST_MATCHER(Expr, isMacroID) { return Node.getExprLoc().isMacroID(); }
} // namespace ast_matchers

namespace tidy {
namespace llvm_check {
namespace tidy::llvm_check {

void PreferIsaOrDynCastInConditionalsCheck::registerMatchers(
MatchFinder *Finder) {
Expand Down Expand Up @@ -130,6 +129,5 @@ void PreferIsaOrDynCastInConditionalsCheck::check(
}
}

} // namespace llvm_check
} // namespace tidy
} // namespace tidy::llvm_check
} // namespace clang
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace llvm_check {
namespace clang::tidy::llvm_check {

void PreferRegisterOverUnsignedCheck::registerMatchers(MatchFinder *Finder) {
auto RegisterClassMatch = hasType(
Expand Down Expand Up @@ -61,6 +59,4 @@ void PreferRegisterOverUnsignedCheck::check(
NeedsQualification ? "llvm::Register" : "Register");
}

} // namespace llvm_check
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_check
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/llvm/TwineLocalCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace llvm_check {
namespace clang::tidy::llvm_check {

void TwineLocalCheck::registerMatchers(MatchFinder *Finder) {
auto TwineType =
Expand Down Expand Up @@ -62,6 +60,4 @@ void TwineLocalCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace llvm_check
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_check
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace llvm_libc {
namespace clang::tidy::llvm_libc {

// Gets the outermost namespace of a DeclContext, right under the Translation
// Unit.
Expand Down Expand Up @@ -65,6 +63,4 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) {
clang::DiagnosticIDs::Note);
}

} // namespace llvm_libc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_libc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace llvm_libc {
namespace clang::tidy::llvm_libc {

const static StringRef RequiredNamespace = "__llvm_libc";
void ImplementationInNamespaceCheck::registerMatchers(MatchFinder *Finder) {
Expand Down Expand Up @@ -43,6 +41,4 @@ void ImplementationInNamespaceCheck::check(
<< RequiredNamespace;
}

} // namespace llvm_libc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_libc
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/llvmlibc/LLVMLibcTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include "ImplementationInNamespaceCheck.h"
#include "RestrictSystemLibcHeadersCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace llvm_libc {

class LLVMLibcModule : public ClangTidyModule {
Expand All @@ -39,5 +38,4 @@ static ClangTidyModuleRegistry::Add<LLVMLibcModule>
// and thus register the LLVMLibcModule.
volatile int LLVMLibcModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
// FixItHint - Hint to check documentation script to mark this check as
// providing a FixIt.

namespace clang {
namespace tidy {
namespace llvm_libc {
namespace clang::tidy::llvm_libc {

namespace {

Expand Down Expand Up @@ -66,6 +64,4 @@ void RestrictSystemLibcHeadersCheck::registerPPCallbacks(
*this, SM, CompilerIncudeDir));
}

} // namespace llvm_libc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::llvm_libc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ namespace {
#include "Confusables.inc"
} // namespace

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

ConfusableIdentifierCheck::ConfusableIdentifierCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -169,6 +167,4 @@ void ConfusableIdentifierCheck::registerMatchers(
Finder->addMatcher(ast_matchers::namedDecl().bind("nameddecl"), this);
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {
// FIXME: This matcher exists in some other code-review as well.
Expand Down Expand Up @@ -207,6 +205,4 @@ void ConstCorrectnessCheck::registerScope(const CompoundStmt *LocalScope,
Analyzer = std::make_unique<ExprMutationAnalyzer>(*LocalScope, *Context);
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {

Expand Down Expand Up @@ -160,6 +158,4 @@ void DefinitionsInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#include "UnusedUsingDeclsCheck.h"
#include "UseAnonymousNamespaceCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace misc {

class MiscModule : public ClangTidyModule {
Expand Down Expand Up @@ -84,5 +83,4 @@ static ClangTidyModuleRegistry::Add<misc::MiscModule>
// and thus register the MiscModule.
volatile int MiscModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/MisleadingIdentifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/Support/ConvertUTF.h"

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

// See https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedBidiClass.txt
static bool isUnassignedAL(llvm::UTF32 CP) {
Expand Down Expand Up @@ -161,6 +159,4 @@ void MisleadingIdentifierCheck::registerMatchers(
Finder->addMatcher(ast_matchers::namedDecl().bind("nameddecl"), this);
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/MisplacedConstCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

void MisplacedConstCheck::registerMatchers(MatchFinder *Finder) {
auto NonConstAndNonFunctionPointerType = hasType(pointerType(unless(
Expand Down Expand Up @@ -74,6 +72,4 @@ void MisplacedConstCheck::check(const MatchFinder::MatchResult &Result) {
diag(AliasLoc, "%0 declared here", DiagnosticIDs::Note) << AliasType;
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {

Expand Down Expand Up @@ -204,6 +202,4 @@ void NewDeleteOverloadsCheck::onEndOfTranslationUnit() {
<< FD << getOperatorName(getCorrespondingOverload(FD));
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {

Expand Down Expand Up @@ -270,6 +268,4 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
9 changes: 2 additions & 7 deletions clang-tools-extra/clang-tidy/misc/NonCopyableObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

void NonCopyableObjectsCheck::registerMatchers(MatchFinder *Finder) {
// There are two ways to get into trouble with objects like FILE *:
Expand Down Expand Up @@ -67,7 +65,4 @@ void NonCopyableObjectsCheck::check(const MatchFinder::MatchResult &Result) {
<< BD;
}

} // namespace misc
} // namespace tidy
} // namespace clang

} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {

Expand Down Expand Up @@ -92,6 +90,4 @@ void NonPrivateMemberVariablesInClassesCheck::check(
<< Field << Field->getAccess();
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
using namespace clang::ast_matchers;
using namespace clang::tidy::matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {
namespace {
using llvm::APSInt;

Expand Down Expand Up @@ -1357,6 +1355,4 @@ void RedundantExpressionCheck::check(const MatchFinder::MatchResult &Result) {
checkRelationalExpr(Result);
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

StaticAssertCheck::StaticAssertCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
Expand Down Expand Up @@ -167,6 +165,4 @@ SourceLocation StaticAssertCheck::getLastParenLoc(const ASTContext *ASTCtx,
return Token.getLocation();
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

ThrowByValueCatchByReferenceCheck::ThrowByValueCatchByReferenceCheck(
StringRef Name, ClangTidyContext *Context)
Expand Down Expand Up @@ -170,6 +168,4 @@ void ThrowByValueCatchByReferenceCheck::diagnoseCatchLocations(
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

void UnconventionalAssignOperatorCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
Expand Down Expand Up @@ -89,6 +87,4 @@ void UnconventionalAssignOperatorCheck::check(
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

UniqueptrResetReleaseCheck::UniqueptrResetReleaseCheck(
StringRef Name, ClangTidyContext *Context)
Expand Down Expand Up @@ -148,6 +146,4 @@ void UniqueptrResetReleaseCheck::check(const MatchFinder::MatchResult &Result) {
Result.SourceManager->getFileID(ResetMember->getBeginLoc()),
"<utility>");
}
} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

void UnusedAliasDeclsCheck::registerMatchers(MatchFinder *Finder) {
// We cannot do anything about headers (yet), as the alias declarations
Expand Down Expand Up @@ -53,6 +51,4 @@ void UnusedAliasDeclsCheck::onEndOfTranslationUnit() {
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {
bool isOverrideMethod(const FunctionDecl *Function) {
Expand Down Expand Up @@ -198,6 +196,4 @@ void UnusedParametersCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {

namespace {

Expand Down Expand Up @@ -201,6 +199,4 @@ void UnusedUsingDeclsCheck::onEndOfTranslationUnit() {
Contexts.clear();
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace misc {
namespace clang::tidy::misc {
namespace {
AST_POLYMORPHIC_MATCHER_P(isInHeaderFile,
AST_POLYMORPHIC_SUPPORTED_TYPES(FunctionDecl,
Expand Down Expand Up @@ -74,6 +72,4 @@ void UseAnonymousNamespaceCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace misc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::misc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {

Expand Down Expand Up @@ -717,6 +715,4 @@ void AvoidBindCheck::check(const MatchFinder::MatchResult &Result) {
Stream.str());
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {

} // namespace

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand All @@ -63,6 +61,4 @@ void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) {
<< ArrayType->getTypePtr()->isVariableArrayType();
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include "clang/Lex/Lexer.h"
#include <algorithm>

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static bool locationsInSameFile(const SourceManager &Sources,
SourceLocation Loc1, SourceLocation Loc2) {
Expand Down Expand Up @@ -102,6 +100,4 @@ void ConcatNestedNamespacesCheck::check(
Namespaces.clear();
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

using IncludeMarker =
clang::tidy::modernize::DeprecatedHeadersCheck::IncludeMarker;
namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {
namespace {

class IncludeModernizePPCallbacks : public PPCallbacks {
Expand Down Expand Up @@ -211,6 +209,4 @@ void IncludeModernizePPCallbacks::InclusionDirective(
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static constexpr std::array<StringRef, 5> DeprecatedTypes = {
"::std::ios_base::io_state", "::std::ios_base::open_mode",
Expand Down Expand Up @@ -72,6 +70,4 @@ void DeprecatedIosBaseAliasesCheck::check(
diag(IoStateLoc, "'std::ios_base::%0' is deprecated") << TypeName;
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include <cctype>
#include <stdexcept>

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

// Validate that this literal token is a valid integer literal. A literal token
// could be a floating-point token, which isn't acceptable as a value for an
Expand Down Expand Up @@ -285,6 +283,4 @@ LiteralSize IntegralLiteralExpressionMatcher::largestLiteralSize() const {
return LargestSize;
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
using namespace clang::ast_matchers;
using namespace llvm;

namespace clang {
namespace tidy {
namespace clang::tidy {

template <> struct OptionEnumMapping<modernize::Confidence::Level> {
static llvm::ArrayRef<std::pair<modernize::Confidence::Level, StringRef>>
Expand Down Expand Up @@ -970,5 +969,4 @@ llvm::StringRef LoopConvertCheck::getReverseHeader() const {
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

/// Tracks a stack of parent statements during traversal.
///
Expand Down Expand Up @@ -911,6 +909,4 @@ bool VariableNamer::declarationExists(StringRef Symbol) {
return DeclFinder.findUsages(SourceStmt);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#include <cctype>
#include <string>

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static bool hasOnlyComments(SourceLocation Loc, const LangOptions &Options,
StringRef Text) {
Expand Down Expand Up @@ -556,6 +554,4 @@ void MacroToEnumCheck::check(
PPCallback->invalidateRange(Range);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/MakeSharedCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

MakeSharedCheck::MakeSharedCheck(StringRef Name, ClangTidyContext *Context)
: MakeSmartPtrCheck(Name, Context, "std::make_shared") {}
Expand All @@ -29,6 +27,4 @@ MakeSharedCheck::getSmartPointerTypeMatcher() const {
qualType().bind(PointerType)))))))));
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {

Expand Down Expand Up @@ -439,6 +437,4 @@ void MakeSmartPtrCheck::insertHeader(DiagnosticBuilder &Diag, FileID FD) {
Diag << Inserter.createIncludeInsertion(FD, MakeSmartPtrFunctionHeader);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

MakeUniqueCheck::MakeUniqueCheck(StringRef Name,
clang::tidy::ClangTidyContext *Context)
Expand Down Expand Up @@ -43,6 +41,4 @@ bool MakeUniqueCheck::isLanguageVersionSupported(

// FixItHint is done by MakeSmartPtrCheck

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace modernize {

class ModernizeModule : public ClangTidyModule {
Expand Down Expand Up @@ -130,5 +129,4 @@ static ClangTidyModuleRegistry::Add<ModernizeModule> X("modernize-module",
// and thus register the ModernizeModule.
volatile int ModernizeModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
using namespace clang::ast_matchers;
using namespace llvm;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {
/// Matches move-constructible classes.
Expand Down Expand Up @@ -305,6 +303,4 @@ void PassByValueCheck::check(const MatchFinder::MatchResult &Result) {
"<utility>");
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {

Expand Down Expand Up @@ -147,6 +145,4 @@ void RawStringLiteralCheck::replaceWithRawStringLiteral(
<< FixItHint::CreateReplacement(CharRange, Replacement);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {

Expand Down Expand Up @@ -287,6 +285,4 @@ void RedundantVoidArgCheck::processLambdaExpr(
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
using namespace clang;
using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {
static const char AutoPtrTokenId[] = "AutoPrTokenId";
Expand Down Expand Up @@ -150,6 +148,4 @@ void ReplaceAutoPtrCheck::check(const MatchFinder::MatchResult &Result) {
"unique_ptr");
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#include "llvm/Support/FormatVariadic.h"
#include <optional>

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {

Expand Down Expand Up @@ -88,6 +86,4 @@ void ReplaceDisallowCopyAndAssignMacroCheck::storeOptions(
Options.store(Opts, "MacroName", MacroName);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

ReplaceRandomShuffleCheck::ReplaceRandomShuffleCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -96,6 +94,4 @@ void ReplaceRandomShuffleCheck::check(const MatchFinder::MatchResult &Result) {
"<random>");
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

void ReturnBracedInitListCheck::registerMatchers(MatchFinder *Finder) {
// Skip list initialization and constructors with an initializer list.
Expand Down Expand Up @@ -82,6 +80,4 @@ void ReturnBracedInitListCheck::check(const MatchFinder::MatchResult &Result) {
<< FixItHint::CreateReplacement(CallParensRange.getEnd(), "}");
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

void ShrinkToFitCheck::registerMatchers(MatchFinder *Finder) {
// Swap as a function need not to be considered, because rvalue can not
Expand Down Expand Up @@ -75,6 +73,4 @@ void ShrinkToFitCheck::check(const MatchFinder::MatchResult &Result) {
<< Hint;
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

void UnaryStaticAssertCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(staticAssertDecl().bind("static_assert"), this);
Expand All @@ -36,6 +34,4 @@ void UnaryStaticAssertCheck::check(const MatchFinder::MatchResult &Result) {
<< FixItHint::CreateRemoval(AssertMessage->getSourceRange());
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ using namespace clang;
using namespace clang::ast_matchers;
using namespace clang::ast_matchers::internal;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {
namespace {

const char IteratorDeclStmtId[] = "iterator_decl";
Expand Down Expand Up @@ -449,6 +447,4 @@ void UseAutoCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

UseBoolLiteralsCheck::UseBoolLiteralsCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -74,6 +72,4 @@ void UseBoolLiteralsCheck::check(const MatchFinder::MatchResult &Result) {
Expression->getSourceRange(), LiteralBooleanValue ? "true" : "false");
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {
AST_MATCHER_P(InitListExpr, initCountIs, unsigned, N) {
Expand Down Expand Up @@ -296,6 +294,4 @@ void UseDefaultMemberInitCheck::checkExistingInit(
<< FixItHint::CreateRemoval(Init->getSourceRange());
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include "../utils/OptionsUtils.h"
using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {
// Identical to hasAnyName, except it does not take template specifiers into
Expand Down Expand Up @@ -374,6 +372,4 @@ void UseEmplaceCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
utils::options::serializeStringList(EmplacyFunctions));
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static const char SpecialFunction[] = "SpecialFunction";

Expand Down Expand Up @@ -355,6 +353,4 @@ void UseEqualsDefaultCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static const char SpecialFunction[] = "SpecialFunction";
static const char DeletedNotPublic[] = "DeletedNotPublic";
Expand Down Expand Up @@ -75,6 +73,4 @@ void UseEqualsDeleteCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static bool doesNoDiscardMacroExist(ASTContext &Context,
const llvm::StringRef &MacroId) {
Expand Down Expand Up @@ -146,6 +144,4 @@ bool UseNodiscardCheck::isLanguageVersionSupported(
return LangOpts.CPlusPlus;
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

namespace {
AST_MATCHER(NamedDecl, isValid) { return !Node.isInvalidDecl(); }
Expand Down Expand Up @@ -105,6 +103,4 @@ void UseNoexceptCheck::check(const MatchFinder::MatchResult &Result) {
<< ReplacementStr.empty() << ReplacementStr << FixIt;
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ using namespace clang;
using namespace clang::ast_matchers;
using namespace llvm;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {
namespace {

const char CastSequence[] = "sequence";
Expand Down Expand Up @@ -510,6 +508,4 @@ void UseNullptrCheck::check(const MatchFinder::MatchResult &Result) {
.TraverseStmt(const_cast<CastExpr *>(NullCast));
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

UseOverrideCheck::UseOverrideCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
Expand Down Expand Up @@ -228,6 +226,4 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {
namespace {
struct UnqualNameVisitor : public RecursiveASTVisitor<UnqualNameVisitor> {
public:
Expand Down Expand Up @@ -496,6 +494,4 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
<< FixItHint::CreateInsertion(InsertionLoc, " -> " + ReturnType);
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

UseTransparentFunctorsCheck::UseTransparentFunctorsCheck(
StringRef Name, ClangTidyContext *Context)
Expand Down Expand Up @@ -124,6 +122,4 @@ void UseTransparentFunctorsCheck::check(
FunctorTypeLoc.getArgLoc(0).getSourceRange());
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

void UseUncaughtExceptionsCheck::registerMatchers(MatchFinder *Finder) {
std::string MatchText = "::std::uncaught_exception";
Expand Down Expand Up @@ -97,6 +95,4 @@ void UseUncaughtExceptionsCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace modernize {
namespace clang::tidy::modernize {

static constexpr llvm::StringLiteral ParentDeclName = "parent-decl";
static constexpr llvm::StringLiteral TagDeclName = "tag-decl";
Expand Down Expand Up @@ -142,6 +140,4 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
std::string Replacement = Using + Name + " = " + Type;
Diag << FixItHint::CreateReplacement(ReplaceRange, Replacement);
}
} // namespace modernize
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::modernize
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace mpi {
namespace clang::tidy::mpi {

void BufferDerefCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(callExpr().bind("CE"), this);
Expand Down Expand Up @@ -128,6 +126,4 @@ void BufferDerefCheck::checkBuffers(ArrayRef<const Type *> BufferTypes,
}

void BufferDerefCheck::onEndOfTranslationUnit() { FuncClassifier.reset(); }
} // namespace mpi
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::mpi
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/mpi/MPITidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include "BufferDerefCheck.h"
#include "TypeMismatchCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace mpi {

class MPIModule : public ClangTidyModule {
Expand All @@ -34,5 +33,4 @@ static ClangTidyModuleRegistry::Add<mpi::MPIModule>
// and thus register the MPIModule.
volatile int MPIModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/mpi/TypeMismatchCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace mpi {
namespace clang::tidy::mpi {

/// Check if a BuiltinType::Kind matches the MPI datatype.
///
Expand Down Expand Up @@ -330,6 +328,4 @@ void TypeMismatchCheck::checkArguments(ArrayRef<const Type *> BufferTypes,
}

void TypeMismatchCheck::onEndOfTranslationUnit() { FuncClassifier.reset(); }
} // namespace mpi
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::mpi
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/AssertEquals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

// Mapping from `XCTAssert*Equal` to `XCTAssert*EqualObjects` name.
static const std::map<std::string, std::string> &NameMap() {
Expand Down Expand Up @@ -60,6 +58,4 @@ void AssertEquals::check(const ast_matchers::MatchFinder::MatchResult &result) {
}
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/AvoidNSErrorInitCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

void AvoidNSErrorInitCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(objcMessageExpr(hasSelector("init"),
Expand All @@ -31,6 +29,4 @@ void AvoidNSErrorInitCheck::check(const MatchFinder::MatchResult &Result) {
"create a new NSError");
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/DeallocInCategoryCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

void DeallocInCategoryCheck::registerMatchers(MatchFinder *Finder) {
// Non-NSObject/NSProxy-derived objects may not have -dealloc as a special
Expand All @@ -37,6 +35,4 @@ void DeallocInCategoryCheck::check(const MatchFinder::MatchResult &Result) {
<< CID;
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

namespace {

Expand Down Expand Up @@ -80,6 +78,4 @@ void ForbiddenSubclassingCheck::storeOptions(
utils::options::serializeStringList(ForbiddenSuperClassNames));
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

namespace {

Expand Down Expand Up @@ -53,6 +51,4 @@ void MissingHashCheck::check(const MatchFinder::MatchResult &Result) {
<< ID;
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/NSDateFormatterCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

void NSDateFormatterCheck::registerMatchers(MatchFinder *Finder) {
// Adding matchers.
Expand Down Expand Up @@ -105,6 +103,4 @@ void NSDateFormatterCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {
namespace {

static constexpr StringRef WeakText = "__weak";
Expand Down Expand Up @@ -142,6 +140,4 @@ void NSInvocationArgumentLifetimeCheck::check(
Diag << *Hint;
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/objc/ObjCTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace objc {

class ObjCModule : public ClangTidyModule {
Expand Down Expand Up @@ -59,5 +58,4 @@ static ClangTidyModuleRegistry::Add<ObjCModule> X(
// and thus register the ObjCModule.
volatile int ObjCModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

namespace {

Expand Down Expand Up @@ -133,6 +131,4 @@ void PropertyDeclarationCheck::check(const MatchFinder::MatchResult &Result) {
<< generateFixItHint(MatchedDecl, StandardProperty);
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace objc {
namespace clang::tidy::objc {

namespace {

Expand Down Expand Up @@ -104,6 +102,4 @@ void SuperSelfCheck::check(const MatchFinder::MatchResult &Result) {
StringRef("[super init]"));
}

} // namespace objc
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::objc
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/openmp/ExceptionEscapeCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace openmp {
namespace clang::tidy::openmp {

ExceptionEscapeCheck::ExceptionEscapeCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -71,6 +69,4 @@ void ExceptionEscapeCheck::check(const MatchFinder::MatchResult &Result) {
<< getOpenMPDirectiveName(Directive->getDirectiveKind());
}

} // namespace openmp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::openmp
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/openmp/OpenMPTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include "ExceptionEscapeCheck.h"
#include "UseDefaultNoneCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace openmp {

/// This module is for OpenMP-specific checks.
Expand All @@ -37,5 +36,4 @@ static ClangTidyModuleRegistry::Add<OpenMPModule>
// and thus register the OpenMPModule.
volatile int OpenMPModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace openmp {
namespace clang::tidy::openmp {

void UseDefaultNoneCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -55,6 +53,4 @@ void UseDefaultNoneCheck::check(const MatchFinder::MatchResult &Result) {
<< getOpenMPDirectiveName(Directive->getDirectiveKind());
}

} // namespace openmp
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::openmp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

namespace {

Expand Down Expand Up @@ -95,6 +93,4 @@ void FasterStringFindCheck::check(const MatchFinder::MatchResult &Result) {
*Replacement);
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

ForRangeCopyCheck::ForRangeCopyCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
Expand Down Expand Up @@ -132,6 +130,4 @@ bool ForRangeCopyCheck::handleCopyIsOnlyConstReferenced(
return false;
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

// Checks if the stmt is a ImplicitCastExpr with a CastKind that is not a NoOp.
// The subtlety is that in some cases (user defined conversions), we can
Expand Down Expand Up @@ -101,6 +99,4 @@ void ImplicitConversionInLoopCheck::reportAndFix(const ASTContext *Context,
diag(VD->getBeginLoc(), Message) << VD << ConstRefType;
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

static bool areTypesCompatible(QualType Left, QualType Right) {
if (const auto *LeftRefType = Left->getAs<ReferenceType>())
Expand Down Expand Up @@ -148,6 +146,4 @@ void InefficientAlgorithmCheck::check(const MatchFinder::MatchResult &Result) {
<< Hint;
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

void InefficientStringConcatenationCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) {
Expand Down Expand Up @@ -79,6 +77,4 @@ void InefficientStringConcatenationCheck::check(
diag(PlusOperator->getExprLoc(), DiagMsg);
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

namespace {

Expand Down Expand Up @@ -273,6 +271,4 @@ void InefficientVectorOperationCheck::check(
}
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

static void replaceCallWithArg(const CallExpr *Call, DiagnosticBuilder &Diag,
const SourceManager &SM,
Expand Down Expand Up @@ -206,6 +204,4 @@ void MoveConstArgCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

MoveConstructorInitCheck::MoveConstructorInitCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -84,6 +82,4 @@ void MoveConstructorInitCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

NoAutomaticMoveCheck::NoAutomaticMoveCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -67,6 +65,4 @@ void NoAutomaticMoveCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
utils::options::serializeStringList(AllowedTypes));
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
8 changes: 2 additions & 6 deletions clang-tools-extra/clang-tidy/performance/NoIntToPtrCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

void NoIntToPtrCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(castExpr(hasCastKind(CK_IntegralToPointer),
Expand All @@ -29,6 +27,4 @@ void NoIntToPtrCheck::check(const MatchFinder::MatchResult &Result) {
"integer to pointer cast pessimizes optimization opportunities");
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

void NoexceptMoveConstructorCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -77,6 +75,4 @@ void NoexceptMoveConstructorCheck::check(
}
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
#include "UnnecessaryCopyInitialization.h"
#include "UnnecessaryValueParamCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace performance {

class PerformanceModule : public ClangTidyModule {
Expand Down Expand Up @@ -74,5 +73,4 @@ static ClangTidyModuleRegistry::Add<PerformanceModule>
// and thus register the PerformanceModule.
volatile int PerformanceModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ using namespace clang::ast_matchers;
using namespace clang::ast_matchers::internal;
using namespace clang::tidy::matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

namespace {

Expand Down Expand Up @@ -74,6 +72,4 @@ void TriviallyDestructibleCheck::check(const MatchFinder::MatchResult &Result) {
DiagnosticIDs::Note);
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

namespace {
AST_MATCHER_P(Type, isBuiltinType, BuiltinType::Kind, Kind) {
Expand Down Expand Up @@ -195,6 +193,4 @@ void TypePromotionInMathFnCheck::check(const MatchFinder::MatchResult &Result) {
"<cmath>");
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#include "clang/Basic/Diagnostic.h"
#include <optional>

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {
namespace {

using namespace ::clang::ast_matchers;
Expand Down Expand Up @@ -370,6 +368,4 @@ void UnnecessaryCopyInitialization::storeOptions(
utils::options::serializeStringList(ExcludedContainerTypes));
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace performance {
namespace clang::tidy::performance {

namespace {

Expand Down Expand Up @@ -193,6 +191,4 @@ void UnnecessaryValueParamCheck::handleMoveFix(const ParmVarDecl &Var,
SM.getFileID(CopyArgument.getBeginLoc()), "<utility>");
}

} // namespace performance
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::performance
6 changes: 2 additions & 4 deletions clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
#include "clang/Frontend/FrontendPluginRegistry.h"
#include "clang/Frontend/MultiplexConsumer.h"

namespace clang {
namespace tidy {
namespace clang::tidy {

/// The core clang tidy plugin action. This just provides the AST consumer and
/// command line flag parsing for using clang-tidy as a clang plugin.
Expand Down Expand Up @@ -75,8 +74,7 @@ class ClangTidyPluginAction : public PluginASTAction {
private:
std::unique_ptr<ClangTidyContext> Context;
};
} // namespace tidy
} // namespace clang
} // namespace clang::tidy

// This anchor is used to force the linker to link in the generated object file
// and thus register the clang-tidy plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include "SIMDIntrinsicsCheck.h"
#include "StdAllocatorConstCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace portability {

class PortabilityModule : public ClangTidyModule {
Expand All @@ -39,5 +38,4 @@ static ClangTidyModuleRegistry::Add<PortabilityModule>
// and thus register the PortabilityModule.
volatile int PortabilityModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#include "llvm/Support/Path.h"
#include <cstring>

namespace clang {
namespace tidy {
namespace portability {
namespace clang::tidy::portability {

void RestrictedIncludesPPCallbacks::InclusionDirective(
SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName,
Expand Down Expand Up @@ -75,6 +73,4 @@ void RestrictSystemIncludesCheck::storeOptions(
Options.store(Opts, "Includes", AllowedIncludes);
}

} // namespace portability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::portability
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace portability {
namespace clang::tidy::portability {

namespace {

Expand Down Expand Up @@ -146,6 +144,4 @@ void SIMDIntrinsicsCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace portability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::portability
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace portability {
namespace clang::tidy::portability {

void StdAllocatorConstCheck::registerMatchers(MatchFinder *Finder) {
// Match std::allocator<const T>.
Expand Down Expand Up @@ -66,6 +64,4 @@ void StdAllocatorConstCheck::check(const MatchFinder::MatchResult &Result) {
"libraries");
}

} // namespace portability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::portability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {
namespace {

SourceRange getTypeRange(const ParmVarDecl &Param) {
Expand Down Expand Up @@ -89,6 +87,4 @@ void AvoidConstParamsInDecls::check(const MatchFinder::MatchResult &Result) {
CharSourceRange::getTokenRange(Tok->getLocation(), Tok->getLocation()));
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

static tok::TokenKind getTokenKind(SourceLocation Loc, const SourceManager &SM,
const ASTContext *Context) {
Expand Down Expand Up @@ -269,6 +267,4 @@ void BracesAroundStatementsCheck::onEndOfTranslationUnit() {
ForceBracesStmts.clear();
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

// Finds the location of the qualifying `const` token in the `FunctionDecl`'s
// return type. Returns `std::nullopt` when the return type is not
Expand Down Expand Up @@ -157,6 +155,4 @@ void ConstReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
diag(Loc, "could not transform this declaration", DiagnosticIDs::Note);
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) {
const auto SupportedContainers = hasType(
Expand Down Expand Up @@ -137,6 +135,4 @@ void ContainerContainsCheck::check(const MatchFinder::MatchResult &Result) {
CallEnd.getLocWithOffset(1), ComparisonEnd.getLocWithOffset(1)));
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

constexpr llvm::StringLiteral ContainerExprName = "container-expr";
constexpr llvm::StringLiteral DerefContainerExprName = "deref-container-expr";
Expand Down Expand Up @@ -114,6 +112,4 @@ void ContainerDataPointerCheck::check(const MatchFinder::MatchResult &Result) {
"the address of the 0-th element")
<< Hint;
}
} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ AST_MATCHER(QualType, isIntegralType) {
return Node->isIntegralType(Finder->getASTContext());
}
} // namespace ast_matchers
namespace tidy {
namespace readability {
namespace tidy::readability {

using utils::isBinaryOrTernary;

Expand Down Expand Up @@ -328,6 +327,5 @@ void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) {
<< Container;
}

} // namespace readability
} // namespace tidy
} // namespace tidy::readability
} // namespace clang
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

AST_MATCHER(CXXMethodDecl, isStatic) { return Node.isStatic(); }

Expand Down Expand Up @@ -167,6 +165,4 @@ void ConvertMemberFunctionsToStatic::check(
Diag << FixItHint::CreateInsertion(Declaration->getBeginLoc(), "static ");
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void DeleteNullPointerCheck::registerMatchers(MatchFinder *Finder) {
const auto DeleteExpr =
Expand Down Expand Up @@ -73,6 +71,4 @@ void DeleteNullPointerCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
#include "llvm/ADT/SmallVector.h"
#include <memory>

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

static SourceLocation advanceBeyondCurrentLine(const SourceManager &SM,
SourceLocation Start,
Expand Down Expand Up @@ -111,6 +109,4 @@ void DuplicateIncludeCheck::registerPPCallbacks(
PP->addPPCallbacks(std::make_unique<DuplicateIncludeCallbacks>(*this, SM));
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {

Expand Down Expand Up @@ -324,6 +322,4 @@ void ElseAfterReturnCheck::check(const MatchFinder::MatchResult &Result) {
removeElseAndBrackets(Diag, *Result.Context, Else, ElseLoc);
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {
namespace {

struct CognitiveComplexity final {
Expand Down Expand Up @@ -562,6 +560,4 @@ void FunctionCognitiveComplexityCheck::check(
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {
namespace {

class FunctionASTVisitor : public RecursiveASTVisitor<FunctionASTVisitor> {
Expand Down Expand Up @@ -221,6 +219,4 @@ void FunctionSizeCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

const unsigned DefaultMinimumVariableNameLength = 3;
const unsigned DefaultMinimumLoopCounterNameLength = 2;
Expand Down Expand Up @@ -151,6 +149,4 @@ void IdentifierLengthCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace clang::tidy {

llvm::ArrayRef<
std::pair<readability::IdentifierNamingCheck::CaseType, StringRef>>
Expand Down Expand Up @@ -1451,5 +1450,4 @@ IdentifierNamingCheck::getStyleForFile(StringRef FileName) const {
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {

Expand Down Expand Up @@ -391,6 +389,4 @@ void ImplicitBoolConversionCheck::handleCastFromBool(
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {

Expand Down Expand Up @@ -350,6 +348,4 @@ void InconsistentDeclarationParameterNameCheck::markRedeclarationsAsVisited(
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
using namespace clang::ast_matchers;
using namespace clang::tidy::utils::lexer;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {
AST_MATCHER(DeclStmt, isSingleDecl) { return Node.isSingleDecl(); }
Expand Down Expand Up @@ -273,6 +271,4 @@ void IsolateDeclarationCheck::check(const MatchFinder::MatchResult &Result) {
Diag << FixItHint::CreateReplacement(WholeDecl->getSourceRange(),
Replacement);
}
} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ static bool isUsedToDefineABitField(const MatchFinder::MatchResult &Result,
});
}

namespace tidy {
namespace readability {
namespace tidy::readability {

const char DefaultIgnoredIntegerValues[] = "1;2;3;4;";
const char DefaultIgnoredFloatingPointValues[] = "1.0;100.0;";
Expand Down Expand Up @@ -225,6 +224,5 @@ bool MagicNumbersCheck::isBitFieldWidth(
});
}

} // namespace readability
} // namespace tidy
} // namespace tidy::readability
} // namespace clang
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

AST_MATCHER(CXXMethodDecl, isStatic) { return Node.isStatic(); }

Expand Down Expand Up @@ -267,6 +265,4 @@ void MakeMemberFunctionConstCheck::check(
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

static const IfStmt *getPrecedingIf(const SourceManager &SM,
ASTContext *Context, const IfStmt *If) {
Expand Down Expand Up @@ -121,6 +119,4 @@ void MisleadingIndentationCheck::check(const MatchFinder::MatchResult &Result) {
missingBracesCheck(*Result.SourceManager, CStmt);
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void MisplacedArrayIndexCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -52,6 +50,4 @@ void MisplacedArrayIndexCheck::check(const MatchFinder::MatchResult &Result) {
ArraySubscriptE->getRHS()->getSourceRange(), LText);
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void NamedParameterCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
Finder->addMatcher(functionDecl().bind("decl"), this);
Expand Down Expand Up @@ -117,6 +115,4 @@ void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

NamespaceCommentCheck::NamespaceCommentCheck(StringRef Name,
ClangTidyContext *Context)
Expand Down Expand Up @@ -204,6 +202,4 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
<< NamespaceNameForDiag;
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void NonConstParameterCheck::registerMatchers(MatchFinder *Finder) {
// Add parameters to Parameters.
Expand Down Expand Up @@ -233,6 +231,4 @@ void NonConstParameterCheck::markCanNotBeConst(const Expr *E,
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {

Expand Down Expand Up @@ -286,6 +284,4 @@ void QualifiedAutoCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
#include "UppercaseLiteralSuffixCheck.h"
#include "UseAnyOfAllOfCheck.h"

namespace clang {
namespace tidy {
namespace clang::tidy {
namespace readability {

class ReadabilityModule : public ClangTidyModule {
Expand Down Expand Up @@ -156,5 +155,4 @@ static ClangTidyModuleRegistry::Add<ReadabilityModule>
// and thus register the ReadabilityModule.
volatile int ReadabilityModuleAnchorSource = 0;

} // namespace tidy
} // namespace clang
} // namespace clang::tidy
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void RedundantAccessSpecifiersCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand Down Expand Up @@ -77,6 +75,4 @@ void RedundantAccessSpecifiersCheck::check(
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {

Expand Down Expand Up @@ -91,6 +89,4 @@ void RedundantControlFlowCheck::issueDiagnostic(
diag(StmtRange.getBegin(), Diag) << FixItHint::CreateRemoval(RemovedRange);
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

AST_MATCHER(FunctionDecl, doesDeclarationForceExternallyVisibleDefinition) {
return Node.doesDeclarationForceExternallyVisibleDefinition();
Expand Down Expand Up @@ -86,6 +84,4 @@ void RedundantDeclarationCheck::check(const MatchFinder::MatchResult &Result) {
}
diag(Prev->getLocation(), "previously declared here", DiagnosticIDs::Note);
}
} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void RedundantFunctionPtrDereferenceCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
Expand All @@ -32,6 +30,4 @@ void RedundantFunctionPtrDereferenceCheck::check(const MatchFinder::MatchResult
<< FixItHint::CreateRemoval(Operator->getOperatorLoc());
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
using namespace clang::ast_matchers;
using namespace clang::tidy::matchers;

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

void RedundantMemberInitCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "IgnoreBaseInCopyConstructors",
Expand Down Expand Up @@ -69,6 +67,4 @@ void RedundantMemberInitCheck::check(const MatchFinder::MatchResult &Result) {
}
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"

namespace clang {
namespace tidy {
namespace readability {
namespace clang::tidy::readability {

namespace {
/// Information about an opening preprocessor directive.
Expand Down Expand Up @@ -104,6 +102,4 @@ void RedundantPreprocessorCheck::registerPPCallbacks(
::std::make_unique<RedundantPreprocessorCallbacks>(*this, *PP));
}

} // namespace readability
} // namespace tidy
} // namespace clang
} // namespace clang::tidy::readability
Loading