-
Notifications
You must be signed in to change notification settings - Fork 264
Make guid constexpr on clang, improve error reporting #1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make guid constexpr on clang, improve error reporting #1191
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@DefaultRyan know why the build's failing? Is the visualizer not building cleanly? |
|
I noticed the visualizer doesn't build with clang, but since it appeared that clang was already broken in a few other ways (e.g. unit tests don't build without enabling C++20 and disabling the PCH) I didn't expect that to be tested. If that's the issue I can take a look at fixing it. |
|
Yes, the build seems to be unhappy with at least some of the warnings. Thanks for taking a look. |
Co-authored-by: Raymond Chen <oldnewthing@users.noreply.github.com>
…m/sylveon/cppwinrt into user/sylveon/constexpr-guid-clang
|
Clang fails building the Natvis visualizer due to code in the class foo
{
public:
struct bar { enum e; };
enum bar::e
{
buz
};
};Forward declaring enums is usually not allowed by the standard but Clang will let it fly with Thankfully, it seems like there is a workaround: defining Another issue that showed up is that the PCH for the visualizer includes This allows the visualizer to build with Clang. The visualizer not building is what I guess was the issue, no idea if it actually is. If it isn't, then I would probably need more details to be able to fix it. |
|
azp /run |
|
I believe you want |
Indeed. 🤣 I typed that on my phone. Not a good idea... |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
woohoo build is clean - thanks @sylveon! |
kennykerr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This makes
guid_v(and by extensionname_v) constexpr on Clang, improves the error reporting whenunknwn.his not included beforewinrt/base.h(gives a compile-time error instead of an empty GUID and potential ODR violations), and finally brings back the ability to use classic COM without includingunknwn.hbeforewinrt/base.hon MSVC.Fixes #1186