blob: d6962f1cd1709928b7f550ccd438843f6a0c70cf [file] [log] [blame]
Eli Friedman54ecfce2008-06-11 06:20:39 +00001// RUN: clang < %s -fsyntax-only -verify
2
Chris Lattner99cb9972008-07-25 18:44:27 +00003// size_t coming from a system header.
Eli Friedman54ecfce2008-06-11 06:20:39 +00004#include <stddef.h>
Chris Lattner99cb9972008-07-25 18:44:27 +00005typedef __SIZE_TYPE__ size_t;
6
7
8
Chris Lattner5f4a6822008-11-23 23:12:31 +00009typedef const int x; // expected-note {{previous definition is here}}
Douglas Gregor6037fcb2009-01-09 19:42:16 +000010extern x a; // expected-note {{previous definition is here}}
Chris Lattner99cb9972008-07-25 18:44:27 +000011typedef int x; // expected-error {{typedef redefinition with different types}}
Douglas Gregor6037fcb2009-01-09 19:42:16 +000012extern x a; // expected-error{{redefinition of 'a' with a different type}}
Chris Lattner99cb9972008-07-25 18:44:27 +000013