If we enter parens, colons can become un-sacred, allowing us to emit
a better diagnostic in the second example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91040 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index 3846711..6f3fd39 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -9,7 +9,8 @@
 
 // PR4451 - We should recover well from the typo of '::' as ':' in a2.
 namespace y {
-  struct a { };  
+  struct a { };
+  typedef int b;
 }
 
 y::a a1;
@@ -45,4 +46,9 @@
 void test(struct Type *P) {
   int Type;
   Type = 1 ? P->Type : Type;
+  
+  Type = (y:b) 4;   // expected-error {{unexpected ':' in nested name specifier}}
+  Type = 1 ? (
+              (y:b)  // expected-error {{unexpected ':' in nested name specifier}}
+              4) : 5;
 }
\ No newline at end of file