diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-07 23:24:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-07 23:24:59 +0000 |
commit | c934bc840cb483a56da06bd9dbeff8bab32af84d (patch) | |
tree | f604c180949233d6f503fedc5c4bc88d98cad2aa /clang/test/CodeGenCXX/nullptr.cpp | |
parent | 1ce52caf0dfd18b8a2e04eddd9e381136ac81c21 (diff) | |
download | bcm5719-llvm-c934bc840cb483a56da06bd9dbeff8bab32af84d.tar.gz bcm5719-llvm-c934bc840cb483a56da06bd9dbeff8bab32af84d.zip |
Perform overload resolution when static_cast'ing from a
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.
llvm-svn: 97923
Diffstat (limited to 'clang/test/CodeGenCXX/nullptr.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/nullptr.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/nullptr.cpp b/clang/test/CodeGenCXX/nullptr.cpp index 31bd47522ed..ab63b432bdf 100644 --- a/clang/test/CodeGenCXX/nullptr.cpp +++ b/clang/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(); +} |