1 // RUN: %clang_cc1 -verify -fsyntax-only %s
3 int x(*g
); // expected-error {{use of undeclared identifier 'g'}}
10 typedef char bool; // expected-error {{redeclaration of C++ built-in type 'bool'}} \
11 // expected-warning {{declaration does not declare anything}}
13 // PR4451 - We should recover well from the typo of '::' as ':' in a2.
20 y
:a a2
; // expected-error {{unexpected ':' in nested name specifier}}
39 return 1 ? P
->x
: P
->y
;
43 class asm_class_test
{
44 void foo() __asm__("baz");
53 void test(struct Type
*P
) {
55 Type
= 1 ? P
->Type
: Type
;
57 Type
= (y
:b
) 4; // expected-error {{unexpected ':' in nested name specifier}}
59 (y
:b
) // expected-error {{unexpected ':' in nested name specifier}}
64 int x
// expected-error {{expected ';' at end of declaration list}}
66 int z
// expected-error {{expected ';' at end of declaration list}}
71 ::new(static_cast<void*>(0)) test5
; // expected-error {{expected unqualified-id}}
81 typedef Class1
<Class2
> Type1
; // expected-error {{cannot combine with previous 'class' declaration specifier}}
84 struct CodeCompleteConsumer
{
87 void CodeCompleteConsumer::() { // expected-error {{xpected unqualified-id}}
93 extern "" // expected-error {{unknown linkage language}}
94 test6a
{ ;// expected-error {{C++ requires a type specifier for all declarations}} \
95 // expected-error {{expected ';' after top level declarator}}