From 889da99523930e81e4080084ab9530251c23873d Mon Sep 17 00:00:00 2001 From: Yang Fan Date: Fri, 5 Mar 2021 11:24:55 +0800 Subject: [PATCH] [clang][AST] Fix Wreturn-type gcc warning (NFC) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit GCC warning: ``` /llvm-project/clang-tools-extra/clangd/SemanticHighlighting.cpp: In function ‘bool clang::clangd::{anonymous}::canHighlightName(clang::DeclarationName)’: /llvm-project/clang-tools-extra/clangd/SemanticHighlighting.cpp:64:1: warning: control reaches end of non-void function [-Wreturn-type] 64 | } | ^ ``` --- clang-tools-extra/clangd/SemanticHighlighting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang-tools-extra/clangd/SemanticHighlighting.cpp b/clang-tools-extra/clangd/SemanticHighlighting.cpp index 9e24b92..0b4965c 100644 --- a/clang-tools-extra/clangd/SemanticHighlighting.cpp +++ b/clang-tools-extra/clangd/SemanticHighlighting.cpp @@ -61,6 +61,7 @@ bool canHighlightName(DeclarationName Name) { case DeclarationName::CXXUsingDirective: return false; } + llvm_unreachable("invalid name kind"); } llvm::Optional kindForType(const Type *TP); -- 2.7.4