]> granicus.if.org Git - clang/commit
Method loadFromCommandLine should be able to report errors
authorSerge Pavlov <sepavloff@gmail.com>
Wed, 24 May 2017 11:57:37 +0000 (11:57 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Wed, 24 May 2017 11:57:37 +0000 (11:57 +0000)
commit5bfd35d62f24a6013bbb2a7a2b78338f158d2b4a
tree47e7c6ed549340d393b27de16803a91f098dcdf1
parenteaa2b10ecb6c19ac50b204c4c62e99434234bb80
Method loadFromCommandLine should be able to report errors

Now FixedCompilationDatabase::loadFromCommandLine has no means to report
which error occurred if it fails to create compilation object. This is
a block for implementing D33013, because after that change driver will
refuse to create compilation if command line contains erroneous options.

This change adds additional argument to loadFromCommandLine, which is
assigned error message text if compilation object was not created. This is
the same way as other methods of CompilationDatabase report failure.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303741 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Tooling/CompilationDatabase.h
lib/Frontend/CreateInvocationFromCommandLine.cpp
lib/Tooling/CommonOptionsParser.cpp
lib/Tooling/CompilationDatabase.cpp
lib/Tooling/Tooling.cpp
unittests/Tooling/CompilationDatabaseTest.cpp