diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-23 15:13:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-23 15:13:44 +0000 |
commit | 29233802236f7fe1db20e00eca4f5cc8f3f64ade (patch) | |
tree | 698474fcb6b8a90d556e11462537a9fbec093b9e /lib/Sema/SemaDeclAttr.cpp | |
parent | def863192f83d8033e1833b48ae8119a65dfc7c8 (diff) |
Teach DelayedDiagnostic to copy its string, rather than hope that the
string itself lives longer than the DelayedDiagnostic. Fixes a recent
use-after-free regression due to my availability attribute work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 31523229c5..81bf230f94 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -3095,7 +3095,7 @@ void Sema::DelayedDiagnostics::popParsingDecl(Sema &S, ParsingDeclState state, // Destroy all the delayed diagnostics we're about to pop off. for (unsigned i = state.SavedStackSize, e = DD.StackSize; i != e; ++i) - DD.Stack[i].destroy(); + DD.Stack[i].Destroy(); DD.StackSize = state.SavedStackSize; } |