Author: enrico Date: Fri Jun 24 15:45:08 2016 New Revision: 273721 URL: http://llvm.org/viewvc/llvm-project?rev=273721&view=rev Log: The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to
Fixes rdar://26535584 Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=273721&r1=273720&r2=273721&view=diff ============================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jun 24 15:45:08 2016 @@ -3615,6 +3615,14 @@ ClangASTContext::IsPossibleDynamicType ( case clang::Type::ObjCObjectPointer: if (check_objc) { + if (auto objc_pointee_type = qual_type->getPointeeType().getTypePtrOrNull()) + { + if (auto objc_object_type = llvm::dyn_cast_or_null<clang::ObjCObjectType>(objc_pointee_type)) + { + if (objc_object_type->isObjCClass()) + return false; + } + } if (dynamic_pointee_type) dynamic_pointee_type->SetCompilerType(getASTContext(), llvm::cast<clang::ObjCObjectPointerType>(qual_type)->getPointeeType()); return true; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits