Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Don't show unique file id warning if there is no file name
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdufault committed Jun 20, 2017
1 parent 01869e9 commit 3513a3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/file_consumer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ std::vector<std::unique_ptr<IndexFile>> FileConsumer::TakeLocalState() {

void FileConsumer::EmitError(CXFile file) const {
std::string file_name = clang::ToString(clang_getFileName(file));
std::string error_message = "Could not get unique file id for " + file_name + " when parsing " + parse_file_;
std::cerr << error_message << std::endl;
// TODO: Investigate this more, why can we get an empty file name?
if (!file_name.empty()) {
std::string error_message = "Could not get unique file id for " + file_name + " when parsing " + parse_file_;
std::cerr << error_message << std::endl;
}
}

0 comments on commit 3513a3e

Please sign in to comment.