clang-tools 22.0.0git
clang::tidy::abseil::FasterStrsplitDelimiterCheck Class Reference

Finds instances of absl::StrSplit() or absl::MaxSplits() where the delimiter is a single character string literal and replaces it with a character. More...

#include <FasterStrsplitDelimiterCheck.h>

Inheritance diagram for clang::tidy::abseil::FasterStrsplitDelimiterCheck:
[legend]

Public Member Functions

 FasterStrsplitDelimiterCheck (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

Detailed Description

Finds instances of absl::StrSplit() or absl::MaxSplits() where the delimiter is a single character string literal and replaces it with a character.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/abseil/faster-strsplit-delimiter.html

Definition at line 21 of file FasterStrsplitDelimiterCheck.h.

Constructor & Destructor Documentation

◆ FasterStrsplitDelimiterCheck()

clang::tidy::abseil::FasterStrsplitDelimiterCheck::FasterStrsplitDelimiterCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file FasterStrsplitDelimiterCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::abseil::FasterStrsplitDelimiterCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 100 of file FasterStrsplitDelimiterCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::abseil::FasterStrsplitDelimiterCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file FasterStrsplitDelimiterCheck.h.

◆ registerMatchers()

void clang::tidy::abseil::FasterStrsplitDelimiterCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 58 of file FasterStrsplitDelimiterCheck.cpp.


The documentation for this class was generated from the following files: