From 11d2b2d2bb706fca0656f2760839721bb7f6cb6f Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Fri, 2 Apr 2010 08:55:10 +0000 Subject: Update clang to r100181. --- test/CodeGenCXX/constructor-init.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/CodeGenCXX/constructor-init.cpp') diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp index a0a35fa16f1b..284b8b5938f9 100644 --- a/test/CodeGenCXX/constructor-init.cpp +++ b/test/CodeGenCXX/constructor-init.cpp @@ -80,3 +80,24 @@ void f() { // CHECK-NOT: call void @_ZN1AIsED1Ev // CHECK: ret void } + +template +struct X { + X(const X &); + + T *start; + T *end; +}; + +template struct X; + +// Make sure that the instantiated constructor initializes start and +// end properly. +// CHECK: define linkonce_odr void @_ZN1XIiEC2ERKS0_ +// CHECK: {{store.*null}} +// CHECK: {{store.*null}} +// CHECK: ret +template +X::X(const X &other) : start(0), end(0) { } + +X get_X(X x) { return x; } -- cgit v1.3