summaryrefslogtreecommitdiffstats
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-26 13:18:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-26 14:34:30 +0100
commitaf89738d225f756bc37a6ff4fd647622f81e24ef (patch)
tree03d438fb1cbd1208eda2986bff444953d999455c /compilerplugins
parent-Werror=return-type (diff)
downloadcore-af89738d225f756bc37a6ff4fd647622f81e24ef.tar.gz
core-af89738d225f756bc37a6ff4fd647622f81e24ef.zip
-Werror=return-type
Change-Id: I44e627fa9de9c48a534cbc9ade6cc9d567553709
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/nullptr.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/compilerplugins/clang/nullptr.cxx b/compilerplugins/clang/nullptr.cxx
index 8c1426919c30..800343963b60 100644
--- a/compilerplugins/clang/nullptr.cxx
+++ b/compilerplugins/clang/nullptr.cxx
@@ -8,6 +8,7 @@
*/
#include <cassert>
+#include <cstdlib>
#include <set>
#include "compat.hxx"
@@ -17,9 +18,6 @@ namespace {
char const * kindName(Expr::NullPointerConstantKind kind) {
switch (kind) {
- case Expr::NPCK_NotNull:
- assert(false); // cannot happen
- // fall through
case Expr::NPCK_ZeroExpression:
return "ZeroExpression";
case Expr::NPCK_ZeroLiteral:
@@ -28,6 +26,11 @@ char const * kindName(Expr::NullPointerConstantKind kind) {
return "CXX11_nullptr";
case Expr::NPCK_GNUNull:
return "GNUNull";
+ case Expr::NPCK_NotNull:
+ assert(false); // cannot happen
+ // fall through
+ default:
+ std::abort();
}
}