From c41f264a1dba68c89b4a224a70e3a5783f7fa879 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 24 Jun 2025 17:55:48 -0400 Subject: Remove implicit conversions from Confidence to underlying type, these can cause bugs and also issues with C++20 --- lang/c/pseudoobjc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lang/c/pseudoobjc.cpp') diff --git a/lang/c/pseudoobjc.cpp b/lang/c/pseudoobjc.cpp index c832e388..c76eabac 100644 --- a/lang/c/pseudoobjc.cpp +++ b/lang/c/pseudoobjc.cpp @@ -21,7 +21,7 @@ bool ParameterIsString(const HighLevelILInstruction& expr) if (!exprType || exprType->GetClass() != PointerTypeClass) return false; - if (auto child = exprType->GetChildType(); child) + if (auto child = exprType->GetChildType(); child.GetValue()) { child = child->IsArray() ? child->GetChildType() : child; return child->IsInteger() && child->IsSigned() && child->GetWidth() == 1; @@ -215,7 +215,7 @@ bool VariableIsObjCSuperStruct(const Variable& variable, Function& function) if (variableName != "super") return false; - const auto variableType = TypeResolvingNamedTypeReference(function.GetVariableType(variable), function); + const auto variableType = TypeResolvingNamedTypeReference(function.GetVariableType(variable).GetValue(), function); if (!variableType || variableType->GetClass() != StructureTypeClass) return false; @@ -453,7 +453,7 @@ void PseudoObjCFunction::GetExpr_CONST_PTR(const BinaryNinja::HighLevelILInstruc if (!hasVariable) return PseudoCFunction::GetExpr_CONST_PTR(instr, tokens, settings, precedence, statement); - auto type = TypeResolvingNamedTypeReference(variable.type, *GetFunction()); + auto type = TypeResolvingNamedTypeReference(variable.type.GetValue(), *GetFunction()); if (!type || type->GetClass() != StructureTypeClass) return PseudoCFunction::GetExpr_CONST_PTR(instr, tokens, settings, precedence, statement); -- cgit v1.3.1