summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
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
commit244b96ba0a047185ae82f5dc8903ea0756b18b9f (patch)
tree299e3aba7c8d303dd6e37c294f40334af268e756 /clang/test/Parser
parent17c3b1f2785e3d2b0344b4da9c18f98efc5d0cef (diff)
downloadbcm5719-llvm-244b96ba0a047185ae82f5dc8903ea0756b18b9f.tar.gz
bcm5719-llvm-244b96ba0a047185ae82f5dc8903ea0756b18b9f.zip
fix a more evil case of : / :: confusion arising in ?:.
llvm-svn: 91039
Diffstat (limited to 'clang/test/Parser')
-rw-r--r--clang/test/Parser/cxx-decl.cpp8
1 files changed, 7 insertions, 1 deletions
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
OpenPOWER on IntegriCloud