summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-nullptr-arg.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-04-06 22:40:38 +0000
committerDouglas Gregor <dgregor@apple.com>2012-04-06 22:40:38 +0000
commitd2008e2c80d6c9282044ec873a937a17a0f33579 (patch)
treed3e119b536c83e6fd769fa31a3abac02892a2aed /test/CodeGenCXX/mangle-nullptr-arg.cpp
parente35abe1fd3f867ae51d5c68d98578d537eb6beca (diff)
Implement support for null non-type template arguments for non-type
template parameters of pointer, pointer-to-member, or nullptr_t type in C++11. Fixes PR9700 / <rdar://problem/11193097>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-nullptr-arg.cpp')
-rw-r--r--test/CodeGenCXX/mangle-nullptr-arg.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-nullptr-arg.cpp b/test/CodeGenCXX/mangle-nullptr-arg.cpp
new file mode 100644
index 0000000000..393de0b0ec
--- /dev/null
+++ b/test/CodeGenCXX/mangle-nullptr-arg.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+
+template<int *ip> struct IP {};
+
+// CHECK: define void @_Z5test12IPILPi0EE
+void test1(IP<nullptr>) {}
+
+struct X{ };
+template<int X::*pm> struct PM {};
+
+// CHECK: define void @_Z5test22PMILM1Xi0EE
+void test2(PM<nullptr>) { }
+