diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-05-15 20:47:12 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-05-15 20:47:12 +0000 |
| commit | 3f17b47c7e6cfc550cfe02da068ce417e8046ca3 (patch) | |
| tree | 37f90dfc7ac737467ce533d43529fb06bbd69ce2 /clang/lib/Sema/SemaTemplateInstantiateExpr.cpp | |
| parent | 0aa5c4565d822e77c73a815fedf87cd2bc825ec9 (diff) | |
| download | bcm5719-llvm-3f17b47c7e6cfc550cfe02da068ce417e8046ca3.tar.gz bcm5719-llvm-3f17b47c7e6cfc550cfe02da068ce417e8046ca3.zip | |
Allow instantiation of NULL expressions and statements
llvm-svn: 71889
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateExpr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateExpr.cpp b/clang/lib/Sema/SemaTemplateInstantiateExpr.cpp index c2007c6e3b3..08c388efea1 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateExpr.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateExpr.cpp @@ -432,6 +432,9 @@ TemplateExprInstantiator::VisitCXXThisExpr(CXXThisExpr *E) { Sema::OwningExprResult Sema::InstantiateExpr(Expr *E, const TemplateArgumentList &TemplateArgs) { + if (!E) + return Owned((Expr *)0); + TemplateExprInstantiator Instantiator(*this, TemplateArgs); return Instantiator.Visit(E); } |

