[PATCH] D87468: [Support] Add GlobPattern::isTrivialMatchAll()

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 07:15:31 PDT 2020


andrewng marked 2 inline comments as done.
andrewng added inline comments.


================
Comment at: llvm/unittests/Support/GlobPatternTest.cpp:141
+  EXPECT_TRUE(Pat1->isTrivialMatchAll());
+  Expected<GlobPattern> Pat2 = GlobPattern::create("a*");
+  EXPECT_TRUE((bool)Pat2);
----------------
MaskRay wrote:
> MaskRay wrote:
> > Most patterns are expected to return false.
> > 
> > The negative patterns can be organized as a const char * array to improve readability
> You don't need ` EXPECT_TRUE((bool)Pat2);` because it is implied by the following `Pat2->`
Although it is implied by the `->` operator, it feels better to keep the check separate and this is the pattern followed by the other tests in this file.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87468/new/

https://reviews.llvm.org/D87468



More information about the llvm-commits mailing list