Skip to content

Commit 39438e3

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 903505a commit 39438e3

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
@@ -6429,6 +6429,7 @@ LoadedLibraryPlugin *ASTContext::loadLibraryPlugin(StringRef path) {
64296429
if (!plugin) {
64306430
Diags.diagnose(SourceLoc(), diag::compiler_plugin_not_loaded, path,
64316431
llvm::toString(plugin.takeError()));
6432+
return nullptr;
64326433
}
64336434

64346435
return plugin.get();

0 commit comments

Comments
 (0)