This is an archive of the discontinued LLVM Phabricator instance.

[clang] Introduce a union inside ProgramPoint.
Needs ReviewPublic

Authored by simon_tatham on Jul 6 2021, 9:27 AM.



This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.

The void *Data1 field in ProgramPoint is sometimes used to store a
SourceLocation in pointer encoding, and sometimes used to store other
pointer data. If SourceLocation becomes 64-bit when clang is compiled
for a 32-bit platform, then this won't fit any more. Hence, we change
the type of Data1 to a union storing either an actual SourceLocation
or a pointer.

Patch originally by Mikhail Maltsev.

Diff Detail

Event Timeline

simon_tatham requested review of this revision.Jul 6 2021, 9:27 AM
simon_tatham created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 9:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
miyuki added a subscriber: miyuki.Jul 6 2021, 10:12 AM
lenary added a subscriber: lenary.Jun 20 2022, 7:08 AM

This change looks fine to me (though clang-format wants a reasonable change). I'm not familiar with the clang static analyzer, so I'm not sure I can +2 this, but hopefully this message will act as a ping for the existing reviewers?

Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2022, 7:08 AM
lebedev.ri resigned from this revision.Jan 12 2023, 5:30 PM

This review may be stuck/dead, consider abandoning if no longer relevant.
Removing myself as reviewer in attempt to clean dashboard.