This is an archive of the discontinued LLVM Phabricator instance.

Add warnings for casting ptr -> smaller int for C++ in Microsoft mode
ClosedPublic

Authored by aeubanks on Mar 5 2020, 1:29 PM.

Diff Detail

Event Timeline

aeubanks created this revision.Mar 5 2020, 1:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2020, 1:29 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rnk added a comment.Mar 5 2020, 2:08 PM

Looks good, but we should add a test.

I can push this for you and even give attribution (hooray, git!), but I think you have enough uploaded code reviews that you could request push access as described here:
https://llvm.org/docs/DeveloperPolicy.html#new-contributors
Link to all the phab issues you have opened to show contributions.

clang/test/SemaCXX/MicrosoftExtensions.cpp
214

Can you please add a test for the void* diagnostic to exercise the other side of the ternary?

aeubanks updated this revision to Diff 248610.Mar 5 2020, 2:32 PM
  • Add tests for void *
aeubanks marked an inline comment as done.Mar 5 2020, 2:33 PM

I can push this for you and even give attribution (hooray, git!), but I think you have enough uploaded code reviews that you could request push access as described here:
https://llvm.org/docs/DeveloperPolicy.html#new-contributors
Link to all the phab issues you have opened to show contributions.

Sounds good, I'll send an email to request push access.

rnk accepted this revision.Mar 5 2020, 3:06 PM

Thanks, looks good! I'll push it in a sec.

This revision is now accepted and ready to land.Mar 5 2020, 3:06 PM
This revision was automatically updated to reflect the committed changes.