Open Quuxplusone opened 12 years ago
Bugzilla Link | PR12362 |
Status | NEW |
Importance | P normal |
Reported by | Tobi (freunddeslichts@web.de) |
Reported on | 2012-03-26 17:17:26 -0700 |
Last modified on | 2012-04-08 16:39:52 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | dgregor@apple.com, fang@csl.cornell.edu, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
The alias template is a red herring. The crash can be seen with:
template <typename T2 = T>
struct pt;
//using pt = point<3, T2>;
The problem is that when we process
static int test(const pt<>&)
we try to fill in the default arguments, and in so doing, call SubstType on the
'T' in the default argument (SemaTemplate.cpp:2496), which is template-
parameter-0-0. However, the template arguments for level 0 are <(int)0,
template-parameter-0-0>, so substitution finds '0', and asserts because it's
not a type.