https://bugs.llvm.org/show_bug.cgi?id=42842
Bug ID: 42842
Summary: Generated COM code fails to compile with 9.0.0-RC1
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: jva...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
// C:\LLVM_9_0_0-RC1\bin\clang-cl.exe -ferror-limit=1 /nologo /c /EHsc
/std:c++17 -fms-compatibility-version=19.11 t.cpp
#include <comdef.h>
struct __declspec(uuid("99bca7bd-e8c4-4d5f-a0cf-6d907901ff07"))
ISAXEntityResolver;
_COM_SMARTPTR_TYPEDEF(ISAXEntityResolver, __uuidof(ISAXEntityResolver));
inline ISAXEntityResolverPtr getEntityResolver() {
struct ISAXEntityResolver * _result = 0;
return ISAXEntityResolverPtr(_result, false);
}
ERROR:
======
In file included from t.cpp:2:
In file included from C:\Vs2017\VC\Tools\MSVC\14.16.27023\include\comdef.h:467:
C:\Vs2017\VC\Tools\MSVC\14.16.27023\include\comip.h(174,16): error: conflicting
types for
'_com_ptr_t'
template<> _com_ptr_t(Interface* pInterface) throw()
^
t.cpp(6,30): note: in instantiation of template class
'_com_ptr_t<_com_IIID<ISAXEntityResolver,
&__uuidof(ISAXEntityResolver)> >' requested here
inline ISAXEntityResolverPtr getEntityResolver() {
^
C:\Vs2017\VC\Tools\MSVC\14.16.27023\include\comip.h(174,16): note: previous
declaration is
here
template<> _com_ptr_t(Interface* pInterface) throw()
^
NOTES:
======
For some reason, Clang is detecting a method with another definition which is
on the same line. As if it parses the header twice
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs