[clang-tidy][NFC] Made Globlist::contains const
authorNathan James <n.james93@hotmail.co.uk>
Tue, 8 Dec 2020 22:26:55 +0000 (22:26 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Tue, 8 Dec 2020 22:26:55 +0000 (22:26 +0000)
clang-tools-extra/clang-tidy/GlobList.cpp
clang-tools-extra/clang-tidy/GlobList.h

index 88e6ea2..5b70b8d 100644 (file)
@@ -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)) {
index 5acb6a5..fe68a34 100644 (file)
@@ -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: