[clang] [Clang] Fix null pointer dereference in enum debug info generation (PR #97105)
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 15:06:20 PDT 2024
dwblaikie wrote:
> Thanks @smanna12. I think this looks ok; returning null here does appear to be consistent with other overloads of `CreateTypeDefinition` for `RecordType` and `ObjCInterfaceType`. I agree with @Michael137 that it would be nice to have an example that fails the added condition. The code already checks for an incomplete type so is presumably intended to handle such types. Perhaps we are missing a test though? Presumably one that uses a forward declareable enum type?
Not a hard line - but I'd discourage approving a patch like this until the test issue has been resolved (either a test is added, or a good explanation for it being omitted has been documented).
https://github.com/llvm/llvm-project/pull/97105
More information about the cfe-commits
mailing list