[cfe-commits] r165518 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/ASTContext.cpp lib/AST/DeclObjC.cpp

Richard Smith richard at metafoo.co.uk
Tue Oct 9 12:17:00 PDT 2012


On Tue, Oct 9, 2012 at 11:53 AM, Benjamin Kramer <benny.kra at gmail.com>wrote:

>
> On 09.10.2012, at 20:34, Jordan Rose <jordan_rose at apple.com> wrote:
>
> >
> > On Oct 9, 2012, at 11:19 , Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> >
> >> +  SmallVector<const ObjCMethodDecl *, 8> OverDecls;
> >> +  Method->getOverriddenMethods(OverDecls);
> >> +  for (SmallVector<const ObjCMethodDecl *, 8>::iterator
> >> +            M = OverDecls.begin(),
> >> +         MEnd = OverDecls.end();
> >> +       M != MEnd; ++M)
> >> +    Overridden.push_back(*M);
> >
> > :-( Yuck. Darn C++ being all type-safe.
>
> Overridden.append(OverDecls.begin(), OverDecls.end())
>
> would be slightly less yucky. Should optimize down to a memcpy in this
> case.


Likewise for the C++ virtual function case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121009/843b69db/attachment.html>


More information about the cfe-commits mailing list