[Lldb-commits] [PATCH] D137338: Fix dupe word typos

Owen Pan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 31 13:14:56 PDT 2023


Herald added a comment.

NOTE: Clang-Format Team Automated Review Comment

It looks like your clang-format review does not contain any unit tests, please try to ensure all code changes have a unit test (unless this is an `NFC` or refactoring, adding documentation etc..)

Add your unit tests in `clang/unittests/Format` and you can build with `ninja FormatTests`.  We recommend using the `verifyFormat(xxx)` format of unit tests rather than `EXPECT_EQ` as this will ensure you change is tolerant to random whitespace changes (see FormatTest.cpp as an example)

For situations where your change is altering the TokenAnnotator.cpp which can happen if you are trying to improve the annotation phase to ensure we are correctly identifying the type of a token, please add a token annotator test in `TokenAnnotatorTest.cpp`



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:4899-4902
+      // Note that this allows the "{" to go over the column limit
       // when the column limit is just between ":" and "{", but that does
       // not happen too often and alternative formattings in this case are
       // not much better.
----------------
We should reflow the comment:
```
      // Note that this allows the "{" to go over the column limit when the
      // column limit is just between ":" and "{", but that does not happen too
      // often and alternative formattings in this case are not much better.
```


================
Comment at: clang/lib/Format/WhitespaceManager.h:202-203
 
-    // Determine if every row in the the array
+    // Determine if every row in the array
     // has the same number of columns.
     bool isRectangular() const {
----------------
We should merge the comment into a single line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137338



More information about the lldb-commits mailing list