Reported here:
https://bugs.llvm.org/show_bug.cgi?id=38998#c15
Reviewers: hans
Differential Revision: https://reviews.llvm.org/D83386
#ifdef CLANG_VENDOR
OS << CLANG_VENDOR;
#endif
- OS << ToolName << " version " CLANG_VERSION_STRING " "
- << getClangFullRepositoryVersion();
+ OS << ToolName << " version " CLANG_VERSION_STRING;
+
+ std::string repo = getClangFullRepositoryVersion();
+ if (!repo.empty()) {
+ OS << " " << repo;
+ }
return OS.str();
}
#ifdef CLANG_VENDOR
OS << CLANG_VENDOR;
#endif
- OS << "Clang " CLANG_VERSION_STRING " " << getClangFullRepositoryVersion();
+ OS << "Clang " CLANG_VERSION_STRING;
+
+ std::string repo = getClangFullRepositoryVersion();
+ if (!repo.empty()) {
+ OS << " " << repo;
+ }
+
return OS.str();
}