commit | 1967cd8ca24225c1010d31f258e517a4e113820c | [log] [tgz] |
---|---|---|
author | Douglas Gregor <doug.gregor@gmail.com> | Fri May 15 20:47:12 2009 +0000 |
committer | Douglas Gregor <doug.gregor@gmail.com> | Fri May 15 20:47:12 2009 +0000 |
tree | 9bd914ac217d2ba3e12ac83bce52b23b6f5f7b01 | |
parent | c10357dff31d7acfd4be986958629d05f91993d9 [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); }