Skip to content

Commit bd7d9a8

Browse files
committed
[lldb] Check if we actually have a Clang type in ObjCLanguage::GetPossibleFormattersMatches
We call IsPossibleDynamicType but we also need to check if this is a Clang type, otherwise other languages with dynamic types (like Swift) might end up being interpreted as potential Obj-C dynamic types.
1 parent a85e676 commit bd7d9a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ ObjCLanguage::GetPossibleFormattersMatches(ValueObject &valobj,
887887
bool canBeObjCDynamic =
888888
compiler_type.IsPossibleDynamicType(nullptr, check_cpp, check_objc);
889889

890-
if (canBeObjCDynamic) {
890+
if (canBeObjCDynamic && ClangUtil::IsClangType(compiler_type)) {
891891
do {
892892
lldb::ProcessSP process_sp = valobj.GetProcessSP();
893893
if (!process_sp)

0 commit comments

Comments
 (0)