This is an archive of the discontinued LLVM Phabricator instance.

[Support] Simplify isInt and isUInt with constexpr if (NFC)
ClosedPublic

Authored by kazu on Aug 28 2022, 11:52 AM.

Diff Detail

Event Timeline

kazu created this revision.Aug 28 2022, 11:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 11:52 AM
kazu requested review of this revision.Aug 28 2022, 11:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 11:52 AM
tschuett added inline comments.
llvm/include/llvm/Support/MathExtras.h
367

You can use [[maybe_unused]] instead if you like.

craig.topper added inline comments.
llvm/include/llvm/Support/MathExtras.h
367

Does it warn if you use elses? I know there was some constexpr if comments added to the no else after return guidance here https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

367

Nevermind that probably won't help.

kazu added a comment.Sep 3 2022, 4:11 PM

I'd appreciate a review. Thanks!

MaskRay accepted this revision.Sep 3 2022, 6:10 PM
This revision is now accepted and ready to land.Sep 3 2022, 6:10 PM
This revision was automatically updated to reflect the committed changes.