#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "../readability/BracesAroundStatementsCheck.h"
-#include "../readability/FunctionSize.h"
+#include "../readability/FunctionSizeCheck.h"
#include "../readability/NamespaceCommentCheck.h"
-#include "../readability/RedundantSmartptrGet.h"
+#include "../readability/RedundantSmartptrGetCheck.h"
#include "AvoidCStyleCastsCheck.h"
#include "ExplicitConstructorCheck.h"
#include "ExplicitMakePairCheck.h"
.registerCheck<clang::tidy::readability::NamespaceCommentCheck>(
"google-readability-namespace-comments");
CheckFactories
- .registerCheck<clang::tidy::readability::RedundantSmartptrGet>(
+ .registerCheck<clang::tidy::readability::RedundantSmartptrGetCheck>(
"google-readability-redundant-smartptr-get");
}
add_clang_library(clangTidyReadabilityModule
BracesAroundStatementsCheck.cpp
- ContainerSizeEmpty.cpp
+ ContainerSizeEmptyCheck.cpp
ElseAfterReturnCheck.cpp
- FunctionSize.cpp
+ FunctionSizeCheck.cpp
NamespaceCommentCheck.cpp
ReadabilityTidyModule.cpp
- RedundantSmartptrGet.cpp
+ RedundantSmartptrGetCheck.cpp
ShrinkToFitCheck.cpp
LINK_LIBS
-//===--- ContainerSizeEmpty.cpp - clang-tidy ------------------------------===//
+//===--- ContainerSizeEmptyCheck.cpp - clang-tidy -------------------------===//
//
// The LLVM Compiler Infrastructure
//
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#include "ContainerSizeEmpty.h"
+#include "ContainerSizeEmptyCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Lex/Lexer.h"
-//===--- ContainerSizeEmpty.h - clang-tidy ----------------------*- C++ -*-===//
+//===--- ContainerSizeEmptyCheck.h - clang-tidy -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTY_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTY_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTYCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTYCHECK_H
#include "../ClangTidy.h"
} // namespace tidy
} // namespace clang
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTY_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONTAINERSIZEEMPTYCHECK_H
//
//===----------------------------------------------------------------------===//
-#include "FunctionSize.h"
+#include "FunctionSizeCheck.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
using namespace clang::ast_matchers;
-//===--- FunctionSize.h - clang-tidy ----------------------------*- C++ -*-===//
+//===--- FunctionSizeCheck.h - clang-tidy -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZE_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZE_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
#include "../ClangTidy.h"
} // namespace tidy
} // namespace clang
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZE_H
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_FUNCTIONSIZECHECK_H
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "BracesAroundStatementsCheck.h"
-#include "ContainerSizeEmpty.h"
+#include "ContainerSizeEmptyCheck.h"
#include "ElseAfterReturnCheck.h"
-#include "FunctionSize.h"
-#include "RedundantSmartptrGet.h"
+#include "FunctionSizeCheck.h"
+#include "RedundantSmartptrGetCheck.h"
#include "ShrinkToFitCheck.h"
namespace clang {
"readability-else-after-return");
CheckFactories.registerCheck<FunctionSizeCheck>(
"readability-function-size");
- CheckFactories.registerCheck<RedundantSmartptrGet>(
+ CheckFactories.registerCheck<RedundantSmartptrGetCheck>(
"readability-redundant-smartptr-get");
CheckFactories.registerCheck<ShrinkToFitCheck>(
"readability-shrink-to-fit");
-//===--- RedundantSmartptrGet.cpp - clang-tidy ----------------------------===//
+//===--- RedundantSmartptrGetCheck.cpp - clang-tidy -----------------------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#include "RedundantSmartptrGet.h"
+#include "RedundantSmartptrGetCheck.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
} // namespace
-void RedundantSmartptrGet::registerMatchers(MatchFinder *Finder) {
+void RedundantSmartptrGetCheck::registerMatchers(MatchFinder *Finder) {
registerMatchersForGetArrowStart(Finder, this);
registerMatchersForGetEquals(Finder, this);
}
}
} // namespace
-void RedundantSmartptrGet::check(const MatchFinder::MatchResult &Result) {
+void RedundantSmartptrGetCheck::check(const MatchFinder::MatchResult &Result) {
if (!allReturnTypesMatch(Result)) return;
bool IsPtrToPtr = Result.Nodes.getNodeAs<Decl>("ptr_to_ptr") != nullptr;
-//===--- RedundantSmartptrGet.h - clang-tidy --------------------*- C++ -*-===//
+//===--- RedundantSmartptrGetCheck.h - clang-tidy ---------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGET_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGET_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGETCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGETCHECK_H
#include "../ClangTidy.h"
/// ptr.get()->Foo() ==> ptr->Foo()
/// *ptr.get() ==> *ptr
/// *ptr->get() ==> **ptr
-class RedundantSmartptrGet : public ClangTidyCheck {
+class RedundantSmartptrGetCheck : public ClangTidyCheck {
public:
- RedundantSmartptrGet(StringRef Name, ClangTidyContext *Context)
+ RedundantSmartptrGetCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
} // namespace tidy
} // namespace clang
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGET_H
-
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_REDUNDANTSMARTPTRGETCHECK_H