diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index fd28f2b6ee..fcff0b8ea0 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -8200,8 +8200,10 @@ void Sema::ActOnFields(Scope* S, const CXXDestructorDecl *Dtor = DelayedDestructorExceptionSpecChecks.back().first; if (Dtor->getParent() == Record) { - CheckOverridingFunctionExceptionSpec(Dtor, - DelayedDestructorExceptionSpecChecks.back().second); + // Don't check if we're a template. The spec hasn't been adjusted. + if (!Dtor->getParent()->isDependentType()) + CheckOverridingFunctionExceptionSpec(Dtor, + DelayedDestructorExceptionSpecChecks.back().second); DelayedDestructorExceptionSpecChecks.pop_back(); } } |