From 86436a4343628f0f98d72169a013cf99a3be5973 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 8 Dec 2020 22:26:55 +0000 Subject: [PATCH] [clang-tidy][NFC] Made Globlist::contains const --- clang-tools-extra/clang-tidy/GlobList.cpp | 2 +- clang-tools-extra/clang-tidy/GlobList.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clang-tidy/GlobList.cpp b/clang-tools-extra/clang-tidy/GlobList.cpp index 88e6ea2..5b70b8d 100644 --- a/clang-tools-extra/clang-tidy/GlobList.cpp +++ b/clang-tools-extra/clang-tidy/GlobList.cpp @@ -52,7 +52,7 @@ GlobList::GlobList(StringRef Globs) { } while (!Globs.empty()); } -bool GlobList::contains(StringRef S) { +bool GlobList::contains(StringRef S) const { // Iterating the container backwards as the last match determins if S is in // the list. for (const GlobListItem &Item : llvm::reverse(Items)) { diff --git a/clang-tools-extra/clang-tidy/GlobList.h b/clang-tools-extra/clang-tidy/GlobList.h index 5acb6a5..fe68a34 100644 --- a/clang-tools-extra/clang-tidy/GlobList.h +++ b/clang-tools-extra/clang-tidy/GlobList.h @@ -33,7 +33,7 @@ public: /// Returns \c true if the pattern matches \p S. The result is the last /// matching glob's Positive flag. - bool contains(StringRef S); + bool contains(StringRef S) const; private: -- 2.7.4