|
clang-tools 24.0.0git
|
Warns when 'value_or' is called on an optional type whose underlying type is expensive to copy (not trivially copyable, or larger than a threshold). More...
#include <ExpensiveValueOrCheck.h>
Public Member Functions | |
| ExpensiveValueOrCheck (StringRef Name, ClangTidyContext *Context) | |
| bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
| void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
| void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
| void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
Warns when 'value_or' is called on an optional type whose underlying type is expensive to copy (not trivially copyable, or larger than a threshold).
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/expensive-value-or.html
Definition at line 22 of file ExpensiveValueOrCheck.h.
| clang::tidy::performance::ExpensiveValueOrCheck::ExpensiveValueOrCheck | ( | StringRef | Name, |
| ClangTidyContext * | Context ) |
Definition at line 96 of file ExpensiveValueOrCheck.cpp.
|
override |
Definition at line 150 of file ExpensiveValueOrCheck.cpp.
References clang::tidy::performance::buildFixIt(), clang::tidy::performance::buildSuggestion(), and Fix().
|
inlineoverride |
Definition at line 25 of file ExpensiveValueOrCheck.h.
|
override |
Definition at line 112 of file ExpensiveValueOrCheck.cpp.
References clang::tidy::matchers::matchesAnyListedRegexName().
|
override |
Definition at line 105 of file ExpensiveValueOrCheck.cpp.
References clang::tidy::utils::options::serializeStringList().