Skip to content

Commit 2f5a24d

Browse files
authored
[CIR][NFC] Fix warning about unhandled Decl (#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.
1 parent fa2263b commit 2f5a24d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ void CIRGenFunction::emitDecl(const Decl &d) {
322322
case Decl::ObjCTypeParam:
323323
case Decl::Binding:
324324
case Decl::UnresolvedUsingIfExists:
325+
case Decl::HLSLBuffer:
326+
case Decl::HLSLRootSignature:
325327
llvm_unreachable("Declaration should not be in declstmts!");
326328

327329
case Decl::Function: // void X();
@@ -374,7 +376,6 @@ void CIRGenFunction::emitDecl(const Decl &d) {
374376
return;
375377
}
376378
case Decl::ImplicitConceptSpecialization:
377-
case Decl::HLSLBuffer:
378379
case Decl::TopLevelStmt:
379380
case Decl::UsingPack:
380381
case Decl::Decomposition: // This could be moved to join Decl::Var

0 commit comments

Comments
 (0)