diff options
| author | Mark Rowe <mrowe@bdash.net.nz> | 2025-05-30 09:22:50 -0700 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2025-06-18 10:44:49 -0400 |
| commit | 90d5791ef7b211ca8f792eb64f9452f6df92d1e0 (patch) | |
| tree | 0c739461f6ad946fa917de2f94029ad03c6e1d85 /lang/c/pseudoc.cpp | |
| parent | b6b98c07eb8ce704da4edf5a0b16959215a2c450 (diff) | |
[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`
Diffstat (limited to 'lang/c/pseudoc.cpp')
| -rw-r--r-- | lang/c/pseudoc.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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") { |
