<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-cl prevents `__restrict`ed struct members to show in debugger"
   href="https://bugs.llvm.org/show_bug.cgi?id=37137">37137</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang-cl prevents `__restrict`ed struct members to show in debugger
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>antoine.vugliano@free.fr
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When compiling with clang-cl and debugging info activated (/Zi), Visual
Studio's debugger is unable to access struct/class members that are marked with
`__restrict`. This however works with cl.exe.

Example:

```
struct Foo
{
    int * __restrict i;
};

int main(int argc, char** argv)
{
    Foo foo;

    return 0;
}
```

Compiling this code in debug and trying to visualize the value of `i` (either
from hovering it in the source pane or by the watch window) will only show
`<Unable to read memory>` or `class "Foo" has no member "i"`.
Removing the attribute will allow the debugger to inspect `foo.i`.

OS: Windows 10, Windows 7
VS: 2015U3
target: windows x86 and x64</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>