9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNUSEDRETURNVALUECHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_UNUSEDRETURNVALUECHECK_H
12#include "../ClangTidyCheck.h"
26 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
28 return TK_IgnoreUnlessSpelledInSource;
32 const std::vector<StringRef> CheckedFunctions;
33 const std::vector<StringRef> CheckedReturnTypes;
37 std::vector<StringRef> CheckedFunctions);
39 std::vector<StringRef> CheckedFunctions,
40 std::vector<StringRef> CheckedReturnTypes,
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Detects function calls where the return value is unused.
UnusedReturnValueCheck(StringRef Name, ClangTidyContext *Context)
std::optional< TraversalKind > getCheckTraversalKind() const override
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
UnusedReturnValueCheck(StringRef Name, ClangTidyContext *Context, std::vector< StringRef > CheckedFunctions)
UnusedReturnValueCheck(StringRef Name, ClangTidyContext *Context, std::vector< StringRef > CheckedFunctions, std::vector< StringRef > CheckedReturnTypes, bool AllowCastToVoid)
llvm::StringMap< ClangTidyValue > OptionMap