<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 - Clang cannot parse xstring in Visual Studio 2017"
   href="https://bugs.llvm.org/show_bug.cgi?id=33735">33735</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang cannot parse xstring in Visual Studio 2017
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>libclang
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dpldobrev@protonmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I get the following error when parsing:

c:/Program Files (x86)/Microsoft Visual
Studio/2017/Community/VC/Tools/MSVC/14.10.25017/include\xstring:1905:26: error:
constexpr variable '_Memcpy_move_offset' must be initialized by a constant
expression
        static constexpr size_t _Memcpy_move_offset = offsetof(_Mydata_t, _Bx);
                                ^                     ~~~~~~~~~~~~~~~~~~~~~~~~

I understand this is a non-conforming C++ construct. However, shouldn't there
be a way for Clang to cope with it by using a certain set of flags? Shouldn't
"-fms-extensions" and/or "-fms-compatibility" have worked?

The same bug has been asked about at
<a href="http://clang-developers.42468.n3.nabble.com/Working-around-unconformant-offsetof-in-msvc-td4056311.html">http://clang-developers.42468.n3.nabble.com/Working-around-unconformant-offsetof-in-msvc-td4056311.html</a>
.</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>