aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-14 16:45:57 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-14 16:45:57 +0000
commit373920bd733b1d28fe7bf209945a62eb9248d948 (patch)
treef344c1a2b2214aafa8bb03b05b4be4d4a4819652 /lib/Sema/SemaType.cpp
parentd3b227dda90272b0076720077314250e3b222667 (diff)
Improve some comments, shrink FunctionType::ExtInfo, and fix a bug found
by valgrind where we were doing the wrong thing in the presence of invalid exception specs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 2a75ff0b34..04440ef9a5 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1327,7 +1327,6 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
if (FTI.hasExceptionSpec) {
EPI.HasExceptionSpec = FTI.hasExceptionSpec;
EPI.HasAnyExceptionSpec = FTI.hasAnyExceptionSpec;
- EPI.NumExceptions = FTI.NumExceptions;
Exceptions.reserve(FTI.NumExceptions);
for (unsigned ei = 0, ee = FTI.NumExceptions; ei != ee; ++ei) {
// FIXME: Preserve type source info.
@@ -1337,6 +1336,7 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
if (!CheckSpecifiedExceptionType(ET, FTI.Exceptions[ei].Range))
Exceptions.push_back(ET);
}
+ EPI.NumExceptions = Exceptions.size();
EPI.Exceptions = Exceptions.data();
}