diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-29 04:55:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-29 04:55:13 +0000 |
commit | 77e2c67411084c47b1cf511a191b31adf38662ba (patch) | |
tree | 46b698f9be172a1145eb3908e31428f6af99d655 /lib/Sema/SemaTemplate.cpp | |
parent | 3ff9d1110fed519ad81302ecc154814c33a4962b (diff) |
It turns out that we *can* end up having to display template argument
bindings when the template argument is still an expression; it happens
while checking the template arguments of a class template partial
specializations. Fixes PR6964.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 731836b0b1..ad6cc2f4c8 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -5518,8 +5518,15 @@ Sema::getTemplateArgumentBindingsText(const TemplateParameterList *Params, } case TemplateArgument::Expression: { - assert(false && "No expressions in deduced template arguments!"); - Result += "<expression>"; + // FIXME: This is non-optimal, since we're regurgitating the + // expression we were given. + std::string Str; + { + llvm::raw_string_ostream OS(Str); + Args[I].getAsExpr()->printPretty(OS, Context, 0, + Context.PrintingPolicy); + } + Result += Str; break; } |