Open Quuxplusone opened 7 years ago
Attached vpf5_1CalculatorCode-28317f.sh
(6003 bytes, application/x-shellscript): clang command
Preprocessed cpp is larger than would fit here, so https://transfer.sh/Ia8Im/vpf5_1CalculatorCode-28317f.cpp
Thanks again!
Reduced test-case (repros on trunk):
using DontCare = int;
template <DontCare>
struct Templated {};
template <typename Object, DontCare fn = Object::HashFunction>
struct SubTemplated : Templated<fn> {};
struct Foo {
DontCare HashFunction() const;
static DontCare HashFunction(const Foo &);
};
template <class> struct Baz {
void foo() { SubTemplated<Foo> f; }
};
void run() {
Baz<DontCare> baz;
baz.foo();
}
This trips an assertion: ../../tools/clang/lib/Sema/SemaInit.cpp:6505:
ExprResult clang::InitializationSequence::Perform(clang::Sema &, const
clang::InitializedEntity &, const clang::InitializationKind &, MultiExprArg,
clang::QualType *): Assertion `Kind.getKind() == InitializationKind::
IK_Copy || Kind.isExplicitCast() || Kind.getKind() ==
InitializationKind::IK_DirectList' failed.
vpf5_1CalculatorCode-28317f.sh
(6003 bytes, application/x-shellscript)