[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/78311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/78311 >From a8345976354bff4a05a7e0ff28bae152039f5458 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 15 Jan 2024 22:43:55 -0800 Subject: [PATCH 1/3] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/78311 >From a8345976354bff4a05a7e0ff28bae152039f5458 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 15 Jan 2024 22:43:55 -0800 Subject: [PATCH 1/2] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM thank you for the fix! I'm on the fence about this getting a release note, but leaning towards mentioning it as fixing a memory leak (I don't expect this to be observable for most folks because cleaning up the ASTContext generally

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang-codegen Author: Craig Topper (topperc) Changes EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntSto

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/78311 EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntStorage to allocate large APSInts using the ASTCo