зеркало из https://github.com/microsoft/clang-1.git
Whoops. Don't fall through into the overload case when mangling a
dependent call expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
3d27b107c5
Коммит
6f615bc52b
|
@ -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" }
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче