diff options
Diffstat (limited to 'clang/test/CodeGenCXX/2004-06-08-LateTemplateInstantiation.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/2004-06-08-LateTemplateInstantiation.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2004-06-08-LateTemplateInstantiation.cpp b/clang/test/CodeGenCXX/2004-06-08-LateTemplateInstantiation.cpp new file mode 100644 index 0000000..97254c1 --- /dev/null +++ b/clang/test/CodeGenCXX/2004-06-08-LateTemplateInstantiation.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - + + +template<typename Ty> +struct normal_iterator { + int FIELD; +}; + +void foo(normal_iterator<int>); +normal_iterator<int> baz(); + +void bar() { + foo(baz()); +} + +void *bar2() { + return (void*)foo; +} |