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 | 6a37784a35eb0214f018c2746e41d33936dca479 (patch) | |
| tree | 4ff16ec647ac0fcdbe395000323f862b4d566d22 /clang/lib/Serialization/ASTReader.cpp | |
| parent | 7e5b4c932850a0cf28c6439b6f3045eb53e47a5c (diff) | |
| download | bcm5719-llvm-6a37784a35eb0214f018c2746e41d33936dca479.tar.gz bcm5719-llvm-6a37784a35eb0214f018c2746e41d33936dca479.zip | |
Eliminate obvious use-after-free. Fixes PR12433 / <rdar://problem/11168333>.
llvm-svn: 153982
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 9436bfb50bd..840fa132828 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/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(); |

