Author: Andy Kaylor Date: 2025-05-16T09:08:32-07:00 New Revision: 2f5a24d0c555832ec6e5747cc7bad814ed97cbdc
URL: https://github.com/llvm/llvm-project/commit/2f5a24d0c555832ec6e5747cc7bad814ed97cbdc DIFF: https://github.com/llvm/llvm-project/commit/2f5a24d0c555832ec6e5747cc7bad814ed97cbdc.diff LOG: [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. Added: Modified: clang/lib/CIR/CodeGen/CIRGenDecl.cpp Removed: ################################################################################ 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