[clang-tidy] Don't print a message if there's no error.

llvm-svn: 221272
This commit is contained in:
Alexander Kornienko 2014-11-04 15:25:22 +00:00
parent 3c4c9fed08
commit ddf9767a49
1 changed files with 3 additions and 2 deletions

View File

@ -235,8 +235,9 @@ FileOptionsProvider::TryReadConfigFile(StringRef Directory) {
llvm::ErrorOr<ClangTidyOptions> ParsedOptions =
ConfigHandler.second((*Text)->getBuffer());
if (!ParsedOptions) {
llvm::errs() << "Error parsing " << ConfigFile << ": "
<< ParsedOptions.getError().message() << "\n";
if (ParsedOptions.getError())
llvm::errs() << "Error parsing " << ConfigFile << ": "
<< ParsedOptions.getError().message() << "\n";
continue;
}