[PATCH] D54336: [FileCheck] introduce CHECK-COUNT-<num> repetition directive

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 17:48:02 PST 2018


dblaikie added inline comments.


================
Comment at: lib/Support/FileCheck.cpp:586-588
+  if (NextChar == ':') {
+    return {Check::CheckPlain, Rest};
+  }
----------------
Bit inconsistent (with LLVM style, and within this file specifically) to have {} on this single-line block (& another further down (consumeInteger))?


================
Comment at: lib/Support/FileCheck.cpp:707
   // We ran out of buffer while skipping partial matches so give up.
-  return StringRef();
+  return {StringRef(), StringRef()};
 }
----------------
Does this work as {"", ""}? or does that do the wrong thing/not compile?


================
Comment at: lib/Support/FileCheck.cpp:763-766
+    if (AfterSuffix.empty())
+      Buffer = Buffer.drop_front(UsedPrefix.size());
+    else
+      Buffer = AfterSuffix;
----------------
I'd probably use a conditional operator here, but not a huge deal by any means if you prefer it this way.


Repository:
  rL LLVM

https://reviews.llvm.org/D54336





More information about the llvm-commits mailing list