clang-tools 20.0.0git
|
Read-only set of strings represented as a list of positive and negative globs. More...
#include <GlobList.h>
Public Member Functions | |
virtual | ~GlobList ()=default |
GlobList (StringRef Globs, bool KeepNegativeGlobs=true) | |
Globs is a comma-separated list of globs (only the '*' metacharacter is supported) with an optional '-' prefix to denote exclusion. | |
virtual bool | contains (StringRef S) const |
Returns true if the pattern matches S . | |
const SmallVectorImpl< GlobListItem > & | getItems () const |
Read-only set of strings represented as a list of positive and negative globs.
Positive globs add all matched strings to the set, negative globs remove them in the order of appearance in the list.
Definition at line 25 of file GlobList.h.
|
virtualdefault |
References Text.
clang::tidy::GlobList::GlobList | ( | StringRef | Globs, |
bool | KeepNegativeGlobs = true |
||
) |
Globs
is a comma-separated list of globs (only the '*' metacharacter is supported) with an optional '-' prefix to denote exclusion.
An empty Globs
string is interpreted as one glob that matches an empty string.
KeepNegativeGlobs
a bool flag indicating whether to keep negative globs from Globs
or not. When false, negative globs are simply ignored.
Definition at line 46 of file GlobList.cpp.
References clang::tidy::consumeNegativeIndicator(), clang::tidy::createRegexFromGlob(), and clang::tidy::extractNextGlob().
|
virtual |
Returns true
if the pattern matches S
.
The result is the last matching glob's Positive flag.
Reimplemented in clang::tidy::CachedGlobList.
Definition at line 58 of file GlobList.cpp.
Referenced by clang::tidy::portability::RestrictSystemIncludesCheck::contains(), and clang::tidy::CachedGlobList::contains().
|
inline |
Definition at line 52 of file GlobList.h.