summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-19 00:08:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-19 00:08:28 +0000
commitd372942d77540ccca7b5c222b3a69da2e37f6498 (patch)
tree73478f10dcedf61fee5d08ffe84416d16e02dd32 /clang/lib/Sema/SemaExpr.cpp
parent925a6d08c5d405c5fb0d7198b3fee4a8c18a8f07 (diff)
downloadbcm5719-llvm-d372942d77540ccca7b5c222b3a69da2e37f6498.tar.gz
bcm5719-llvm-d372942d77540ccca7b5c222b3a69da2e37f6498.zip
PR 12586: Fix assert while running libc++ testsuite: deal with exception
specifications on member function templates of class templates and other such nested beasties. Store the function template from which we are to instantiate an exception specification rather than trying to deduce it. Plus some additional test cases. llvm-svn: 155076
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 669ba3ad376..d2e0e6b63b4 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9776,9 +9776,8 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func) {
// Instantiate the exception specification for any function which is
// used: CodeGen will need it.
- if (Func->getTemplateInstantiationPattern() &&
- Func->getType()->castAs<FunctionProtoType>()->getExceptionSpecType()
- == EST_Uninstantiated)
+ const FunctionProtoType *FPT = Func->getType()->getAs<FunctionProtoType>();
+ if (FPT && FPT->getExceptionSpecType() == EST_Uninstantiated)
InstantiateExceptionSpec(Loc, Func);
// Implicit instantiation of function templates and member functions of
OpenPOWER on IntegriCloud