[PATCH] D91033: [clang-tidy][NFC] Tweak GlobList to iterate backwards

2020-11-10 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe076fee63dd3: [clang-tidy][NFC] Tweak GlobList to iterate backwards (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D91033?vs=303725&id=304166#toc Repository: rG LLVM Github

[PATCH] D91033: [clang-tidy][NFC] Tweak GlobList to iterate backwards

2020-11-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/GlobList.cpp:56 bool GlobList::contains(StringRef S) { - bool Contains = false; - for (const GlobListItem &Item : Items) { + for (const GlobListItem &Item : llvm::reverse(Items)) { if (Item.Reg

[PATCH] D91033: [clang-tidy][NFC] Tweak GlobList to iterate backwards

2020-11-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/GlobList.cpp:56 bool GlobList::contains(StringRef S) { - bool Contains = false; - for (const GlobListItem &Item : Items) { + for (const GlobListItem &Item : llvm::reverse(Items)) { if (Item.Regex.ma

[PATCH] D91033: [clang-tidy][NFC] Tweak GlobList to iterate backwards

2020-11-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a request to add a comment. Comment at: clang-tools-extra/clang-tidy/GlobList.cpp:56 bool GlobList::contains(StringRef S) { - bool Contains = false;