From fc11fbea566fbe51763ae5bfa90d15b910fd96ee Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Thu, 10 Apr 2025 16:35:52 -0700 Subject: [PATCH] [CIR] Fix warnings, again! --- clang/lib/CIR/CodeGen/CIRGenFunction.h | 2 +- clang/lib/CIR/CodeGen/CIRGenModule.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h b/clang/lib/CIR/CodeGen/CIRGenFunction.h index 17aa68492f983..0ca95625b313c 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.h +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h @@ -164,7 +164,7 @@ class CIRGenFunction : public CIRGenTypeCache { /// An abstract representation of regular/ObjC call/message targets. class AbstractCallee { /// The function declaration of the callee. - const clang::Decl *calleeDecl; + [[maybe_unused]] const clang::Decl *calleeDecl; public: AbstractCallee() : calleeDecl(nullptr) {} diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp index 4b5acb36a9319..fd11523ebba61 100644 --- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp @@ -262,6 +262,7 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty, } errorNYI(d->getSourceRange(), "reference of undeclared global"); + return {}; } cir::GlobalOp