<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 - c-index-test does not pass the binary path to the driver"
   href="https://bugs.llvm.org/show_bug.cgi?id=40515">40515</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>c-index-test does not pass the binary path to the driver
          </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>All
          </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>libclang
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Which is required to get libc++ includes living alongside the 'c-index-test'
binary on MacOS.
Specifically, this would fail on Mac even if libc++ is built and lives
alongside c-index-test:

<span class="quote">> $ cat test.cc
> #include <iostream>
> $ ./bin/c-index-test -write-pch foo.pch test.cc
> test.cc:1:10: fatal error: 'iostream' file not found</span >

This happens because write_pch_file from c-index-test.c filters out first three
command-line args and uses 'clang_parseTranslationUnit2'. If it called
'clang_parseTranslationUnit2FullArgv' and passed argv[0] this would fix the
issue.
Note that the other functions in 'c-index-test.c' also have this problem.

See
<a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259391.html">http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259391.html</a>
for the original report.</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>