jp4a50 added inline comments.

================
Comment at: clang/include/clang/Format/Format.h:949
+  /// If unset, ``ContinuationIndentWidth`` is used.
+  /// \code
+  ///   AlignAfterOpenBracket: AlwaysBreak
----------------
owenpan wrote:
> HazardyKnusperkeks wrote:
> > jp4a50 wrote:
> > > MyDeveloperDay wrote:
> > > > did you check generating the html from the rst? I can never remember if 
> > > > we need a newline before the \code
> > > Nope - how do I do that exactly? I would guess a newline is not needed 
> > > based on other examples.
> > > did you check generating the html from the rst? I can never remember if 
> > > we need a newline before the \code
> > 
> > 
> > Nope - how do I do that exactly? I would guess a newline is not needed 
> > based on other examples.
> 
> See D147327#4236718.
HTML looks good.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1659
       opensProtoMessageField(Current, Style)) {
+    const FormatToken *NextNonComment = Current.getNextNonComment();
     if (Current.opensBlockOrBlockTypeList(Style)) {
----------------
HazardyKnusperkeks wrote:
> Why did you move it?
I originally needed it in the new `else if` block since I was checking if it 
was a designated initializer period but the condition has since changed. Thanks 
for spotting. I've moved it back.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1664-1668
+      const auto BracedInitializerIndentWidth =
+          Style.BracedInitializerIndentWidth
+              ? *Style.BracedInitializerIndentWidth
+              : Style.ContinuationIndentWidth;
+      NewIndent = CurrentState.LastSpace + BracedInitializerIndentWidth;
----------------
HazardyKnusperkeks wrote:
> You can keep the local variable if you want, but please use `value_or`, it 
> expresses the intent better.
Have used `.value_or()` and got rid of temp variable since it's more concise 
now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146101

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

Reply via email to