[cfe-commits] r145441 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Lang Hames
lhames at gmail.com
Tue Nov 29 14:37:13 PST 2011
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();
More information about the cfe-commits
mailing list