This is an archive of the discontinued LLVM Phabricator instance.

[clang] Allow printing 64 bit ints in diagnostics
ClosedPublic

Authored by aeubanks on Oct 5 2021, 2:03 PM.

Details

Summary

Currently we're limited to 32 bit ints in diagnostics.
With support for 4GB alignments coming soon, we need to report 4GB as the max alignment allowed.
I've tested that this does indeed properly print 2^32.

Diff Detail

Event Timeline

aeubanks requested review of this revision.Oct 5 2021, 2:03 PM
aeubanks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 2:03 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rsmith accepted this revision.Oct 5 2021, 2:39 PM
This revision is now accepted and ready to land.Oct 5 2021, 2:39 PM
This revision was landed with ongoing or failed builds.Oct 5 2021, 10:09 PM
This revision was automatically updated to reflect the committed changes.

Is there no diagnostic that could reasonably produce such a large value that would be easy to test (without needing a giant binary, etc)? (seem surprising to see this change without any test coverage)

Like a 64 bit non-type template parameter or the like, perhaps?

Is there no diagnostic that could reasonably produce such a large value that would be easy to test (without needing a giant binary, etc)? (seem surprising to see this change without any test coverage)

Like a 64 bit non-type template parameter or the like, perhaps?

Previously no, but https://reviews.llvm.org/D111250 modifies some tests to print 2^32, which was the motivating case behind this.