typedef-redef.c revision d7d5f0223bd30dfd618762349c6209dd1d5ea3e6
1// RUN: clang-cc -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