1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc #include <typeinfo> 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc // CHECK: @_ZTIDn = external constant i8* 6*f4a2713aSLionel Sambuc int* a = nullptr; 7*f4a2713aSLionel Sambuc f()8*f4a2713aSLionel Sambucvoid f() { 9*f4a2713aSLionel Sambuc int* a = nullptr; 10*f4a2713aSLionel Sambuc } 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc typedef decltype(nullptr) nullptr_t; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc nullptr_t get_nullptr(); 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc struct X { }; g()17*f4a2713aSLionel Sambucvoid g() { 18*f4a2713aSLionel Sambuc // CHECK: call i8* @_Z11get_nullptrv() 19*f4a2713aSLionel Sambuc int (X::*pmf)(int) = get_nullptr(); 20*f4a2713aSLionel Sambuc } 21*f4a2713aSLionel Sambuc f2()22*f4a2713aSLionel Sambucconst std::type_info& f2() { 23*f4a2713aSLionel Sambuc return typeid(nullptr_t); 24*f4a2713aSLionel Sambuc } 25