diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/SemaCXX/decltype.cpp | |
parent | a0482fa4e7fa27b01184f938097f0666b78016dd (diff) |
Diffstat (limited to 'test/SemaCXX/decltype.cpp')
-rw-r--r-- | test/SemaCXX/decltype.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/decltype.cpp b/test/SemaCXX/decltype.cpp new file mode 100644 index 0000000000000..d4ef7e33a1d1a --- /dev/null +++ b/test/SemaCXX/decltype.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s + +// PR5290 +int const f0(); +void f0_test() { + decltype(0, f0()) i = 0; + i = 0; +} + +struct A { int a[1]; A() { } }; +typedef A const AC; +int &f1(int*); +float &f2(int const*); + +void test_f2() { + float &fr = f2(AC().a); +} + |