This is an archive of the discontinued LLVM Phabricator instance.

[clang][extract-api] Undefining macros should not result in a crash
ClosedPublic

Authored by dang on Apr 4 2022, 10:56 AM.

Details

Summary

This fixes the situation where a undefining a not previously defined
macro resulted in a crash. Before trying to remove a definition from
PendingMacros we first check to see if the macro did indeed have a
previous definition.

Diff Detail

Event Timeline

dang created this revision.Apr 4 2022, 10:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 10:56 AM
dang requested review of this revision.Apr 4 2022, 10:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 10:56 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
zixuw accepted this revision.Apr 4 2022, 1:32 PM

Ha! Nice catch!

This revision is now accepted and ready to land.Apr 4 2022, 1:32 PM