clang-tools 22.0.0git
|
Detects function calls where the return value is unused. More...
#include <UnusedReturnValueCheck.h>
Public Member Functions | |
UnusedReturnValueCheck (StringRef Name, ClangTidyContext *Context) | |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Protected Member Functions | |
UnusedReturnValueCheck (StringRef Name, ClangTidyContext *Context, std::vector< StringRef > CheckedFunctions) | |
UnusedReturnValueCheck (StringRef Name, ClangTidyContext *Context, std::vector< StringRef > CheckedFunctions, std::vector< StringRef > CheckedReturnTypes, bool AllowCastToVoid) |
Protected Attributes | |
bool | AllowCastToVoid |
Detects function calls where the return value is unused.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unused-return-value.html
Definition at line 21 of file UnusedReturnValueCheck.h.
clang::tidy::bugprone::UnusedReturnValueCheck::UnusedReturnValueCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
|
protected |
|
protected |
References AllowCastToVoid.
|
override |
Definition at line 217 of file UnusedReturnValueCheck.cpp.
References AllowCastToVoid, and check().
Referenced by check().
|
inlineoverride |
Definition at line 27 of file UnusedReturnValueCheck.h.
|
override |
Definition at line 172 of file UnusedReturnValueCheck.cpp.
References AllowCastToVoid, clang::tidy::matchers::matchesAnyListedName(), and registerMatchers().
Referenced by registerMatchers().
|
override |
Definition at line 164 of file UnusedReturnValueCheck.cpp.
References AllowCastToVoid, clang::tidy::utils::options::serializeStringList(), and storeOptions().
Referenced by storeOptions().
|
protected |
Definition at line 42 of file UnusedReturnValueCheck.h.
Referenced by check(), registerMatchers(), storeOptions(), clang::tidy::hicpp::IgnoredRemoveResultCheck::storeOptions(), and UnusedReturnValueCheck().