[clang] [Clang][ItaniumMangle][NFC] Refactor FunctionTypeDepthState (PR #196240)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon May 18 06:16:39 PDT 2026


================
@@ -3784,7 +3776,7 @@ void CXXNameMangler::mangleBareFunctionType(const FunctionProtoType *Proto,
     }
     mangleType(ReturnTy);
 
-    FunctionTypeDepth.leaveResultType();
+    FunctionTypeDepth.leaveFunctionDeclSuffix();
----------------
AaronBallman wrote:

Would it make sense to add an RAII object to do the enter/leave calls? I worry about the possibility of adding a `return` in here someday that breaks this.

https://github.com/llvm/llvm-project/pull/196240


More information about the cfe-commits mailing list