llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Daniel Paoliello (dpaoliello)

<details>
<summary>Changes</summary>

Adds a default case to the switch to the existing `llvm_unreachable` statement.

Build break was introduced by #<!-- -->111203

It was not caught by the builders as they use Visual Studio 2019, whereas this 
warning only appears in 2022.

---
Full diff: https://github.com/llvm/llvm-project/pull/112767.diff


1 Files Affected:

- (modified) clang/lib/Sema/SemaHLSL.cpp (+1) 


``````````diff
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index efb0fbaa432d76..50f0a553bc86e3 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -102,6 +102,7 @@ static ResourceClass getResourceClass(RegisterType RT) {
     return ResourceClass::Sampler;
   case RegisterType::C:
   case RegisterType::I:
+  default:
     llvm_unreachable("unexpected RegisterType value");
   }
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/112767
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to