@@ -2646,13 +2646,9 @@ static clang::Type const *GetCompleteEnumType(clang::ASTContext *ast,
2646
2646
}
2647
2647
2648
2648
static clang::Type const *
2649
- GetCompleteObjCInterfaceType (clang::ASTContext *ast, clang::QualType qual_type,
2649
+ GetCompleteObjCInterfaceType (clang::ASTContext *ast,
2650
+ clang::ObjCObjectType const *objc_class_type,
2650
2651
bool allow_completion = true ) {
2651
- const clang::ObjCObjectType *objc_class_type =
2652
- llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
2653
- if (!objc_class_type)
2654
- return nullptr ;
2655
-
2656
2652
clang::ObjCInterfaceDecl *class_interface_decl =
2657
2653
objc_class_type->getInterface ();
2658
2654
// We currently can't complete objective C types through the newly added
@@ -2712,8 +2708,13 @@ static bool GetCompleteQualType(clang::ASTContext *ast,
2712
2708
} break ;
2713
2709
case clang::Type::ObjCObject:
2714
2710
case clang::Type::ObjCInterface: {
2715
- if (auto const *ty = llvm::dyn_cast_or_null<ObjCInterfaceType>(
2716
- GetCompleteObjCInterfaceType (ast, qual_type, allow_completion)))
2711
+ const clang::ObjCObjectType *objc_class_type =
2712
+ llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
2713
+ if (!objc_class_type)
2714
+ return true ;
2715
+
2716
+ if (auto const *ty = GetCompleteObjCInterfaceType (ast, objc_class_type,
2717
+ allow_completion))
2717
2718
return true ;
2718
2719
2719
2720
return false ;
0 commit comments