Issue 53010
Summary [msvc] Resolve conflict between MSVC STL <coroutines> header and Clang
Labels new issue
Assignees
Reporter rnk
    If you include <coroutines> with the MSVC STL using clang-cl, you will hit this error:
https://github.com/microsoft/STL/blob/main/stl/inc/experimental/coroutine#L29

```
#if defined(__clang__) && !defined(_SILENCE_CLANG_COROUTINE_MESSAGE)
#error The <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers currently do not \
support Clang. You can define _SILENCE_CLANG_COROUTINE_MESSAGE to silence this message and acknowledge that this is \
unsupported.
#endif // defined(__clang__) && !defined(_SILENCE_CLANG_COROUTINE_MESSAGE)
```

It's not surprising that new library features don't work with all compilers, but what makes this more urgent is that the winrt/Windows.Foundations.h header includes coroutines:

```
In file included from <redacted>
In file included from <redacted>/winrt/Windows.Foundation.h:6:
In file included from <redacted>/winrt/base.h:53:
<redacted>/MSVC/14.28.29910/include/experimental/coroutine(30,2): error: The <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers currently do not support Clang. You can define _SILENCE_CLANG_COROUTINE_MESSAGE to silence this message and acknowledge that this is unsupported.
#error The <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers currently do not \
 ^
1 error generated.
```

We need to understand the conflict better, and at least try to make winrt work out of the box in new SDK versions.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to