<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-scan-deps is incompatible with a clang-cl compilation database"
   href="https://bugs.llvm.org/show_bug.cgi?id=44092">44092</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-scan-deps is incompatible with a clang-cl compilation database
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.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>Tooling
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang-scan-deps starts right off by assuming a GCC-style clang command line,
which is simply not present in a compilation database containing clang-cl
command lines:
<a href="https://github.com/llvm/llvm-project/blob/a9bb669e59f4b2270caa8a35128ca3b2de0595fe/clang/tools/clang-scan-deps/ClangScanDeps.cpp#L183">https://github.com/llvm/llvm-project/blob/a9bb669e59f4b2270caa8a35128ca3b2de0595fe/clang/tools/clang-scan-deps/ClangScanDeps.cpp#L183</a>

Basically, clang-scan-deps is reimplementing a small percent of clang's command
line parsing logic. This seems less than ideal. It seems like the Tooling
argument adjuster API is very stringly typed and decoupled from the ArgList /
Option library that the actual driver uses to parse command line options.

What can we do to fix this in the short and long term, assuming that people
will continue to produce compilation databases with clang-cl? We don't have
anything that rewrites from clang-cl command line syntax to GCC clang syntax,
but I wonder if that would be the simplest way forward that ensures that as new
tools are added they are more likely to support Windows out of the box or with
minimal effort.</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>