clang-tools 10.0.0

Classes | Public Member Functions | List of all members
clang::tidy::GlobList Class Reference

Read-only set of strings represented as a list of positive and negative globs. More...

`#include <GlobList.h>`

## Public Member Functions
| GlobList (StringRef Globs)
| `Globs` is a comma-separated list of globs (only the '*' metacharacter is supported) with an optional '-' prefix to denote exclusion. More...
bool | contains (StringRef S)
| Returns `true` if the pattern matches `S`. More...

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ GlobList()

GlobList::GlobList | ( | StringRef | Globs | ) |

`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.

Definition at line 45 of file GlobList.cpp.

References ConsumeGlob(), and ConsumeNegativeIndicator().

## Member Function Documentation

## ◆ contains()

bool GlobList::contains | ( | StringRef | S | ) |

Returns `true` if the pattern matches `S`.

The result is the last matching glob's Positive flag.

Definition at line 54 of file GlobList.cpp.

Referenced by clang::tidy::fuchsia::RestrictSystemIncludesCheck::contains().

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

- GlobList.h
- GlobList.cpp