]> granicus.if.org Git - clang/commit
[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compi...
authorHaojian Wu <hokein@google.com>
Tue, 15 Jan 2019 19:05:50 +0000 (19:05 +0000)
committerHaojian Wu <hokein@google.com>
Tue, 15 Jan 2019 19:05:50 +0000 (19:05 +0000)
commit0fafc3882334b5e55897aecb828afecb852256af
tree2975e9019a50f4c5e1269a8c52a25d884c9ba72e
parent7e2096bc31de2f2651f6f17799fa264e5d3943bd
[Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

Summary:
This is a regression of r348365.

When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`),
we will use fixed compilation database as a fallback. However the actual compiler
path in the fallback complation command is just `clang-tool` which is
insufficient to detect the libc++ dir.

Reviewers: ilya-biryukov, EricWF

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D56680

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351222 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Tooling/CompilationDatabase.cpp
test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp [new file with mode: 0644]