projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ff344e
)
Fix memory leak introduced by llvmorg-11-init-11960-gbab6df86aef.
author
Richard Smith
<richard@metafoo.co.uk>
Thu, 16 Apr 2020 02:38:49 +0000
(19:38 -0700)
committer
Richard Smith
<richard@metafoo.co.uk>
Thu, 16 Apr 2020 02:39:39 +0000
(19:39 -0700)
clang/lib/AST/DeclCXX.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/DeclCXX.cpp
b/clang/lib/AST/DeclCXX.cpp
index
8857a71
..
6c611c2
100644
(file)
--- a/
clang/lib/AST/DeclCXX.cpp
+++ b/
clang/lib/AST/DeclCXX.cpp
@@
-3246,6
+3246,9
@@
APValue &MSGuidDecl::getAsAPValue() const {
Arr.getArrayInitializedElt(I) =
APValue(APSInt(APInt(8, PartVal.Part4And5[I]), true));
}
+ // Register this APValue to be destroyed if necessary. (Note that the
+ // MSGuidDecl destructor is never run.)
+ getASTContext().addDestruction(&APVal);
}
return APVal;