aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
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 38467117b3..6f3fd391b9 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -9,7 +9,8 @@ struct Type {
// 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 @@ struct a {
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