blob: b55ea6dd2dd436b79cc03d7161490fc7193f1f74 [file] [log] [blame]
Douglas Gregor31f55dc2012-04-06 22:40:38 +00001// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
2
3template<int *ip> struct IP {};
4
Stephen Lin43622612013-08-15 06:47:53 +00005// CHECK-LABEL: define void @_Z5test12IPILPi0EE
Douglas Gregor31f55dc2012-04-06 22:40:38 +00006void test1(IP<nullptr>) {}
7
8struct X{ };
9template<int X::*pm> struct PM {};
10
Stephen Lin43622612013-08-15 06:47:53 +000011// CHECK-LABEL: define void @_Z5test22PMILM1Xi0EE
Douglas Gregor31f55dc2012-04-06 22:40:38 +000012void test2(PM<nullptr>) { }
13
Stephen Lin43622612013-08-15 06:47:53 +000014// CHECK-LABEL: define void @_Z5test316DependentTypePtrIPiLS0_0EE
Eli Friedmanb826a002012-09-26 02:36:12 +000015template<typename T, T x> struct DependentTypePtr {};
16void test3(DependentTypePtr<int*,nullptr>) { }