summaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-12 19:33:26 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-12 19:33:26 +0000
commitcb4e543bc78da46d23c1df47b61d8dc417753a5b (patch)
tree018fbfe956c2914253d060df14ff7eacc5f5e89b /lib/Format/Format.cpp
parentd2f657fb156f0c4e5173e79440e15d37dbeb99ae (diff)
downloadclang-cb4e543bc78da46d23c1df47b61d8dc417753a5b.tar.gz
clang-cb4e543bc78da46d23c1df47b61d8dc417753a5b.tar.bz2
clang-cb4e543bc78da46d23c1df47b61d8dc417753a5b.tar.xz
Permit -Wswitch coverage for enumerations.
Thanks to David Blakie and Richard Smith for pointing out that we can retain the -Wswitch coverage while avoiding the warning from GCC by pushing the unreachable outside of the switch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index e1ec2517b4..913c6225ee 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -272,7 +272,6 @@ 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:
@@ -280,6 +279,7 @@ std::string ParseErrorCategory::message(int EV) const {
case ParseError::Unsuitable:
return "Unsuitable";
}
+ llvm_unreachable("unexpected parse error");
}
FormatStyle getLLVMStyle() {