[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 14:17:16 PST 2020
rnk added a comment.
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.
================
Comment at: clang/test/SemaCXX/MicrosoftExtensions.cpp:214
b = reinterpret_cast<bool>(ptr); // expected-error {{cast from pointer to smaller type 'bool' loses information}}
}
----------------
Can you please add a test for the `void*` diagnostic to exercise the other side of the ternary?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75708/new/
https://reviews.llvm.org/D75708
More information about the cfe-commits
mailing list