<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 --- - The function [ getSystemRegistryString ] in [ clang\lib\Driver\MSVCToolChain.cpp ] call readFullStringValue not properly."
   href="https://llvm.org/bugs/show_bug.cgi?id=28627">28627</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>The function [ getSystemRegistryString ] in  [ clang\lib\Driver\MSVCToolChain.cpp ] call readFullStringValue not properly.
          </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>wuzili1234@163.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>===============clang\lib\Driver\MSVCToolChain.cpp==============
static bool getSystemRegistryString(const char *keyPath, const char *valueName,
                                    std::string &value, std::string *phValue) {
  ......
  ......
  ......
  ......

            lResult = readFullStringValue(hKey, valueName, value);
            if (lResult == ERROR_SUCCESS) {
              ......  
              ......
              ......
            }

      lResult = readFullStringValue(hKey, valueName, value);
      if (lResult == ERROR_SUCCESS)
         ......
         ......
         ......

  }
  return false;
#endif // USE_WIN32
}
==============================end=============================

see above, at version 275882, when the function [readFullStringValue] return
true, it means success, but the function [ getSystemRegistryString ] treat true
as failed, because it is expecting 0(ERROR_SUCCESS).

maybe can change to:
  lResult = !readFullStringValue(hKey, valueName, value);

hope to fix it.</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>