summaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-12 17:43:37 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-12 17:43:37 +0000
commitd2f657fb156f0c4e5173e79440e15d37dbeb99ae (patch)
tree730f16459f9412420cb0636421a5662c072f643f /lib/Format/Format.cpp
parente616fa6104088b53052b25f371bd05700a865cf9 (diff)
downloadclang-d2f657fb156f0c4e5173e79440e15d37dbeb99ae.tar.gz
clang-d2f657fb156f0c4e5173e79440e15d37dbeb99ae.tar.bz2
clang-d2f657fb156f0c4e5173e79440e15d37dbeb99ae.tar.xz
Basic: fix warnings from GCC
tools/clang/lib/Basic/DiagnosticIDs.cpp: In function ‘clang::DiagnosticIDs::Level toLevel(clang::diag::Severity)’: tools/clang/lib/Basic/DiagnosticIDs.cpp:382:1: warning: control reaches end of non-void function [-Wreturn-type] tools/clang/lib/Format/Format.cpp: In member function ‘virtual std::string clang::format::ParseErrorCategory::message(int) const’: tools/clang/lib/Format/Format.cpp:282:1: warning: control reaches end of non-void function [-Wreturn-type] Add a default cases that asserts that we handle the severity, parse error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 176cb49df8..e1ec2517b4 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -272,6 +272,7 @@ const char *ParseErrorCategory::name() const LLVM_NOEXCEPT {
std::string ParseErrorCategory::message(int EV) const {
switch (static_cast<ParseError>(EV)) {
+ default: llvm_unreachable("unexpected parse error");
case ParseError::Success:
return "Success";
case ParseError::Error: