PR13022: cope with parenthesized function types in MS name mangling.

llvm-svn: 157959
This commit is contained in:
Richard Smith 2012-06-04 22:46:59 +00:00
parent 47d988c54c
commit 50fba8f0a9
2 changed files with 6 additions and 1 deletions

View File

@ -198,7 +198,7 @@ void MicrosoftCXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD) {
// We should never ever see a FunctionNoProtoType at this point.
// We don't even know how to mangle their types anyway :).
const FunctionProtoType *FT = cast<FunctionProtoType>(FD->getType());
const FunctionProtoType *FT = FD->getType()->castAs<FunctionProtoType>();
bool InStructor = false, InInstMethod = false;
const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD);

View File

@ -116,3 +116,8 @@ void operator_new_delete() {
delete [] array;
// CHECK: @"\01??_V@YAXPAX@Z"
}
// PR13022
void (redundant_parens)();
void redundant_parens_use() { redundant_parens(); }
// CHECK: @"\01?redundant_parens@@YAXXZ"