Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 16.0.0
-
None
Description
The clangd code model runs into raises a warning for certain macOS headers using CFBase.h:
e.g. opening qdarwinaudiodevice_p.h from qtmultimedia/src/multimedia/darwin/qdarwinaudiodevice_p.h warns in
#if defined(Q_OS_MACOS)
# include <CoreAudio/CoreAudio.h>
#endif
with (from the tooltip):
qdarwinaudiodevice_p.h:20:11: In included file: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators? CFBase.h:521:9: error occurred here
observations:
- the warning is not emitted when building, it's only coming from clangd
- the warning is only shown when the file is parsed in a c++ parse context, not when inside an obj-c++ context.
- -Welaborated-enum-base is not added explicitly by the build system, however if i explicitly disable the warning (via -Wno-elaborated-enum-base), clangd is happy
- clang-tidy and friends seem to have a similar problem (e.g. run clang-tidy on qtmultimedia/src/multimedia/darwin/qdarwinaudiodevice_p.h)
not sure if clangd/appleclang behave slightly different here, but i wonder if there's an easy workaround for qtc?