diff options
author | John McCall <rjmccall@apple.com> | 2010-12-14 16:45:57 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-14 16:45:57 +0000 |
commit | ed72e292c9a0322b7ac920053f4c6a0efefd39e5 (patch) | |
tree | 39c8215485054dc71126fa2f3f2287c1c0afcb67 /clang/lib | |
parent | e34793e96078da5905b0042530e0c8fce8e56fe3 (diff) | |
download | bcm5719-llvm-ed72e292c9a0322b7ac920053f4c6a0efefd39e5.tar.gz bcm5719-llvm-ed72e292c9a0322b7ac920053f4c6a0efefd39e5.zip |
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.
llvm-svn: 121770
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 2a75ff0b340..04440ef9a5d 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/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(); } |