typedef-redef.c revision cda9c674998aedeb9319e95a0284f4d266dcef32
1// RUN: clang -fsyntax-only -verify %s
2
3// size_t coming from a system header.
4#include <stddef.h>
5typedef __SIZE_TYPE__ size_t;
6
7
8
9typedef const int x; // expected-note {{previous definition is here}}
10extern x a;
11typedef int x;  // expected-error {{typedef redefinition with different types}}
12extern x a;
13
14// <rdar://problem/6097585>
15int y; // expected-note 2 {{previous definition is here}}
16float y; // expected-error{{redefinition of 'y' with a different type}}
17double y; // expected-error{{redefinition of 'y' with a different type}}
18