aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-10 02:02:58 +0000
committerChris Lattner <sabre@nondot.org>2009-12-10 02:02:58 +0000
commita69d0ed3ab66e96393586664a103e9482ec59e6f (patch)
tree47ab91a1be563cfb87569934482a6a8b4fdb17ba /test/Parser/cxx-decl.cpp
parenta1efc8c8c6460d860d6509b05b341e77ed9bfe87 (diff)
fix a more evil case of : / :: confusion arising in ?:.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-decl.cpp')
-rw-r--r--test/Parser/cxx-decl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index 4453c4c3d0..38467117b3 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -2,7 +2,9 @@
int x(*g); // expected-error {{use of undeclared identifier 'g'}}
-struct Type { };
+struct Type {
+ int Type;
+};
// PR4451 - We should recover well from the typo of '::' as ':' in a2.
@@ -40,3 +42,7 @@ struct a {
int Type : fooenum;
};
+void test(struct Type *P) {
+ int Type;
+ Type = 1 ? P->Type : Type;
+} \ No newline at end of file