Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -4918,9 +4918,11 @@ if (Triple.isX86() && Triple.isOSBinFormatELF()) { StringRef Val = A->getValue(); if (Val != "all" && Val != "labels" && Val != "none" && - !(Val.startswith("list=") && llvm::sys::fs::exists(Val.substr(5)))) + !Val.startswith("list=")) D.Diag(diag::err_drv_invalid_value) << A->getAsString(Args) << A->getValue(); + else if (Val.startswith("list=") && !llvm::sys::fs::exists(Val.substr(5))) + D.Diag(diag::err_drv_no_such_file) << Val.substr(5); else A->render(Args, CmdArgs); } else {