commit | 50557a77cfc5c182d450766bf77b1f017305d494 | [log] [tgz] |
---|---|---|
author | Douglas Gregor <dgregor@apple.com> | Fri May 15 20:47:12 2009 +0000 |
committer | Douglas Gregor <dgregor@apple.com> | Fri May 15 20:47:12 2009 +0000 |
tree | 9bd914ac217d2ba3e12ac83bce52b23b6f5f7b01 | |
parent | daf0415583e33d5d279197c65e9227c1ed92474b [diff] [blame] |
Allow instantiation of NULL expressions and statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71889 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateStmt.cpp b/lib/Sema/SemaTemplateInstantiateStmt.cpp index 957402a..2a3f48a 100644 --- a/lib/Sema/SemaTemplateInstantiateStmt.cpp +++ b/lib/Sema/SemaTemplateInstantiateStmt.cpp
@@ -166,6 +166,9 @@ Sema::OwningStmtResult Sema::InstantiateStmt(Stmt *S, const TemplateArgumentList &TemplateArgs) { + if (!S) + return Owned((Stmt *)0); + TemplateStmtInstantiator Instantiator(*this, TemplateArgs); return Instantiator.Visit(S); }