curdeius added inline comments.

================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3574
+      // line.
+      FirstNonCommentOnLine |= FirstOnLine;
+    } else {
----------------
HazardyKnusperkeks wrote:
> I really don't like bitwise operations on bool. Hit some nasty bugs at my job.
Ok, will do.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3580
     while (!Line->InPPDirective && FormatTok->Tok.is(tok::hash) &&
-           (FormatTok->HasUnescapedNewline || FormatTok->IsFirst)) {
+           FirstNonCommentOnLine) {
       distributeComments(Comments, FormatTok);
----------------
HazardyKnusperkeks wrote:
> This does not change within the loop, is that on purpose? Then it should be 
> an if around the loop.
Oh, good catch. It was certainly not on purpose. And it means that I need to 
find a new test case that covers that (if appropriate). Ideas welcome!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118924

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to