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);
+}


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to