[cfe-commits] r145441 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Nico Weber
thakis at chromium.org
Wed Nov 30 15:08:22 PST 2011
Thanks!
On Wed, Nov 30, 2011 at 3:07 PM, Lang Hames <lhames at gmail.com> wrote:
> 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
>
>
More information about the cfe-commits
mailing list