aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2024-01-16 12:10:38 -0800
committerGitHub <noreply@github.com>2024-01-16 12:10:38 -0800
commit4737959d91fab7673b1bb642f88658bb2a24d723 (patch)
tree8d7f740c565ec07f33d1b7c2ae96402ca686d8a5 /clang/unittests/Format/ConfigParseTest.cpp
parent337b7715929909fd2bb55069ecb939cf23dbfe52 (diff)
downloadllvm-4737959d91fab7673b1bb642f88658bb2a24d723.zip
llvm-4737959d91fab7673b1bb642f88658bb2a24d723.tar.gz
llvm-4737959d91fab7673b1bb642f88658bb2a24d723.tar.bz2
[AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (#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 ASTContext allocator as well. The downside is that an additional heap allocation and copy of the data needs to be made when calling getInitValue if the APSInt is large. Fixes #78160.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
0 files changed, 0 insertions, 0 deletions