[Lldb-commits] [lldb] bd7d9a8 - [lldb] Check if we actually have a Clang type in ObjCLanguage::GetPossibleFormattersMatches
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 12 01:00:44 PST 2019
Author: Raphael Isemann
Date: 2019-11-12T09:59:04+01:00
New Revision: bd7d9a85b8b09c945b98d374cc37cb374db012e6
URL: https://github.com/llvm/llvm-project/commit/bd7d9a85b8b09c945b98d374cc37cb374db012e6
DIFF: https://github.com/llvm/llvm-project/commit/bd7d9a85b8b09c945b98d374cc37cb374db012e6.diff
LOG: [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.
Added:
Modified:
lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
index c5bfb5747c13..0e0f8ae7fb0a 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)
More information about the lldb-commits
mailing list