clang-tools 22.0.0git
|
Checks for common roundabout ways to express starts_with and / ends_with and suggests replacing with the simpler method when it is / available. More...
#include <UseStartsEndsWithCheck.h>
Public Member Functions | |
UseStartsEndsWithCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Checks for common roundabout ways to express starts_with and / ends_with and suggests replacing with the simpler method when it is / available.
Notably, this will work with std::string and / std::string_view.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-starts-ends-with.html
Definition at line 23 of file UseStartsEndsWithCheck.h.
clang::tidy::modernize::UseStartsEndsWithCheck::UseStartsEndsWithCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 98 of file UseStartsEndsWithCheck.cpp.
|
override |
Definition at line 223 of file UseStartsEndsWithCheck.cpp.
References clang::tidy::modernize::isNegativeComparison().
|
inlineoverride |
Definition at line 31 of file UseStartsEndsWithCheck.h.
|
inlineoverride |
Definition at line 28 of file UseStartsEndsWithCheck.h.
|
override |
Definition at line 102 of file UseStartsEndsWithCheck.cpp.