9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GLOBLIST_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GLOBLIST_H
12#include "clang/Basic/LLVM.h"
13#include "llvm/ADT/SmallVector.h"
14#include "llvm/ADT/StringMap.h"
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Regex.h"
37 GlobList(StringRef Globs,
bool KeepNegativeGlobs =
true);
41 virtual bool contains(StringRef S)
const;
49 SmallVector<GlobListItem, 0> Items;
52 const SmallVectorImpl<GlobListItem> &
getItems()
const {
return Items; };
62 bool contains(StringRef S)
const override;
65 mutable llvm::StringMap<bool> Cache;
A GlobList that caches search results, so that search is performed only once for the same query.
bool contains(StringRef S) const override
Read-only set of strings represented as a list of positive and negative globs.
GlobList(StringRef Globs, bool KeepNegativeGlobs=true)
Globs is a comma-separated list of globs (only the '*' metacharacter is supported) with an optional '...
virtual bool contains(StringRef S) const
Returns true if the pattern matches S.
const SmallVectorImpl< GlobListItem > & getItems() const
virtual ~GlobList()=default