clang warnings on Windows
flriancu opened this issue · comments
Hi @samhocevar ,
with latest commit (0049adb), clang produces some warnings when compiling the code on Windows:
[...]/pfd/portable-file-dialogs.h:965:88: warning: extension used
[-Wlanguage-extension-token]
(CLSID_FileOpenDialog, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&ifd));
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\combaseapi.h:207:30: note: expanded from macro
'IID_PPV_ARGS'
#define IID_PPV_ARGS(ppType) __uuidof(**(ppType)), IID_PPV_ARGS_Helper(ppType)
^
[...]/pfd/portable-file-dialogs.h:1261:27: warning: extension used
[-Wlanguage-extension-token]
IID_PPV_ARGS(&folder));
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\combaseapi.h:207:30: note: expanded from macro
'IID_PPV_ARGS'
#define IID_PPV_ARGS(ppType) __uuidof(**(ppType)), IID_PPV_ARGS_Helper(ppType)
^
Since these warnings appear in Windows headers, I believe this is more an issue with Clang.
Also I’m a bit surprised that commit 0049adb may have caused the problem to appear; are you sure about that? Maybe your version of Clang was updated at about the same time?
About the warning itself, do you think disabling it on your side may be acceptable? Like this:
#pragma clang diagnostic ignored "-Wlanguage-extension-token"
#include "portable-file-dialogs.h"
#pragma clang diagnostic warning "-Wlanguage-extension-token"