From cab3c6c6c48ed0da0f047bdc1a337d991c78ad8c Mon Sep 17 00:00:00 2001 From: Yang Fan Date: Wed, 5 May 2021 14:44:48 +0800 Subject: [PATCH] [clang][TargetCXXABI] Fix -Wreturn-type warning (NFC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC warning: ``` In file included from /llvm-project/clang/include/clang/Basic/LangOptions.h:22, from /llvm-project/clang/include/clang/Frontend/CompilerInvocation.h:16, from /llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:9: /llvm-project/clang/include/clang/Basic/TargetCXXABI.h: In static member function ‘static bool clang::TargetCXXABI::isSupportedCXXABI(const llvm::Triple&, clang::TargetCXXABI::Kind)’: /llvm-project/clang/include/clang/Basic/TargetCXXABI.h:114:3: warning: control reaches end of non-void function [-Wreturn-type] 114 | }; | ^ ``` --- clang/include/clang/Basic/TargetCXXABI.h | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/include/clang/Basic/TargetCXXABI.h b/clang/include/clang/Basic/TargetCXXABI.h index 739ade31451e..91189996a4d9 100644 --- a/clang/include/clang/Basic/TargetCXXABI.h +++ b/clang/include/clang/Basic/TargetCXXABI.h @@ -111,6 +111,7 @@ public: case Microsoft: return T.isKnownWindowsMSVCEnvironment(); } + llvm_unreachable("invalid CXXABI kind"); }; /// Does this ABI generally fall into the Itanium family of ABIs?