[cfe-commits] r145441 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Lang Hames
lhames at gmail.com
Wed Nov 30 15:07:43 PST 2011
Good idea. Committed in r145534.
- Lang.
On Tue, Nov 29, 2011 at 8:24 PM, Nico Weber <thakis at chromium.org> wrote:
> Test case? :-)
>
> On Tue, Nov 29, 2011 at 2:37 PM, Lang Hames <lhames at gmail.com> wrote:
> > Author: lhames
> > Date: Tue Nov 29 16:37:13 2011
> > New Revision: 145441
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=145441&view=rev
> > Log:
> > Test isa<FunctionDecl> to exclude objective-C methods. This ensures the
> following cast will never fail.
> >
> > Modified:
> > cfe/trunk/lib/Sema/SemaExpr.cpp
> >
> > Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=145441&r1=145440&r2=145441&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
> > +++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Nov 29 16:37:13 2011
> > @@ -1592,7 +1592,7 @@
> > // function definition declared at class scope then we must set
> > // DC to the lexical parent to be able to search into the parent
> > // class.
> > - if (getLangOptions().MicrosoftMode && DC->isFunctionOrMethod() &&
> > + if (getLangOptions().MicrosoftMode && isa<FunctionDecl>(DC) &&
> > cast<FunctionDecl>(DC)->getFriendObjectKind() &&
> > DC->getLexicalParent()->isRecord())
> > DC = DC->getLexicalParent();
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111130/1a5cf76a/attachment.html>
More information about the cfe-commits
mailing list