Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Don't use __uuidof without GUID#1180

Merged
kennykerr merged 1 commit intomicrosoft:mastermicrosoft/cppwinrt:masterfrom
oldnewthing:clang-guidoldnewthing/cppwinrt:clang-guidCopy head branch name to clipboard
Sep 8, 2022
Merged

Don't use __uuidof without GUID#1180
kennykerr merged 1 commit intomicrosoft:mastermicrosoft/cppwinrt:masterfrom
oldnewthing:clang-guidoldnewthing/cppwinrt:clang-guidCopy head branch name to clipboard

Conversation

@oldnewthing
Copy link
Member

If GUID is not defined, then don't breathe the name of the __uuidof intrinsic, because that would instantiate an undefined structure. clang is stricter about this than msvc, but fix both just in case.

Fixes #1179

If GUID is not defined, then don't breathe the name of
the `__uuidof` intrinsic, because that would instantiate
an undefined structure. clang is stricter about this than
msvc, but fix both just in case.
@oldnewthing
Copy link
Member Author

The hardest part about this fix is getting clang installed and consumed. I had to hack it because somebody is adding /external:W4 to the command line options, which clang-cl then complains about:

clang-cl : error : no such file or directory: '/external:W4'

Also, the Directory.build.props is hard-coded to C:\Program Files\LLVM which means it doesn't accept the clang that comes with VS (in C:\Program Files (x86)\Microsoft Visual Studio\yyyy\edition\VC\Tools\Llvm\x64\bin). Once I have a fix for these issues, I'll create another PR.

@kennykerr
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

strings/base_meta.h Show resolved Hide resolved
@sylveon
Copy link
Contributor

sylveon commented Sep 7, 2022

It should be possible to use the LLVM platform toolset to build with clang, instead of hardcoding a path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error: member access into incomplete type 'const _GUID' with clang-cl

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.