[clang] HLSLResource.h - fix MSVC "not all control paths return a value" warning. NFC. (PR #179203)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 2 02:52:16 PST 2026


https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/179203

None

>From 04ecdf058cb4ce3a3789fc244a711ad440066cb0 Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Mon, 2 Feb 2026 10:50:16 +0000
Subject: [PATCH] HLSLResource.h - fix MSVC "not all control paths return a
 value" warning. NFC.

---
 clang/include/clang/AST/HLSLResource.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/include/clang/AST/HLSLResource.h b/clang/include/clang/AST/HLSLResource.h
index 071e59d72d983..aedb2cd5db6ba 100644
--- a/clang/include/clang/AST/HLSLResource.h
+++ b/clang/include/clang/AST/HLSLResource.h
@@ -106,6 +106,7 @@ inline uint32_t getResourceDimensions(llvm::dxil::ResourceDimension Dim) {
     llvm_unreachable(
         "We cannot get the dimension of a resource with unknown dimension.");
   }
+  llvm_unreachable("Unhandled llvm::dxil::ResourceDimension enum.");
 }
 
 } // namespace hlsl



More information about the cfe-commits mailing list