<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Inconsistency in symbol visibility for explicit template instantiation between cl.exe and clang-cl.exe"
   href="https://llvm.org/bugs/show_bug.cgi?id=29137">29137</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inconsistency in symbol visibility for explicit template instantiation between cl.exe and clang-cl.exe
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.9
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>6yearold@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The code in question is

<a href="https://lxr.kde.org/source/frameworks/kcoreaddons/src/lib/util/kuser.h">https://lxr.kde.org/source/frameworks/kcoreaddons/src/lib/util/kuser.h</a> on line
0114

and

<a href="https://lxr.kde.org/source/frameworks/kcoreaddons/src/lib/util/kuser_win.cpp">https://lxr.kde.org/source/frameworks/kcoreaddons/src/lib/util/kuser_win.cpp</a> on
line 0731

Compiling it with cl.exe works fine, while clang-cl.exe gives linking errors:

[ 22%] Linking CXX shared library ..\..\bin\KF5CoreAddons.dll
   Creating library ..\..\lib\KF5CoreAddons.lib and object
..\..\lib\KF5CoreAddons.exp
kshell.cpp.obj : error LNK2019: unresolved external symbol "protected: struct
KUserOrGroupId<void *> & __cdecl KUserOrGroupId<void *>::operator=(struct
KUserOrGroupId<void *> const &)" (??4?$KUserOrGroupId@PEAX@@IEAAAEAU0@AEBU0@@Z)
referenced in function "public: struct KUserId & __cdecl
KUserId::operator=(struct KUserId const &)" (??4KUserId@@QEAAAEAU0@AEBU0@@Z)
..\..\bin\KF5CoreAddons.dll : fatal error LNK1120: 1 unresolved externals

I could try to come up with a lesser testcase if needed.</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>