[llvm] r365119 - Fix MSVC "not all control paths return a value" warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 02:46:06 PDT 2019
Author: rksimon
Date: Thu Jul 4 02:46:06 2019
New Revision: 365119
URL: http://llvm.org/viewvc/llvm-project?rev=365119&view=rev
Log:
Fix MSVC "not all control paths return a value" warnings. NFCI.
Modified:
llvm/trunk/lib/Remarks/RemarkParser.cpp
Modified: llvm/trunk/lib/Remarks/RemarkParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Remarks/RemarkParser.cpp?rev=365119&r1=365118&r2=365119&view=diff
==============================================================================
--- llvm/trunk/lib/Remarks/RemarkParser.cpp (original)
+++ llvm/trunk/lib/Remarks/RemarkParser.cpp Thu Jul 4 02:46:06 2019
@@ -25,9 +25,8 @@ static std::unique_ptr<ParserImpl> forma
switch (Format) {
case ParserFormat::YAML:
return llvm::make_unique<YAMLParserImpl>(Buf);
- default:
- llvm_unreachable("Unknown format encountered!");
};
+ llvm_unreachable("Unhandled llvm::remarks::ParserFormat enum");
}
static std::unique_ptr<ParserImpl>
@@ -36,9 +35,8 @@ formatToParserImpl(ParserFormat Format,
switch (Format) {
case ParserFormat::YAML:
return llvm::make_unique<YAMLParserImpl>(Buf, &StrTab);
- default:
- llvm_unreachable("Unknown format encountered!");
};
+ llvm_unreachable("Unhandled llvm::remarks::ParserFormat enum");
}
Parser::Parser(ParserFormat Format, StringRef Buf)
More information about the llvm-commits
mailing list