diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-04-04 00:34:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-04-04 00:34:49 +0000 |
commit | b0d06e2e6b340c198892fa0389fde906903a47ec (patch) | |
tree | 735af24fea0ff117061d52082e7b65f1a4d759b7 /lib/Serialization/ASTReader.cpp | |
parent | 173a37a57b79bd8f94b85c2273039e760b159922 (diff) |
Eliminate obvious use-after-free. Fixes PR12433 / <rdar://problem/11168333>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 9436bfb50b..840fa13282 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3898,9 +3898,9 @@ QualType ASTReader::readTypeRecord(unsigned Index) { ExceptionSpecificationType EST = static_cast<ExceptionSpecificationType>(Record[Idx++]); EPI.ExceptionSpecType = EST; + SmallVector<QualType, 2> Exceptions; if (EST == EST_Dynamic) { EPI.NumExceptions = Record[Idx++]; - SmallVector<QualType, 2> Exceptions; for (unsigned I = 0; I != EPI.NumExceptions; ++I) Exceptions.push_back(readType(*Loc.F, Record, Idx)); EPI.Exceptions = Exceptions.data(); |