aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2012-07-26 13:41:30 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2012-07-26 13:41:30 +0000
commitbae11d8f82378f3b5ffcc994d8b107c9fbec6c4e (patch)
tree0514c8bbc3f3404ce51fc91847990353b8586230
parentf58d01a02533b8d9a5b5653d121a3056d0d939ca (diff)
Remove an outdated comment; add one test to compare function pointer and block mangling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160783 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/MicrosoftMangle.cpp2
-rw-r--r--test/CodeGenCXX/mangle-ms.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp
index f6a1f7d9d9..e2cee7f52c 100644
--- a/lib/AST/MicrosoftMangle.cpp
+++ b/lib/AST/MicrosoftMangle.cpp
@@ -1059,8 +1059,6 @@ void MicrosoftCXXNameMangler::mangleType(const FunctionProtoType *T,
SourceRange) {
// Structors only appear in decls, so at this point we know it's not a
// structor type.
- // I'll probably have mangleType(MemberPointerType) call the mangleType()
- // method directly.
mangleType(T, NULL, false, false);
}
void MicrosoftCXXNameMangler::mangleType(const FunctionNoProtoType *T,
diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp
index ce2293105d..f392c1701e 100644
--- a/test/CodeGenCXX/mangle-ms.cpp
+++ b/test/CodeGenCXX/mangle-ms.cpp
@@ -120,9 +120,13 @@ void delta(int * const a, const long &) {}
void epsilon(int a[][10][20]) {}
// CHECK: @"\01?epsilon@@YAXQAY19BE@H@Z"
-// Blocks mangling (Clang extension).
-void zeta(int (^)(int, int)) {}
-// CHECK: @"\01?zeta@@YAXP_EAHHH@Z@Z"
+void zeta(int (*)(int, int)) {}
+// CHECK: @"\01?zeta@@YAXP6AHHH@Z@Z"
+
+// Blocks mangling (Clang extension). A block should be mangled slightly
+// differently from a similar function pointer.
+void eta(int (^)(int, int)) {}
+// CHECK: @"\01?eta@@YAXP_EAHHH@Z@Z"
void operator_new_delete() {
char *ptr = new char;