mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 02:00:03 +08:00
Whoops. Don't fall through into the overload case when mangling a
dependent call expression. llvm-svn: 111300
This commit is contained in:
@@ -1546,8 +1546,8 @@ void CXXNameMangler::mangleIntegerLiteral(QualType T,
|
||||
|
||||
void CXXNameMangler::mangleCalledExpression(const Expr *E, unsigned Arity) {
|
||||
if (E->getType() != getASTContext().OverloadTy)
|
||||
mangleExpression(E);
|
||||
// propagate arity to dependent overloads?
|
||||
return mangleExpression(E);
|
||||
// FIXME: propagate arity to dependent overloads?
|
||||
|
||||
llvm::PointerIntPair<OverloadExpr*,1> R
|
||||
= OverloadExpr::find(const_cast<Expr*>(E));
|
||||
|
||||
@@ -540,3 +540,20 @@ namespace test16 {
|
||||
static union { struct { union {}; }; };
|
||||
static union { struct { struct {}; }; };
|
||||
}
|
||||
|
||||
// rdar://problem/8302148
|
||||
namespace test17 {
|
||||
template <int N> struct A {};
|
||||
|
||||
struct B {
|
||||
static int foo(void);
|
||||
};
|
||||
|
||||
template <class T> A<sizeof(T::foo())> func(void);
|
||||
|
||||
// CHECK: define i32 @_ZN6test174testEv()
|
||||
// CHECK: call {{.*}} @_ZN6test174funcINS_1BEEENS_1AIXszclsrT_3fooEEEEv()
|
||||
int test() {
|
||||
func<B>(); // { dg-error "sorry, unimplemented" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user