summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/nullptr.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-06 14:22:59 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-10-07 21:56:55 +0200
commitb1c14c30ba99ede85e41934b565195b0cbc69703 (patch)
treebf97cb604fc9704f60fcd2f480a9b2420b4ea604 /compilerplugins/clang/nullptr.cxx
parent0ec6797f8063a1a82dc492840351c3f0f58088a4 (diff)
fix various warnings in compilerplugins
These are triggered when using llvm-config --cxxflags for building, and sometimes there's -Werror. The warnings were mostly unused variables because of being used only in assert(), or default case in switch that covers all enums (it's better to not handle default to get warning if a case is not handled). Change-Id: I0ecdd1f27390aadf033852b0d1ee0ca424ae3c37 Reviewed-on: https://gerrit.libreoffice.org/80317 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins/clang/nullptr.cxx')
-rw-r--r--compilerplugins/clang/nullptr.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/compilerplugins/clang/nullptr.cxx b/compilerplugins/clang/nullptr.cxx
index 30458d7f7f5a..89535daa9849 100644
--- a/compilerplugins/clang/nullptr.cxx
+++ b/compilerplugins/clang/nullptr.cxx
@@ -29,11 +29,9 @@ char const * kindName(Expr::NullPointerConstantKind kind) {
case Expr::NPCK_GNUNull:
return "GNUNull";
case Expr::NPCK_NotNull:
- assert(false); // cannot happen
- // fall through
- default:
- std::abort();
+ break; // cannot happen
}
+ llvm_unreachable("unknown null pointer kind");
}
bool isAnyKindOfPointerType(QualType type) {