diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-01-31 07:24:03 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-01-31 07:24:03 +0000 |
commit | b7de181d912690958e82c01f1b3d752d3d4ab43b (patch) | |
tree | a63c4e2c927bea252bb4eba9fdce313396b041dd /lib/AST/DeclTemplate.cpp | |
parent | 548028b3ca15926c6883357e111b47bbc56a4761 (diff) |
Fix PR6156 and test several of the basic aspects of non-type template arguments
when implicitly supplied to the injected class name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 75b3975322..d80db45f45 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -213,7 +213,8 @@ QualType ClassTemplateDecl::getInjectedClassNameType(ASTContext &Context) { TemplateArgs.push_back(TemplateArgument(ParamType)); } else if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*Param)) { - Expr *E = new (Context) DeclRefExpr(NTTP, NTTP->getType(), + Expr *E = new (Context) DeclRefExpr(NTTP, + NTTP->getType().getNonReferenceType(), NTTP->getLocation()); TemplateArgs.push_back(TemplateArgument(E)); } else { |