[PATCH] D121754: [clang-format] Refactor determineStarAmpUsage

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 15:25:13 PDT 2022


sstwcw marked 5 inline comments as done.
sstwcw added inline comments.


================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:85
+  auto Tokens = annotate("x - 0");
+  EXPECT_EQ(Tokens.size(), 4u) << Tokens;
+  EXPECT_TOKEN(Tokens[1], tok::minus, TT_BinaryOperator);
----------------
HazardyKnusperkeks wrote:
> I know the other cases also use EXPECT, but the size should be an ASSERT, so there would be no seg fault if the number would change (it shouldn't).
I tried a wrong number and `EXPECT_EQ` didn't give a segfault.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121754



More information about the cfe-commits mailing list