diff options
author | John McCall <rjmccall@apple.com> | 2010-08-17 21:51:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-17 21:51:21 +0000 |
commit | 6f615bc52bd5513019c32b378834a3c1b8425bf8 (patch) | |
tree | d43b2a5e1af7a0705f93cf884f14faa0db38148b | |
parent | 3d27b107c515ab1a8fd47b33c41adcf5a65f465b (diff) |
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
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 7bdbabc8c0..969670a28d 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -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)); diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 4152dabc0b..6636c926ae 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -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" } + } +} |