[PATCH] D60363: [clang-format] [PR41170] Break after return type ignored with certain comments positions

Owen Pan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 7 15:19:47 PDT 2019


owenpan requested changes to this revision.
owenpan added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/Format/TokenAnnotator.h:114-116
+    return Last->isNot(tok::semi) &&
+           (Last->Previous &&
+            !Last->Previous->startsSequence(tok::semi, tok::comment));
----------------
May I suggest the following instead?

```
    return !endsWith(tok::semi);
```


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

https://reviews.llvm.org/D60363





More information about the llvm-commits mailing list