- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
  Not Evaluated                     
     - 
    None
 - 
    Qt Creator 4.13.0
 - 
    None
 
I've been using qtcreator with GCC 10.2 and coroutines enabled in a CMake project. It builds fine, but it looks like the Clang code model (code completion) doesn't properly support this yet. In code that uses it, you get errors like:
error: std::experimental::coroutine_traits type was not found; include <experimental/coroutine> before defining a coroutine
The example just includes <coroutine> cpp header. Navigating into this (GCC) header, there's the following #if:
#if __cpp_impl_coroutine
Clang code model thinks this if-statement is false, even though during actual compilation it is true (as I'm building with GCC with C++20 + -fcoroutines). Because it thinks it's false, it skips the whole header. From what I can see, the clang that ships with qtcreator, should have support for coroutines though - it's just that it doesn't parse the header the right way.
Reproducible by just defining an empty function with 'co_return' in it - clang code model should complain about this.
Is there any work-around for this?
- is duplicated by
 - 
                    
QTCREATORBUG-25860 Static anlyzer: C++20 std version check macros failed
-         
     - Closed
 
 -