blob: aa3879077f065d30f66a5428348a01e965a9529c [file] [log] [blame]
Richard Smitheefb3d52012-02-10 09:58:53 +00001// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11
2// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s
3
4#ifndef HEADER_INCLUDED
5
6#define HEADER_INCLUDED
Jordan Rose78541c42012-07-11 19:58:23 +00007typedef auto f() -> int;
8typedef int g();
Richard Smitheefb3d52012-02-10 09:58:53 +00009
10#else
11
12typedef void f; // expected-error {{typedef redefinition with different types ('void' vs 'auto () -> int')}}
Jordan Rose78541c42012-07-11 19:58:23 +000013 // expected-note@7 {{here}}
Richard Smitheefb3d52012-02-10 09:58:53 +000014typedef void g; // expected-error {{typedef redefinition with different types ('void' vs 'int ()')}}
Jordan Rose78541c42012-07-11 19:58:23 +000015 // expected-note@8 {{here}}
Richard Smitheefb3d52012-02-10 09:58:53 +000016
17#endif