diff options
author | dim <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-06 18:36:24 +0000 |
commit | 4238dc458ed9a048965af111b979fd51d288f22c (patch) | |
tree | 3d3ed1e1987dbe6444294b1b4e249814b97b97a5 /lib/Sema/SemaExceptionSpec.cpp | |
parent | 6416b56f5a3923c6c264b46365e16718ccabf081 (diff) | |
download | FreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.zip FreeBSD-src-4238dc458ed9a048965af111b979fd51d288f22c.tar.gz |
Import clang 3.7.0 release (r246257).
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r-- | lib/Sema/SemaExceptionSpec.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index 0941870..2cf02b4 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/lib/Sema/SemaExceptionSpec.cpp @@ -161,7 +161,13 @@ Sema::ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT) { else InstantiateExceptionSpec(Loc, SourceDecl); - return SourceDecl->getType()->castAs<FunctionProtoType>(); + const FunctionProtoType *Proto = + SourceDecl->getType()->castAs<FunctionProtoType>(); + if (Proto->getExceptionSpecType() == clang::EST_Unparsed) { + Diag(Loc, diag::err_exception_spec_not_parsed); + Proto = nullptr; + } + return Proto; } void |