[llvm-bugs] [Bug 40515] New: c-index-test does not pass the binary path to the driver

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 29 07:44:56 PST 2019


            Bug ID: 40515
           Summary: c-index-test does not pass the binary path to the
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ibiryukov at google.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

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:

> $ 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

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
Note that the other functions in 'c-index-test.c' also have this problem.

for the original report.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190129/8d047121/attachment.html>

More information about the llvm-bugs mailing list