diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -576,10 +576,10 @@ "thread-local storage is not supported for the current target">; def warn_maybe_falloff_nonvoid_function : Warning< - "control may reach end of non-void function">, + "not all control paths in this function return a value; non-void function must return a value">, InGroup; def warn_falloff_nonvoid_function : Warning< - "control reaches end of non-void function">, + "function does not return a value; non-void function must return a value">, InGroup; def err_maybe_falloff_nonvoid_block : Error< "control may reach end of non-void block">; diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -1626,13 +1626,12 @@ /// RequiredPass is run on the fly by Pass Manager when P requests it /// through getAnalysis interface. void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { + assert(RequiredPass && "No required pass?"); assert(P->getPotentialPassManagerType() == PMT_ModulePassManager && "Unable to handle Pass that requires lower level Analysis pass"); assert((P->getPotentialPassManagerType() < RequiredPass->getPotentialPassManagerType()) && "Unable to handle Pass that requires lower level Analysis pass"); - if (!RequiredPass) - return; FunctionPassManagerImpl *FPP = OnTheFlyManagers[P]; if (!FPP) {