<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Confirmed. With latest trunk this bug is now fixed</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Thanks,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 7, 2014 at 7:00 PM, Eran Ifrah <span dir="ltr"><<a href="mailto:eran.ifrah@gmail.com" target="_blank">eran.ifrah@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">The current version is:<br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><div class="gmail_default">D:\src\CppLexer>clang-format --version</div><div class="gmail_default">clang-format version 3.5.0 (210970)</div><div class="gmail_default"><br></div><div class="gmail_default">Will svn update my local build and I will report back<br></div><div class="gmail_default"><br></div></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Eran</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Sep 7, 2014 at 10:05 AM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yeah, that is very bad. However, I think it has already been fixed. What version of clang-format are you using? If you are able to reproduce it with a version built from the SVN trunk, please file a bug on <a href="http://llvm.org/bugs" target="_blank">http://llvm.org/bugs</a>. </div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sat, Sep 6, 2014 at 7:46 PM, Eran Ifrah <span dir="ltr"><<a href="mailto:eran.ifrah@gmail.com" target="_blank">eran.ifrah@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I just encountered this use case with clang-format:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Consider the following function:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">...</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><div class="gmail_default"> void Reset() { // Like Clear() but retain m_initialCommand. Used when an editor is reloaded</div><div class="gmail_default"> m_commands.clear();</div><div class="gmail_default"> }</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">...</div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">and in my clang-format plugin, I have the option:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">"Allow Short Functions on A Single Line" enabled.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">So, after indenting I get this:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><div class="gmail_default"><div class="gmail_default"> void Reset() { // Like Clear() but retain m_initialCommand. Used when an editor is reloaded m_commands.clear(); }</div><div><br></div><div>Which breaks compilation (and thanks to gcc poor error reporting it only took me 30 mins to figure what went wrong :P )</div><div><br></div><div>Thanks,</div></div></div><span><font color="#888888"><br></font></span></div><span><font color="#888888">-- <br><div dir="ltr"><font face="verdana, sans-serif">Eran Ifrah,<br>Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br></font><div><font face="verdana, sans-serif">CodeLite IDE Blog: <a href="http://codeliteide.blogspot.com/" target="_blank">http://codeliteide.blogspot.com/</a></font></div></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><font face="verdana, sans-serif">Eran Ifrah,<br>Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br></font><div><font face="verdana, sans-serif">CodeLite IDE Blog: <a href="http://codeliteide.blogspot.com/" target="_blank">http://codeliteide.blogspot.com/</a></font></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="verdana, sans-serif">Eran Ifrah,<br>Author of codelite, a cross platform open source C/C++ IDE: <a href="http://www.codelite.org" target="_blank">http://www.codelite.org</a><br></font><div><font face="verdana, sans-serif">CodeLite IDE Blog: <a href="http://codeliteide.blogspot.com/" target="_blank">http://codeliteide.blogspot.com/</a></font></div></div>
</div>