llvm-project
3134b9fb - [lldb][TypeSystemClang] Fix nullptr check when creating enumerator decls

Commit
101 days ago
[lldb][TypeSystemClang] Fix nullptr check when creating enumerator decls There is no point in checking the `enumerator_decl` because it was just created with `CreateDeserialized` above (which would only fail if allocation failed, but we don't do those checks usually). We dereference it unconditionally above this check anyway. What this intended to check was probably `enum_decl`, because we derefernce it for the first time right after the check. This patch changes the nullptr check to `enum_decl`. No test coverage because this should be pretty uncontroversial. Note, I just saw this while auditing the code, I didn't actually run into a crash.
Author
Committer
Parents
Loading