summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-08-20 21:03:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-08-20 21:03:30 +0000
commit6aa46a19c56750e17f7acedc47d95111fd2dcd5d (patch)
treee34ae427575758352981df5376a2975e2dbcd403 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentffe56ea4c355b82c6fdbed4befc7fe3b956e35a2 (diff)
Notes
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index abe912fb548b..6fee23aa8bc1 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -3771,6 +3771,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
if (PatternDef) {
Pattern = PatternDef->getBody(PatternDef);
PatternDecl = PatternDef;
+ if (PatternDef->willHaveBody())
+ PatternDef = nullptr;
}
// FIXME: We need to track the instantiation stack in order to know which