diff options
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 5 | ||||
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index a5b3452796..11bbaae018 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -1015,6 +1015,11 @@ void CXXNameMangler::mangleExpression(const Expr *E) { // ::= <expr-primary> switch (E->getStmtClass()) { default: assert(false && "Unhandled expression kind!"); + + case Expr::ParenExprClass: + mangleExpression(cast<ParenExpr>(E)->getSubExpr()); + break; + case Expr::DeclRefExprClass: { const Decl *D = cast<DeclRefExpr>(E)->getDecl(); diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 2ffbae71da..03e405ecba 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -221,3 +221,9 @@ struct S7 { // CHECK: @"_ZN2S73$_0C1Ev" S7::S7() {} +// PR5063 +template<typename T> typename __enable_if<(__is_scalar<T>::__value), void>::__type ft8() { } +// CHECK: @_Z3ft8IiEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +template void ft8<int>(); +// CHECK: @_Z3ft8IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +template void ft8<void*>(); |