[cfe-commits] r154406 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Apr 10 09:44:52 PDT 2012
Author: fjahanian
Date: Tue Apr 10 11:44:52 2012
New Revision: 154406
URL: http://llvm.org/viewvc/llvm-project?rev=154406&view=rev
Log:
objective-c: add an assertion for property
expression enterring IsConstProperty function.
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=154406&r1=154405&r2=154406&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Apr 10 11:44:52 2012
@@ -7146,6 +7146,11 @@
static bool IsConstProperty(Expr *E, Sema &S) {
const ObjCPropertyRefExpr *PropExpr = dyn_cast<ObjCPropertyRefExpr>(E);
if (!PropExpr) return false;
+
+ assert(!S.Context.hasSameType(PropExpr->getType(),
+ S.Context.PseudoObjectTy)
+ && "property expression cannot be a pseudo object");
+
if (PropExpr->isImplicitProperty()) return false;
ObjCPropertyDecl *PDecl = PropExpr->getExplicitProperty();
More information about the cfe-commits
mailing list