diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-07-08 18:37:38 +0000 | 
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-07-08 18:37:38 +0000 | 
| commit | 9961ce9428a935c33541936e019fc1e810b8c09f (patch) | |
| tree | 7c779e661144d4da031256ce69841686907d06f7 /clang/lib/Sema/SemaExpr.cpp | |
| parent | 246549c50b6e2db6da277c607c3bfcb862a134ef (diff) | |
| download | bcm5719-llvm-9961ce9428a935c33541936e019fc1e810b8c09f.tar.gz bcm5719-llvm-9961ce9428a935c33541936e019fc1e810b8c09f.zip | |
When performing substitution of template arguments within the body of
a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.
llvm-svn: 107895
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 93cec73d038..66369674f25 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3317,9 +3317,10 @@ Sema::OwningExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,        MultiLevelTemplateArgumentList ArgList          = getTemplateInstantiationArgs(FD, 0, /*RelativeToPrimary=*/true); -      InstantiatingTemplate Inst(*this, CallLoc, Param, -                                 ArgList.getInnermost().getFlatArgumentList(), -                                 ArgList.getInnermost().flat_size()); +      std::pair<const TemplateArgument *, unsigned> Innermost  +        = ArgList.getInnermost(); +      InstantiatingTemplate Inst(*this, CallLoc, Param, Innermost.first, +                                 Innermost.second);        OwningExprResult Result = SubstExpr(UninstExpr, ArgList);        if (Result.isInvalid()) | 

