Skip to content

Commit 808db07

Browse files
committed
[Compiler plugins] Fix missing return along error-handling paths
Fixes a crash when we cannot load a compiler plugin for some reason, tracked by rdar://107797992.
1 parent 97a3f6f commit 808db07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6415,6 +6415,7 @@ void *ASTContext::loadLibraryPlugin(StringRef path) {
64156415
if (!plugin) {
64166416
Diags.diagnose(SourceLoc(), diag::compiler_plugin_not_loaded, path,
64176417
llvm::toString(plugin.takeError()));
6418+
return nullptr;
64186419
}
64196420

64206421
return plugin.get();

0 commit comments

Comments
 (0)