diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:55:10 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:55:10 +0000 |
| commit | 11d2b2d2bb706fca0656f2760839721bb7f6cb6f (patch) | |
| tree | d374cdca417e76f1bf101f139dba2db1d10ee8f7 /test/CodeGenCXX/constructor-init.cpp | |
| parent | c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/constructor-init.cpp')
| -rw-r--r-- | test/CodeGenCXX/constructor-init.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp index a0a35fa16f1bd..284b8b5938f94 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<typename T> +struct X { + X(const X &); + + T *start; + T *end; +}; + +template<typename T> 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<typename T> +X<T>::X(const X &other) : start(0), end(0) { } + +X<int> get_X(X<int> x) { return x; } |
