<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 28, 2015 at 8:04 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</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_extra"><div class="gmail_quote"><div><div class="h5">On Thu, May 28, 2015 at 7:53 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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_extra"><div class="gmail_quote"><span>On Thu, May 28, 2015 at 4:38 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard-llvm@metafoo.co.uk" target="_blank">richard-llvm@metafoo.co.uk</a>></span> wrote:<br></span><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Thu May 28 18:38:53 2015<br>
New Revision: 238526<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D238526-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=zS-1sbIhpF6lEXLJ3lRS7rARdg3bDoAvJzpz06H7H8o&s=pHX3U93w9BfVi5frp-Bnlngh_kaBbJ36S3vngrxMM-U&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=238526&view=rev</a><br>
Log:<br>
Remove dead code.<br>
<br>
Modified:<br>
cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Sema_SemaDeclAttr.cpp-3Frev-3D238526-26r1-3D238525-26r2-3D238526-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=zS-1sbIhpF6lEXLJ3lRS7rARdg3bDoAvJzpz06H7H8o&s=aT9YqjOoQgMAYz94vx3halyaRG3_XEp0OduxmOgmlRQ&e=" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=238526&r1=238525&r2=238526&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu May 28 18:38:53 2015<br>
@@ -3302,11 +3302,10 @@ static void handleGNUInlineAttr(Sema &S,<br>
static void handleCallConvAttr(Sema &S, Decl *D, const AttributeList &Attr) {<br>
if (hasDeclarator(D)) return;<br>
<br>
- const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);<br>
// Diagnostic is emitted elsewhere: here we store the (valid) Attr<br>
// in the Decl node for syntactic reasoning, e.g., pretty-printing.<br>
CallingConv CC;<br>
- if (S.CheckCallingConvAttr(Attr, CC, FD))<br>
+ if (S.CheckCallingConvAttr(Attr, CC, /*FD*/nullptr))<br></blockquote><div><br></div></span><div>If you say /*FD=*/nullptr, clang-format won't add a space between the comment and what comes after it.</div></div></div></div></blockquote><div><br></div></div></div><div>But that wastes just as much horizontal space as adding the space would... =)</div></div></div></div></blockquote><div><br></div><div>Fair enough :-)</div><div><br></div><div>I like the = for bool parameters. For `somefun(/*lowercase*/false)` I always wonder if this means that false is passed for a parameter named "lowercase" (which means f would do something with lowercase=false, i.e. use upper case), or if passing false has the effect of making f use lowercase (i.e. it's really passing uppercase=false, and the comment is about the effect of that). With `f(/*lowercase=*/false)` there's no ambiguity, and if this makes sense for bools, then one might as well do it elsewhere for consistency.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
return;<br>
<br>
if (!isa<ObjCMethodDecl>(D)) {<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>