[clang] [CIR] Remove `noexcept` from ABIInfo destructor (NFC) (PR #235779)

Federico Bruzzone via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 06:57:09 PDT 2026


https://github.com/FedericoBruzzone created https://github.com/llvm/llvm-project/pull/235779

This NFC removes `noexcept` from the `ABIInfo` destructor in order to suppress this compilation warning:

```sh
[1/10] Building CXX object tools/clang/lib/CIR/CodeGen/CMakeFiles/obj.clangCIR.dir/TargetInfo.cpp.o
/Users/federicobruzzone/dev/llvm-project/clang/lib/CIR/CodeGen/TargetInfo.cpp:177:10: warning: function previously declared with an implicit exception specification redeclared with an explicit exception specification [-Wimplicit-exception-spec-mismatch]
  177 | ABIInfo::~ABIInfo() noexcept = default;
      |          ^
/Users/federicobruzzone/dev/llvm-project/clang/lib/CIR/CodeGen/ABIInfo.h:25:11: note: previous declaration is here
   25 |   virtual ~ABIInfo();
      |           ^
1 warning generated.
```

>From 09de1b72bc66216cd4273b3e560a035f5cd276b9 Mon Sep 17 00:00:00 2001
From: Federico Bruzzone <federico.bruzzone.i at gmail.com>
Date: Mon, 26 Oct 2026 06:48:21 -0700
Subject: [PATCH] [CIR] Remove `noexcept` from ABIInfo destructor (NFC)

Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
---
 clang/lib/CIR/CodeGen/TargetInfo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/CIR/CodeGen/TargetInfo.cpp b/clang/lib/CIR/CodeGen/TargetInfo.cpp
index 79620906baa0c2..148bf70a08c6f1 100644
--- a/clang/lib/CIR/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CIR/CodeGen/TargetInfo.cpp
@@ -174,7 +174,7 @@ clang::CIRGen::createX8664TargetCIRGenInfo(CIRGenTypes &cgt) {
   return std::make_unique<X8664TargetCIRGenInfo>(cgt);
 }
 
-ABIInfo::~ABIInfo() noexcept = default;
+ABIInfo::~ABIInfo() = default;
 
 bool TargetCIRGenInfo::isNoProtoCallVariadic(
     const FunctionNoProtoType *fnType) const {



More information about the cfe-commits mailing list