<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 --- - MSVC-compat __identifier implementation incomplete"
   href="https://llvm.org/bugs/show_bug.cgi?id=27113">27113</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MSVC-compat __identifier implementation incomplete
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows XP
          </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>Frontend
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>MSVC has a feature __identifier("symbolname") which doesn't seem to work in
Clang.

One common use of __identifier is for keywords; ie, __identifier(class), which
works, but it also supports string identifiers which I make fairly extensive
use of in large multi-language projects.
MSVC produces a warning with string identifiers, which you are instructed to
suppress.

This code should compile:
auto x = (__pragma(warning(suppress: 4483)) __identifier("??_7MyClass@@6B@"));

Since MSVC mangling uses characters that are invalid in C++ identifiers (ie,
'?' and '@'), this is a trick to refer to symbols that are un-name-able.

On a side note; in VS, the symbol resolution yields a typed symbol, and type
deduction is correctly performed for 'x' in this case.</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>