summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-05-30 20:24:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-05-30 20:24:10 +0000
commit2600c63d968f9f58751a8bcdd6d48e08b55e7649 (patch)
tree44a3175b176a2289217f68a6eda673de6d1751db /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent936d50aeea856fde070ba17571e48e9713047550 (diff)
downloadbcm5719-llvm-2600c63d968f9f58751a8bcdd6d48e08b55e7649.tar.gz
bcm5719-llvm-2600c63d968f9f58751a8bcdd6d48e08b55e7649.zip
PR34520: after instantiating a non-templated member deduction guide, don't forget to push it into the class scope.
llvm-svn: 333589
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index cd80215d044..dd62d4c98f3 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -2833,7 +2833,10 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D) {
Decl *
TemplateDeclInstantiator::VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D) {
- return VisitFunctionDecl(D, nullptr);
+ Decl *Inst = VisitFunctionDecl(D, nullptr);
+ if (Inst && !D->getDescribedFunctionTemplate())
+ Owner->addDecl(Inst);
+ return Inst;
}
Decl *TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D) {
OpenPOWER on IntegriCloud