<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 - 'this' is unavailable when entering constructor"
   href="https://bugs.llvm.org/show_bug.cgi?id=43195">43195</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>'this' is unavailable when entering constructor
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stephen.tozer@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22460" name="attach_22460" title="File containing the reproduceable case">attachment 22460</a> <a href="attachment.cgi?id=22460&action=edit" title="File containing the reproduceable case">[details]</a></span>
File containing the reproduceable case

When building the attached file with clang-cl using the flags "/Od /Zi" and
running the output with the Visual Studio 15 2017 debugger, evaluating `this`
at line 8 (before initialization) gives the result "Variable is optimized away
and not available.". This behaviour is different to both clang+lldb and pure
MSVC, both of which give `this` the address of the uninitialized object. This
occurs whether the MSVC linker or lld is used. 

clang version 10.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix</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>