From 244b96ba0a047185ae82f5dc8903ea0756b18b9f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 10 Dec 2009 02:02:58 +0000 Subject: fix a more evil case of : / :: confusion arising in ?:. llvm-svn: 91039 --- clang/test/Parser/cxx-decl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'clang/test/Parser') diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp index 4453c4c3d0d..38467117b34 100644 --- a/clang/test/Parser/cxx-decl.cpp +++ b/clang/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 -- cgit v1.2.3