<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 --- - incorrect logic when detect windows SDK"
   href="https://llvm.org/bugs/show_bug.cgi?id=28380">28380</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>incorrect logic when detect windows SDK
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>comicfans44@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>Created <span class=""><a href="attachment.cgi?id=16669" name="attach_16669" title="misc patch to address this">attachment 16669</a> <a href="attachment.cgi?id=16669&action=edit" title="misc patch to address this">[details]</a></span>
misc patch to address this

I've found clang version 

 git-svn-id: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@274110">https://llvm.org/svn/llvm-project/cfe/trunk@274110</a>
91177308-0d34-0410-b5e6-96231b3b80d8

counld not detect windows SDK, attached patch address this.

1. readFullStringValue returns bool, should not compared with ERROR_SUCCESS
2. RegQueryValueExW string may contain null terminating char ,should be trimmed
these leads getSystemRegistryString return incorrect result, and following
getWindows10SDKVersion gives incorrect result for string append, prevents
correct
SDK detected.</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>