blob: 025f65cb35a5498d73a32cf303f01e36de374d7b [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Eli Friedman54ecfce2008-06-11 06:20:39 +00002
Chris Lattner5f4a6822008-11-23 23:12:31 +00003typedef const int x; // expected-note {{previous definition is here}}
Douglas Gregorcda9c672009-02-16 17:45:42 +00004extern x a;
Chris Lattner99cb9972008-07-25 18:44:27 +00005typedef int x; // expected-error {{typedef redefinition with different types}}
Douglas Gregorcda9c672009-02-16 17:45:42 +00006extern x a;
Chris Lattner99cb9972008-07-25 18:44:27 +00007
Douglas Gregorcda9c672009-02-16 17:45:42 +00008// <rdar://problem/6097585>
9int y; // expected-note 2 {{previous definition is here}}
10float y; // expected-error{{redefinition of 'y' with a different type}}
11double y; // expected-error{{redefinition of 'y' with a different type}}