forked from OSchip/llvm-project
PR5909 had a test case for binding of const, non-volatile references
to bitfields. Add it here. llvm-svn: 94832
This commit is contained in:
parent
d1e08648c6
commit
aa6050b0e2
|
@ -0,0 +1,12 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
|
||||
namespace PR5909 {
|
||||
struct Foo {
|
||||
int x : 20;
|
||||
};
|
||||
|
||||
bool Test(const int& foo);
|
||||
|
||||
const Foo f = { 0 }; // It compiles without the 'const'.
|
||||
bool z = Test(f.x);
|
||||
}
|
Loading…
Reference in New Issue