зеркало из https://github.com/microsoft/clang-1.git
Minor rework of code example for clarity. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
a7846852ba
Коммит
37f7a33267
|
@ -141,13 +141,11 @@ int main(int argc, const char **argv) {
|
|||
cl::ParseCommandLineOptions(argc, argv);
|
||||
if (!Compilations) {
|
||||
std::string ErrorMessage;
|
||||
if (!BuildPath.empty()) {
|
||||
Compilations.reset(
|
||||
CompilationDatabase::autoDetectFromDirectory(BuildPath, ErrorMessage));
|
||||
} else {
|
||||
Compilations.reset(CompilationDatabase::autoDetectFromSource(
|
||||
SourcePaths[0], ErrorMessage));
|
||||
}
|
||||
Compilations.reset(
|
||||
!BuildPath.empty() ?
|
||||
CompilationDatabase::autoDetectFromDirectory(BuildPath, ErrorMessage) :
|
||||
CompilationDatabase::autoDetectFromSource(SourcePaths[0], ErrorMessage)
|
||||
);
|
||||
if (!Compilations)
|
||||
llvm::report_fatal_error(ErrorMessage);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче