From bd7d9a85b8b09c945b98d374cc37cb374db012e6 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 11 Nov 2019 14:25:54 +0100 Subject: [PATCH] [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. --- lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp index c5bfb57..0e0f8ae 100644 --- a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp +++ b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp @@ -887,7 +887,7 @@ ObjCLanguage::GetPossibleFormattersMatches(ValueObject &valobj, bool canBeObjCDynamic = compiler_type.IsPossibleDynamicType(nullptr, check_cpp, check_objc); - if (canBeObjCDynamic) { + if (canBeObjCDynamic && ClangUtil::IsClangType(compiler_type)) { do { lldb::ProcessSP process_sp = valobj.GetProcessSP(); if (!process_sp) -- 2.7.4