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 | 899b68fdf5536ba6b45941dd385d96dda563a4d1 (patch) | |
tree | 215786d3bbc0b2c249f05677d19d206598847ec7 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | d71149a45316daef5f86cf63f8435793aeef83bf (diff) | |
download | bcm5719-llvm-899b68fdf5536ba6b45941dd385d96dda563a4d1.tar.gz bcm5719-llvm-899b68fdf5536ba6b45941dd385d96dda563a4d1.zip |
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.
llvm-svn: 128148
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 31523229c59..81bf230f942 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/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; } |