[clang] [Clang] Fix null pointer dereference in enum debug info generation (PR #97105)
Michael Buch via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 29 00:51:42 PDT 2024
================
@@ -3518,6 +3518,10 @@ llvm::DIType *CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) {
SmallVector<llvm::Metadata *, 16> Enumerators;
ED = ED->getDefinition();
+
+ if (!ED)
+ return nullptr;
+
----------------
Michael137 wrote:
Do you have an example/reproducer where this would get exercised?
https://github.com/llvm/llvm-project/pull/97105
More information about the cfe-commits
mailing list