Skip to content

Commit df710ef

Browse files
authored
Merge pull request #42574 from ahoppen/pr/report-more-specific-compilation-setup-failed-error
[SourceKit] If setting up the compiler instance failed with an error, don't override it with a generic error message
2 parents 6a4f37b + 0124407 commit df710ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,10 @@ ASTUnitRef ASTBuildOperation::buildASTUnit(std::string &Error) {
10491049
}
10501050

10511051
if (CompIns.setup(Invocation, Error)) {
1052-
// FIXME: Report the diagnostic.
10531052
LOG_WARN_FUNC("Compilation setup failed!!!");
1054-
Error = "compilation setup failed";
1053+
if (Error.empty()) {
1054+
Error = "compilation setup failed";
1055+
}
10551056
return nullptr;
10561057
}
10571058
registerIDERequestFunctions(CompIns.getASTContext().evaluator);

0 commit comments

Comments
 (0)