Skip to content

Commit adc2c6e

Browse files
committed
fixup! fix incorrect completion ObjCObjectTypes
Regression introduced in `5f4c39b38976859d1fc219abe476a4075d11028e`
1 parent 4b76ad3 commit adc2c6e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,13 +2646,9 @@ static clang::Type const *GetCompleteEnumType(clang::ASTContext *ast,
26462646
}
26472647

26482648
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,
26502651
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-
26562652
clang::ObjCInterfaceDecl *class_interface_decl =
26572653
objc_class_type->getInterface();
26582654
// We currently can't complete objective C types through the newly added
@@ -2712,8 +2708,13 @@ static bool GetCompleteQualType(clang::ASTContext *ast,
27122708
} break;
27132709
case clang::Type::ObjCObject:
27142710
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))
27172718
return true;
27182719

27192720
return false;

0 commit comments

Comments
 (0)