https://github.com/andykaylor created 
https://github.com/llvm/llvm-project/pull/140159

This fixes a warning about an unhandled Decl that was recently introduced. 
While adding the new decl, I noticed that one of the others that was in the 
"NYI" group belonged in the "unreachable" group, so I moved it also.

>From 9b2c4da71aa906a8b66de4d053ec59975e5233b2 Mon Sep 17 00:00:00 2001
From: Andy Kaylor <akay...@nvidia.com>
Date: Thu, 15 May 2025 16:06:35 -0700
Subject: [PATCH] [CIR][NFC] Fix warning about unhandled Decl

This fixes a warning about an unhandled Decl that was recently introduced.
While adding the new decl, I noticed that one of the others that was on
the "NYI" case belonged on the "unreachable" case, so I moved it also.
---
 clang/lib/CIR/CodeGen/CIRGenDecl.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/CIR/CodeGen/CIRGenDecl.cpp 
b/clang/lib/CIR/CodeGen/CIRGenDecl.cpp
index 498d7533c2204..61af33053dc0a 100644
--- a/clang/lib/CIR/CodeGen/CIRGenDecl.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenDecl.cpp
@@ -322,6 +322,8 @@ void CIRGenFunction::emitDecl(const Decl &d) {
   case Decl::ObjCTypeParam:
   case Decl::Binding:
   case Decl::UnresolvedUsingIfExists:
+  case Decl::HLSLBuffer:
+  case Decl::HLSLRootSignature:
     llvm_unreachable("Declaration should not be in declstmts!");
 
   case Decl::Function:     // void X();
@@ -374,7 +376,6 @@ void CIRGenFunction::emitDecl(const Decl &d) {
     return;
   }
   case Decl::ImplicitConceptSpecialization:
-  case Decl::HLSLBuffer:
   case Decl::TopLevelStmt:
   case Decl::UsingPack:
   case Decl::Decomposition: // This could be moved to join Decl::Var

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

Reply via email to