#include "UnusedReturnValueCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/OperatorKinds.h"
usingnamespaceclang::ast_matchers;
usingnamespaceclang::ast_matchers::internal;
namespace clang::tidy::bugprone {
namespace {
AST_MATCHER_P(FunctionDecl, isInstantiatedFrom, Matcher<FunctionDecl>,
InnerMatcher) { … }
constexpr std::initializer_list<OverloadedOperatorKind>
AssignmentOverloadedOperatorKinds = …;
AST_MATCHER(FunctionDecl, isAssignmentOverloadedOperator) { … }
}
UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name,
ClangTidyContext *Context)
: … { … }
UnusedReturnValueCheck::UnusedReturnValueCheck(
llvm::StringRef Name, ClangTidyContext *Context,
std::vector<StringRef> CheckedFunctions)
: … { … }
UnusedReturnValueCheck::UnusedReturnValueCheck(
llvm::StringRef Name, ClangTidyContext *Context,
std::vector<StringRef> CheckedFunctions,
std::vector<StringRef> CheckedReturnTypes, bool AllowCastToVoid)
: … { … }
void UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) { … }
void UnusedReturnValueCheck::check(const MatchFinder::MatchResult &Result) { … }
}