[cfe-commits] r94832 - /cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp
Douglas Gregor
dgregor at apple.com
Fri Jan 29 11:42:41 PST 2010
Author: dgregor
Date: Fri Jan 29 13:42:41 2010
New Revision: 94832
URL: http://llvm.org/viewvc/llvm-project?rev=94832&view=rev
Log:
PR5909 had a test case for binding of const, non-volatile references
to bitfields. Add it here.
Added:
cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp
Added: cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp?rev=94832&view=auto
==============================================================================
--- cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp (added)
+++ cfe/trunk/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp Fri Jan 29 13:42:41 2010
@@ -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);
+}
More information about the cfe-commits
mailing list