Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file witho...
authorSam McCall <sam.mccall@gmail.com>
Wed, 16 Jan 2019 09:41:26 +0000 (09:41 +0000)
committerSam McCall <sam.mccall@gmail.com>
Wed, 16 Jan 2019 09:41:26 +0000 (09:41 +0000)
commitf2e25e708c49fa79a2dbe8b68f3ce4873a489739
tree853c271bcc92a13486cc10d91dcb87b487dbcdfb
parentc3716617df6c8cb41031a61237343a4a28567c63
Reapply [Tooling] Make clang-tool find libc++ dir on mac when running on a file without compilation database.

This reverts commit r351282, and re-lands r351222 and r351229 with the
use-after-free fixed.

llvm-svn: 351316
clang/lib/Tooling/CompilationDatabase.cpp
clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp [new file with mode: 0644]
clang/unittests/Tooling/CompilationDatabaseTest.cpp