aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/nullptr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-07 23:24:59 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-07 23:24:59 +0000
commit4ce46c2db2b17ef52b34dbeeec01e448025c8edc (patch)
treea81e646a24fd524ac8df5c9f8678cd835514aa1f /test/CodeGenCXX/nullptr.cpp
parenta1a9f035852e35ed88f4902a855eb952cf08bebb (diff)
Perform overload resolution when static_cast'ing from a
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes PR6072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/nullptr.cpp')
-rw-r--r--test/CodeGenCXX/nullptr.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CodeGenCXX/nullptr.cpp b/test/CodeGenCXX/nullptr.cpp
index 31bd47522e..ab63b432bd 100644
--- a/test/CodeGenCXX/nullptr.cpp
+++ b/test/CodeGenCXX/nullptr.cpp
@@ -1,7 +1,17 @@
-// RUN: %clang_cc1 -std=c++0x %s -emit-llvm -o %t
+// RUN: %clang_cc1 -std=c++0x -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
int* a = nullptr;
void f() {
int* a = nullptr;
}
+
+typedef decltype(nullptr) nullptr_t;
+
+nullptr_t get_nullptr();
+
+struct X { };
+void g() {
+ // CHECK: call i8* @_Z11get_nullptrv()
+ int (X::*pmf)(int) = get_nullptr();
+}