//===--- tools/extra/clang-tidy/GlobList.cpp ------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "GlobList.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" namespace clang::tidy { // Returns true if GlobList starts with the negative indicator ('-'), removes it // from the GlobList. static bool consumeNegativeIndicator(StringRef &GlobList) { … } // Extracts the first glob from the comma-separated list of globs, // removes it and the trailing comma from the GlobList and // returns the extracted glob. static llvm::StringRef extractNextGlob(StringRef &GlobList) { … } static llvm::Regex createRegexFromGlob(StringRef &Glob) { … } GlobList::GlobList(StringRef Globs, bool KeepNegativeGlobs /* =true */) { … } bool GlobList::contains(StringRef S) const { … } bool CachedGlobList::contains(StringRef S) const { … } } // namespace clang::tidy