summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-10 01:59:24 +0000
committerChris Lattner <sabre@nondot.org>2009-12-10 01:59:24 +0000
commit17c3b1f2785e3d2b0344b4da9c18f98efc5d0cef (patch)
tree0a6605c92a14f7f31537c35205b0d2cbad5f98b4 /clang/test/Parser/cxx-decl.cpp
parentfefc7b8e7bdf80b9e02ef002a3a9a7cafa84c121 (diff)
downloadbcm5719-llvm-17c3b1f2785e3d2b0344b4da9c18f98efc5d0cef.tar.gz
bcm5719-llvm-17c3b1f2785e3d2b0344b4da9c18f98efc5d0cef.zip
fix incorrect parsing of bitfields pointed out by Doug. I chose
to use ColonProtectionRAIIObject in the C codepath even though it won't matter for consistency. llvm-svn: 91037
Diffstat (limited to 'clang/test/Parser/cxx-decl.cpp')
-rw-r--r--clang/test/Parser/cxx-decl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp
index 308700e50d6..4453c4c3d0d 100644
--- a/clang/test/Parser/cxx-decl.cpp
+++ b/clang/test/Parser/cxx-decl.cpp
@@ -2,6 +2,8 @@
int x(*g); // expected-error {{use of undeclared identifier 'g'}}
+struct Type { };
+
// PR4451 - We should recover well from the typo of '::' as ':' in a2.
namespace y {
@@ -31,3 +33,10 @@ class someclass {
return 1 ? P->x : P->y;
}
};
+
+enum { fooenum = 1 };
+
+struct a {
+ int Type : fooenum;
+};
+
OpenPOWER on IntegriCloud