<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Can you just grep for “^                                “ or something?  That seems like a straight-forward way to find lines that have a ton of leading indentation.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 27, 2016, at 9:28 AM, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">It will probably be hard to find all the cases.  Unfortunately clang-tidy doesn't have a "detect deep indentation" check, but that would be pretty useful, so maybe I'll try to add that at some point (although I doubt I can get to it before the big reformat).<div class=""><br class=""></div><div class="">Finding all of the egregious cases before the big reformat will present a challenge, so I'm not sure if it's better to spend effort trying, or just deal with it as we spot code that looks bad because of indentation level.</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Aug 27, 2016 at 9:24 AM Chris Lattner <<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 26, 2016, at 6:12 PM, Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="m_-6899933430770945279Apple-interchange-newline"><div class=""><div dir="ltr" class="">Back to the formatting issue, there's a lot of code that's going to look bad after the reformat, because we have some DEEPLY indented code.  LLVM has adopted the early return model for this reason.  A huge amount of our deeply nested code could be solved by using early returns.  </div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class="">FWIW, early returns are part of the LLVM Coding standard:</div><div class=""><a href="http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code" target="_blank" class="">http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code</a></div><div class=""><br class=""></div><div class="">So it makes sense for LLDB to adopt this approach at some point.</div><div class=""><br class=""></div><div class="">I don’t have an opinion about whether it happens before or after the "big reformat", but I guess I agree with your point that doing it would be good to do it for the most egregious cases before the reformat.</div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class=""><br class=""></div><div class="">-Chris</div></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>