aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-11 21:19:12 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-11 21:19:12 +0000
commit52604ab71a74b8ec481255dfeea7dc9dba63b1a5 (patch)
tree55ff684e046cb16edcf0341bc87cf41b05fc780a /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentbbbcdd9cc06b6078939129330ecc9bda3310984d (diff)
Slight improvement for extern templates, so that an explicit
instantiation definition can follow an explicit instantiation declaration. This is as far as I want to go with extern templates now, but they will still need quite a bit more work to get all of the C++0x semantics right. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index f0597be879..dbb56611ed 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1031,6 +1031,9 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
// Instantiate the function body.
OwningStmtResult Body = SubstStmt(Pattern, TemplateArgs);
+ if (Body.isInvalid())
+ Function->setInvalidDecl();
+
ActOnFinishFunctionBody(DeclPtrTy::make(Function), move(Body),
/*IsInstantiation=*/true);