aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-01-20 06:52:44 +0000
committerAnders Carlsson <andersca@mac.com>2011-01-20 06:52:44 +0000
commit9eefa229dfb71400a6bbee326420a7f0e2e91f1f (patch)
treeda97557c1464d0accc5ec9432fc7001c264acb52 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent3ffe183448af7c543a208dd3313a49c83a3ad53e (diff)
When instantiating member functions, propagate whether the member function is marked 'final' and 'override'.
Also, call CheckOverrideControl when instantiating member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index fd7325cc01..36a1900299 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1393,8 +1393,12 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,
if (D->isPure())
SemaRef.CheckPureMethod(Method, SourceRange());
+ Method->setIsMarkedOverride(D->isMarkedOverride());
+ Method->setIsMarkedFinal(D->isMarkedFinal());
Method->setAccess(D->getAccess());
+ SemaRef.CheckOverrideControl(Method);
+
if (FunctionTemplate) {
// If there's a function template, let our caller handle it.
} else if (Method->isInvalidDecl() && !Previous.empty()) {