Issue with clang-tidy and mingw

55 views Asked by At

I dont know if this is the correct place to ask, but i am having some problems with clang-tidy and mingw on windows.

Everything is working fine compiling with gcc and checking with clang-tidy. Except once i add "unistd" (for sleep). In that case it still compiles and runs perfectly fine with gcc. But First clang-tidy does not find the relevant header files and if i explicity give them via -I it prints out these errors that i have not been able to get rid of:

    C:/msys64/mingw64/include\process.h:36:40: error: expected ';' after top level declarator [clang-diagnostic-error]
      _CRTIMP void __cdecl _endthread(void) __MINGW_ATTRIB_NORETURN;
                                          ^
                                          ;
    C:/msys64/mingw64/include\process.h:38:54: error: expected ';' after top level declarator [clang-diagnostic-error]
      _CRTIMP void __cdecl _endthreadex(unsigned _Retval) __MINGW_ATTRIB_NORETURN;
                                                        ^
                                                        ;
    C:/msys64/mingw64/include\process.h:42:47: error: expected ';' after top level declarator [clang-diagnostic-error]
      void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
                                                  ^
                                                  ;
    C:/msys64/mingw64/include\process.h:43:48: error: expected ';' after top level declarator [clang-diagnostic-error]
      void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
                                                  ^
                                                  ;
    C:/msys64/mingw64/include\process.h:50:26: error: expected ';' after top level declarator [clang-diagnostic-error]
      void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
                            ^
```                            ;
0

There are 0 answers