forked from OSchip/llvm-project
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:
parent
eaf64d5c1e
commit
d9d45838e0
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue