Fwiw, gtest does this as well, so it's not entirely without precedent <br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 17, 2017 at 10:05 PM Kuba (Brecka) Mracek via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">kubabrecka added a comment.<br class="gmail_msg">
<br class="gmail_msg">
> To avoid duplicated code, I will define a macro WEAK_DEF(), so we can reduce that code to:<br class="gmail_msg">
><br class="gmail_msg">
> WEAK_DEF(void, fun, ()) {<br class="gmail_msg">
> // Default implementation<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> Would you agree on this point? Would you do it differently?<br class="gmail_msg">
<br class="gmail_msg">
I don't like that this is not a "standard" function declaration. It's not obvious that this declares a function. My editor/IDE will not recognize this as a function, and "Go to definition" and such will not work. Is there really no way of keeping the syntax of...:<br class="gmail_msg">
<br class="gmail_msg">
WHATEVER_MACROS_NECESSARY<br class="gmail_msg">
void fun() MAYBE_OTHER_MACROS {<br class="gmail_msg">
...code...<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
?<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D28596" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28596</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>