clang-tools 22.0.0git
|
Add [[nodiscard]] to non-void const-member functions with no arguments or pass-by-value or pass by const-reference arguments. More...
#include <UseNodiscardCheck.h>
Public Member Functions | |
UseNodiscardCheck (StringRef Name, ClangTidyContext *Context) | |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Add [[nodiscard]] to non-void const-member functions with no arguments or pass-by-value or pass by const-reference arguments.
Is converted to:
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-nodiscard.html
Definition at line 32 of file UseNodiscardCheck.h.
clang::tidy::modernize::UseNodiscardCheck::UseNodiscardCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 76 of file UseNodiscardCheck.cpp.
|
override |
Definition at line 110 of file UseNodiscardCheck.cpp.
References clang::tidy::modernize::doesNoDiscardMacroExist().
|
override |
Definition at line 135 of file UseNodiscardCheck.cpp.
|
override |
Definition at line 84 of file UseNodiscardCheck.cpp.
|
override |
Definition at line 80 of file UseNodiscardCheck.cpp.