apple / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. This fork is used to manage Apple’s stable releases of Clang as well as support the Swift project.
https://llvm.org
Other
1.09k stars 320 forks source link

[lldb][Type Completion] Fix completion of ObjCObjectTypes #8891

Closed Michael137 closed 2 weeks ago

Michael137 commented 2 weeks ago

The problem was introduced in:

commit e68f76a9e59104e2bfb972155af8ff04310cd078
Author: Michael Buch <michaelbuch12@gmail.com>
Date:   Fri Feb 16 14:35:34 2024 +0000

    [lldb][TypeSystemClang][NFCI] Factor completion logic out of GetCompleteQualType

This introduced an incorrect llvm::dyn_cast_or_null check causing us to incorrectly claim that we failed to complete a type.

This manifested in a crash when running following expression:

expr -l objc -- *(id)0x1234

rdar://129633122