[llvm-bugs] [Bug 37137] New: Clang-cl prevents `__restrict`ed struct members to show in debugger

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 16 00:41:05 PDT 2018


            Bug ID: 37137
           Summary: Clang-cl prevents `__restrict`ed struct members to
                    show in debugger
           Product: new-bugs
           Version: 6.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: antoine.vugliano at free.fr
                CC: llvm-bugs at lists.llvm.org

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.


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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180416/0914c496/attachment.html>

More information about the llvm-bugs mailing list