This is an archive of the discontinued LLVM Phabricator instance.

[NFC][CLANG] Fix bug with dereference null return value in GetFunctionTypeForVTable()
ClosedPublic

Authored by Manna on Jun 1 2023, 6:15 PM.

Details

Summary

This patch uses castAs instead of getAs which will assert if the type doesn't match in clang::​CodeGen::​CodeGenTypes::​GetFunctionTypeForVTable(clang::​GlobalDecl).

Diff Detail

Event Timeline

Manna created this revision.Jun 1 2023, 6:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2023, 6:15 PM
Manna requested review of this revision.Jun 1 2023, 6:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2023, 6:15 PM
Manna edited the summary of this revision. (Show Details)Jun 1 2023, 6:16 PM
erichkeane accepted this revision.Jun 2 2023, 6:23 AM
This revision is now accepted and ready to land.Jun 2 2023, 6:23 AM
Manna added a comment.Jun 2 2023, 6:48 AM

Thank you @erichkeane for reviews!