I’ve put the above file as %SDKROOT%\usr\share\winsdk.apinotes, alongside the existing winsdk.modulemap, but it doesn’t seem to be working – I can still call RegisterClass and CreateWindowEx2 is unavailable.
The alias for CreateWindowExA is some what concerning as we now import that as CreateWindowEx (as of 6.2, but does require enabling the macro aliasing option).
The availability should be possible to apply though (though really not something that we would want to do - RegisterClass should be usable.
The reason that that is likely not getting picked up is due to the naming. WinSDK would be wrong. These need the submodule name I believe (see what we do for Android with posix_spawn). I think that these might be part of the GDI (sub)module?
Thanks for the reply, Saleem! (To be clear, neither of these are real examples -- they're purely for test purposes. I was looking for examples I was using in my test project to validate that the API notes are being picked up by LLVM.)
These would be exported by user32.dll, so should the file be named user32.apinotes, then? I was trying to follow https://clang.llvm.org/docs/APINotes.html, which doesn't mention the concept of a submodule?
The module name is not based on the DLL. The submodules are a concept from clang modules. If you look at the winsdk_um.modulemap you will find that the module is User, so it should be called User.apinotes I believe. If you are looking for a concrete example posix_filesystem.apinotes would be helpful.