<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="">Please at least specify major version of clang-format. Mine handles this piece of code just fine (4.0-dev r283306).<div class=""><br class=""></div><div class="">—</div><div class="">Kirill</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 5 Oct 2016, at 18:30, Han Wang via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Sorry the semicolon is missing at the end of class definition but it doesn't change the result. </div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Oct 5, 2016 at 4:45 PM, Han Wang <span dir="ltr" class=""><<a href="mailto:wanghan02@gmail.com" target="_blank" class="">wanghan02@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi, <div class=""><br class=""></div><div class="">Let's say we have a simple template method with ref-qualification and noexcept. </div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">struct A {</font></div><div class=""><font face="monospace, monospace" class=""> template <typename T></font></div><div class=""><font face="monospace, monospace" class=""> void foo(T&& t) & noexcept {</font></div><div class=""><font face="monospace, monospace" class=""> DoSomething(); </font></div><div class=""><font face="monospace, monospace" class=""> DoSomethingElse();</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class="">}</font></div></div><div class=""><br class=""></div><div class="">If we use clang-format to re-format the code with google style (or llvm or other styles), we get</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">struct A {</font></div><div class=""><font face="monospace, monospace" class=""> template <typename T></font></div><div class=""><font face="monospace, monospace" class=""> void foo(T&& t) & noexcept {</font></div><div class=""><font face="monospace, monospace" class=""> DoSomething();</font></div><div class=""><font face="monospace, monospace" class=""> DoSomethingElse();</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class="">}</font></div></div><div class=""><br class=""></div><div class="">If we remove the noexcept or if we put a const before ref-qualification the reformat will work correctly. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></div></body></html>