diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-29 19:42:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-29 19:42:41 +0000 |
commit | e14654b3b749421e21a4d917cdbcaf5589c0c6c3 (patch) | |
tree | 41ef0a3871a4d74045f5feb695722a357693d3ec | |
parent | ef06e2451c3069569ba543e7b1c5e0de7a257005 (diff) |
PR5909 had a test case for binding of const, non-volatile references
to bitfields. Add it here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94832 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp new file mode 100644 index 0000000000..cf529098df --- /dev/null +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp @@ -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); +} |