erik.pilkington added a comment.
Hi Balaji,
I reduced your testcase a bit more, this looks like the can be a crash on
valid. Can you use the more minimal version in the testcase?
template <typename a, int* = nullptr>
struct e {
e(a) {}
};
e c(0);
Also: you should add cfe-commits as a subscriber when creating new phab
revisions. IIRC there was some issue with adding cfe-commits after the fact.
================
Comment at: include/clang/AST/TemplateBase.h:469
+
+ /* When an error occurs in a template value that is defaulted to
+ nullptr then the nullptr is left as-is and this function will
----------------
Please use `//` comments in C++ files!
I think this comment is pretty superfluous though. If a future reader came
across this then they would probably not care too much about the details of
this bug.
================
Comment at: include/clang/AST/TemplateBase.h:474-475
+ and proceeds through. */
+ assert(Argument.getKind() == TemplateArgument::NullPtr ||
+ Argument.getKind() == TemplateArgument::Expression);
}
----------------
I think we should let this constructor work with any non type template
argument. If you agree, could you add the extra cases? (Should just be
TemplateArgument::Declaration and TemplateArgument::Integral)
Repository:
rC Clang
https://reviews.llvm.org/D49766
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits