diff options
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index f629722793..207edde592 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -778,6 +778,14 @@ void DeclContext::addHiddenDecl(Decl *D) { } else { FirstDecl = LastDecl = D; } + + if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this)) { + Decl *InnerD = D; + if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D)) + InnerD = FunTmpl->getTemplatedDecl(); + if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(InnerD)) + Record->addedConstructor(Constructor); + } } void DeclContext::addDecl(Decl *D) { |