[cfe-commits] r145441 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Nico Weber
thakis at chromium.org
Tue Nov 29 20:24:30 PST 2011
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