Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread John Emmas via cfe-users
On 22/09/2021 18:21, Reid Kleckner via cfe-users wrote: Looking back in the thread, I found the example code, and I see that MSVC refuses to inline this helper, but clang will inline it. I believe clang is permitted to inline it, MSVC will export the static data member (_the_keyboard), so every

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread David Blaikie via cfe-users
On Thu, Sep 23, 2021 at 3:34 AM John Emmas via cfe-users < cfe-users@lists.llvm.org> wrote: > On 22/09/2021 18:21, Reid Kleckner via cfe-users wrote: > > Looking back in the thread, I found the example code, and I see that > > MSVC refuses to inline this helper, but clang will inline it. I > > bel

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread John Emmas via cfe-users
Many thanks Dave, Over on llvm-dev a contributer called Hans found this on Microsoft's MSDN site:- https://docs.microsoft.com/en-us/cpp/cpp/defining-inline-cpp-functions-with-dllexport-and-dllimport So the current theory is that Microsoft's compiler can indeed inline DLL functions - but p

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread Jeffrey Walton via cfe-users
On Thu, Sep 23, 2021 at 12:48 PM David Blaikie via cfe-users wrote: > > On Thu, Sep 23, 2021 at 3:34 AM John Emmas via cfe-users > wrote: >> ... >> Over on llvm-dev I'm trying to persuade them that declaring something as >> __declspec(dllimport) should automatically exclude it from being >> inli