<div dir="ltr">You should be able to use "Tok.getPrecedence() == prec::Assignment" instead of the new IsTokenAssignment function. Also, please put the tests into "unittests/Format/FormatTest.cpp". We have plans to turn (some of) those into file-based tests, but for now, I'd like to keep formatting-specific tests together. Also, in addition to actually testing whether the style-configuration works as expected, there are also tests there which test whether the option can be successfully parsed from JSON (see how it is done for the other flags close to the bottom).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 12:14 AM, Aaron Wishnick <span dir="ltr"><<a href="mailto:aaron.s.wishnick@gmail.com" target="_blank">aaron.s.wishnick@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">My organization's coding standards include not putting a space before assignment operators, e.g. "int a= 42;". In order for us to be able to use clang-format, we need support for this.<div>
<br>
</div><div>I've attached a patch that adds a new format style option, "SpaceBeforeAssignmentOperators." All the existing hard-coded styles now default to having it set to true. I've also included a test.</div>

<div><br></div><div>Please let me know if this looks good, or if there's anything else I can do.</div><div><br></div><div>Thank you!</div><span class="HOEnZb"><font color="#888888"><div>Aaron</div></font></span></div>

<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>