cxx-decl.cpp revision a564b17dcc7daf298ffa72cde94630343bf9c31a
1// RUN: clang-cc -verify -fsyntax-only %s 2 3int x(*g); // expected-error {{use of undeclared identifier 'g'}} 4 5 6// PR4451 - We should recover well from the typo of '::' as ':' in a2. 7namespace y { 8 struct a { }; 9} 10 11y::a a1; 12y:a a2; // expected-error {{unexpected ':' in nested name specifier}} 13y::a a3 = a2; 14 15// Some valid colons: 16void foo() { 17y: // label 18 y::a s; 19 20 int a = 4; 21 a = a ? a : a+1; 22} 23 24struct b : y::a {};