From 90d5791ef7b211ca8f792eb64f9452f6df92d1e0 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 30 May 2025 09:22:50 -0700 Subject: [ObjC] Improve how [super ...] calls are displayed 1. Skip displaying the declaration and initialization of the objc_super struct since that's an artifact of how objc_msgSendSuper is called. 2. Display the message receiver as `super` rather than `&super` --- lang/c/pseudoc.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lang/c/pseudoc.cpp') diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp index cb6c1b94..14a82e9e 100644 --- a/lang/c/pseudoc.cpp +++ b/lang/c/pseudoc.cpp @@ -615,8 +615,11 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H needSeparator = hasBlocks; // Emit the lines for the statement itself - GetExprTextInternal(*i, tokens, settings, TopLevelOperatorPrecedence, true); - tokens.NewLine(); + if (!ShouldSkipStatement(*i)) + { + GetExprTextInternal(*i, tokens, settings, TopLevelOperatorPrecedence, true); + tokens.NewLine(); + } } }(); break; @@ -2846,6 +2849,10 @@ TypePrinter* PseudoCFunction::GetTypePrinter() const return m_typePrinter; } +bool PseudoCFunction::ShouldSkipStatement(const BinaryNinja::HighLevelILInstruction& instr) +{ + return false; +} PseudoCFunctionType::PseudoCFunctionType(): LanguageRepresentationFunctionType("Pseudo C") { -- cgit v1.3.1