[clang-tools-extra] 44c96be - Fix MSVC "not all control paths return a value" warnings. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 20 03:41:56 PST 2020
Author: Simon Pilgrim
Date: 2020-11-20T11:41:20Z
New Revision: 44c96becc9734fa23b7f38688a8f5c72e1f2e891
URL: https://github.com/llvm/llvm-project/commit/44c96becc9734fa23b7f38688a8f5c72e1f2e891
DIFF: https://github.com/llvm/llvm-project/commit/44c96becc9734fa23b7f38688a8f5c72e1f2e891.diff
LOG: Fix MSVC "not all control paths return a value" warnings. NFCI.
Added:
Modified:
clang-tools-extra/clangd/DumpAST.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/DumpAST.cpp b/clang-tools-extra/clangd/DumpAST.cpp
index f9371ecf6374..9ea17e876de7 100644
--- a/clang-tools-extra/clangd/DumpAST.cpp
+++ b/clang-tools-extra/clangd/DumpAST.cpp
@@ -145,6 +145,7 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
TEMPLATE_ARGUMENT_KIND(TemplateExpansion);
#undef TEMPLATE_ARGUMENT_KIND
}
+ llvm_unreachable("Unhandled ArgKind enum");
}
std::string getKind(const NestedNameSpecifierLoc &NNSL) {
assert(NNSL.getNestedNameSpecifier());
@@ -161,6 +162,7 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
NNS_KIND(NamespaceAlias);
#undef NNS_KIND
}
+ llvm_unreachable("Unhandled SpecifierKind enum");
}
std::string getKind(const CXXCtorInitializer *CCI) {
if (CCI->isBaseInitializer())
@@ -185,6 +187,7 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
TEMPLATE_KIND(SubstTemplateTemplateParmPack);
#undef TEMPLATE_KIND
}
+ llvm_unreachable("Unhandled NameKind enum");
}
std::string getKind(const Attr *A) {
switch (A->getKind()) {
@@ -194,6 +197,7 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
#include "clang/Basic/AttrList.inc"
#undef ATTR
}
+ llvm_unreachable("Unhandled attr::Kind enum");
}
std::string getKind(const CXXBaseSpecifier &CBS) {
// There aren't really any variants of CXXBaseSpecifier.
More information about the cfe-commits
mailing list