diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-05 22:49:09 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-05 22:49:09 +0000 |
commit | e41ac7b007d64b504f8e79b97839d060a3669171 (patch) | |
tree | bbc353793c5fabe5e7e3b189c771b7f0ca4bee14 /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 8b013bdbf6474ed25d4017635cac851e51163c25 (diff) |
Fix a bogus assertion after adjusting the type of a substituted
non-type template argument for a non-type template parameter of
pointer type. Fixes PR6244.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index ab66ef3dfd..c13b453c26 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -791,7 +791,9 @@ TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr *E) { return SemaRef.ExprError(); RefE = (Expr *)RefExpr.get(); - assert(SemaRef.IsQualificationConversion(RefE->getType(), + assert(SemaRef.Context.hasSameUnqualifiedType(RefE->getType(), + NTTP->getType()) || + SemaRef.IsQualificationConversion(RefE->getType(), NTTP->getType())); } |