diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-02 21:05:53 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-02 21:05:53 +0000 |
| commit | dba351df64e1a3b03506ae611e0a009baed0b8df (patch) | |
| tree | 86513dcdc5db41e99ac5eda620a98bd6b1440e59 /clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp | |
| parent | 8e7cb6dcfa1b6fe62097b5abd25611c99bdbcd6e (diff) | |
| download | bcm5719-llvm-dba351df64e1a3b03506ae611e0a009baed0b8df.tar.gz bcm5719-llvm-dba351df64e1a3b03506ae611e0a009baed0b8df.zip | |
Fixes an assertion violation when bind to temporary
expression is a dependent expression.
// rdar: // 8620524 and PR7851
llvm-svn: 118066
Diffstat (limited to 'clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp b/clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp new file mode 100644 index 00000000000..cc1ce866fe2 --- /dev/null +++ b/clang/test/CodeGenCXX/template-dependent-bind-temporary.cpp @@ -0,0 +1,24 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s +// rdar: //8620524 +// PR7851 +struct string { + string (const string& ); + string (); + ~string(); +}; + +string operator + (char ch, const string&); + +template <class T> +void IntToString(T a) +{ + string result; + T digit; + char((digit < 10 ? '0' : 'a') + digit) + result; +} + +int main() { +// CHECK: define linkonce_odr void @_Z11IntToStringIcEvT_( + IntToString('a'); +} + |

