Author: Simon Pilgrim
Date: 2022-04-07T14:01:15+01:00
New Revision: dc15bedfb9de8ec574c1b480a15cd584b82eaa0d

URL: 
https://github.com/llvm/llvm-project/commit/dc15bedfb9de8ec574c1b480a15cd584b82eaa0d
DIFF: 
https://github.com/llvm/llvm-project/commit/dc15bedfb9de8ec574c1b480a15cd584b82eaa0d.diff

LOG: Fix MSVC "not all control paths return a value" warning

Added: 
    

Modified: 
    clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp 
b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
index 355c3183edf60..b9809a2808faa 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
@@ -479,6 +479,7 @@ std::string NewFunction::renderDeclaration(FunctionDeclKind 
K,
         llvm::formatv("{0} {\n{1}\n}\n", Declaration, getFuncBody(SM)));
     break;
   }
+  llvm_unreachable("Unsupported FunctionDeclKind enum");
 }
 
 std::string NewFunction::getFuncBody(const SourceManager &SM) const {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to