On Thu, May 28, 2015 at 8:04 PM, Richard Smith <[email protected]> wrote:
> On Thu, May 28, 2015 at 7:53 PM, Nico Weber <[email protected]> wrote: > >> On Thu, May 28, 2015 at 4:38 PM, Richard Smith < >> [email protected]> wrote: >> >>> Author: rsmith >>> Date: Thu May 28 18:38:53 2015 >>> New Revision: 238526 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=238526&view=rev >>> Log: >>> Remove dead code. >>> >>> Modified: >>> cfe/trunk/lib/Sema/SemaDeclAttr.cpp >>> >>> Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=238526&r1=238525&r2=238526&view=diff >>> >>> ============================================================================== >>> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original) >>> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu May 28 18:38:53 2015 >>> @@ -3302,11 +3302,10 @@ static void handleGNUInlineAttr(Sema &S, >>> static void handleCallConvAttr(Sema &S, Decl *D, const AttributeList >>> &Attr) { >>> if (hasDeclarator(D)) return; >>> >>> - const FunctionDecl *FD = dyn_cast<FunctionDecl>(D); >>> // Diagnostic is emitted elsewhere: here we store the (valid) Attr >>> // in the Decl node for syntactic reasoning, e.g., pretty-printing. >>> CallingConv CC; >>> - if (S.CheckCallingConvAttr(Attr, CC, FD)) >>> + if (S.CheckCallingConvAttr(Attr, CC, /*FD*/nullptr)) >>> >> >> If you say /*FD=*/nullptr, clang-format won't add a space between the >> comment and what comes after it. >> > > But that wastes just as much horizontal space as adding the space would... > =) > Fair enough :-) 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. > > >> >> >>> return; >>> >>> if (!isa<ObjCMethodDecl>(D)) { >>> >>> >>> _______________________________________________ >>> cfe-commits mailing list >>> [email protected] >>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >>> >> >> >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
