diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-20 01:03:17 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-20 01:03:17 +0000 |
commit | 145eae52248031baddc00b680ce957cbb5961e2d (patch) | |
tree | 7595a655f7f14ed7200b6457d077811135f22999 /clang/test/CodeGenCXX/references.cpp | |
parent | 9cbf8505062a290ce0352867aa0a0795c5a02da6 (diff) | |
download | bcm5719-llvm-145eae52248031baddc00b680ce957cbb5961e2d.tar.gz bcm5719-llvm-145eae52248031baddc00b680ce957cbb5961e2d.zip |
Add support for binding references to scalar rvalues.
llvm-svn: 72153
Diffstat (limited to 'clang/test/CodeGenCXX/references.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/references.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp index 2b2b1ff8969..a1a6c0ae71a 100644 --- a/clang/test/CodeGenCXX/references.cpp +++ b/clang/test/CodeGenCXX/references.cpp @@ -19,25 +19,32 @@ void t3() { struct C {}; +void f(const bool&); void f(const int&); void f(const _Complex int&); void f(const C&); +void test_bool() { + bool a = true; + f(a); + + f(true); +} + void test_scalar() { int a = 10; - f(a); + + f(10); } void test_complex() { _Complex int a = 10i; - f(a); } void test_aggregate() { C c; - f(c); } |