Thanks! On Wed, Nov 30, 2011 at 3:07 PM, Lang Hames <[email protected]> wrote: > Good idea. Committed in r145534. > > - Lang. > > > On Tue, Nov 29, 2011 at 8:24 PM, Nico Weber <[email protected]> wrote: >> >> Test case? :-) >> >> On Tue, Nov 29, 2011 at 2:37 PM, Lang Hames <[email protected]> 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 >> > [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
