<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Generated COM code fails to compile with 9.0.0-RC1"
   href="https://bugs.llvm.org/show_bug.cgi?id=42842">42842</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Generated COM code fails to compile with 9.0.0-RC1
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jvapen@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>// 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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>