diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-10 16:44:52 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-10 16:44:52 +0000 |
commit | e84595d6186d441f0623671083c4bbad7ca02cad (patch) | |
tree | df8c937a4ea174467a3e44a2853a000060da8dee | |
parent | 96f7aeeb673a94e99ae05d8170357ce36da62494 (diff) | |
download | bcm5719-llvm-e84595d6186d441f0623671083c4bbad7ca02cad.tar.gz bcm5719-llvm-e84595d6186d441f0623671083c4bbad7ca02cad.zip |
objective-c: add an assertion for property
expression enterring IsConstProperty function.
llvm-svn: 154406
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 1d8d24882e5..bf9b0ae9886 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -7146,6 +7146,11 @@ static bool IsReadonlyProperty(Expr *E, Sema &S) { 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(); |