Add test case for PR5290; this bug was fixed with the non-class rvalue

de-cv-qualification fixes.

llvm-svn: 108437
This commit is contained in:
Douglas Gregor 2010-07-15 18:35:15 +00:00
parent eaf64d5c1e
commit d9d45838e0
1 changed files with 18 additions and 0 deletions

View File

@ -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; // expected-warning{{expression result unused}}
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);
}