// RUN: %clang_cc1 -fsyntax-only -verify %s
//
// This file contains typo correction tests which hit different code paths in C
// than in C++ and may exhibit different behavior as a result.
var; // expected-error-re {{use of undeclared identifier 'invalid'{{$}}}}
void
a = b ? : 0; // expected-warning {{type specifier missing, defaults to 'int'}} \
// expected-error {{use of undeclared identifier 'b'}}
int foobar; // expected-note {{'foobar' declared here}}
new_a = goobar ?: 4; // expected-warning {{type specifier missing, defaults to 'int'}} \
// expected-error {{use of undeclared identifier 'goobar'; did you mean 'foobar'?}} \
// expected-error {{initializer element is not a compile-time constant}}
;
void
void ; // expected-note {{'banana' declared here}}
int
typedef long long __m128i ;
int
void
extern double ;
void
extern long ;
void
int d = X ? d : L; // expected-error 2 {{use of undeclared identifier}}
int // expected-error 4 {{use of undeclared identifier}}
int // expected-error 2 {{use of undeclared identifier}}
void
// Two typos in a parenthesized expression or argument list with a conditional
// expression caused a crash in C mode.
//
// r272587 fixed a similar bug for binary operations. The same fix was needed for
// conditional expressions.
int
int
void ;
void ;
void
// rdar://problem/38642201
;
void ;
void
void ;
void ;
void
void
void
void