diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-24 18:51:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-24 18:51:59 +0000 |
commit | 5132655e4296b780672e9a96b46a740135073534 (patch) | |
tree | 9cba5cd370a40ac31bb48146ed45bdce94e47343 /test/CodeGenCXX/temporaries.cpp | |
parent | 0c94c029331f56fd086024950cebd30620148e55 (diff) |
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
expressions (e.g., for template instantiation), just transform the
subexpressions and return those, since the temporary-related nodes
will be implicitly regenerated. Fixes PR5867, but I said that
before...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/temporaries.cpp')
-rw-r--r-- | test/CodeGenCXX/temporaries.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp index 3fd7cfec78..611781886b 100644 --- a/test/CodeGenCXX/temporaries.cpp +++ b/test/CodeGenCXX/temporaries.cpp @@ -234,4 +234,18 @@ namespace PR5867 { // CHECK-NEXT: ret void (f)(S(), 0); } + + // CHECK: define linkonce_odr void @_ZN6PR58672g2IiEEvT_ + template<typename T> + void g2(T) { + // CHECK: call void @_ZN6PR58671SC1Ev + // CHECK-NEXT: call void @_ZN6PR58671fENS_1SEi + // CHECK-NEXT: call void @_ZN6PR58671SD1Ev + // CHECK-NEXT: ret void + (f)(S(), 0); + } + + void h() { + g2(17); + } } |