diff options
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 48d9fe4ea9..e266774dde 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -18,6 +18,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ExternalASTSource.h" #include "clang/AST/RecordLayout.h" +#include "clang/AST/ExprObjC.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/StringExtras.h" @@ -684,6 +685,7 @@ const RecordDecl *ASTContext::addRecordToClass(const ObjCInterfaceDecl *D) { void ASTContext::setFieldDecl(const ObjCInterfaceDecl *OI, const ObjCIvarDecl *Ivar, const ObjCIvarRefExpr *MRef) { + assert(MRef->getDecl() == Ivar); ASTFieldForIvarRef[MRef] = OI->lookupFieldDeclForIvar(*this, Ivar); } |