2012-02-10 17:58:53 +08:00
|
|
|
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11
|
|
|
|
// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s
|
|
|
|
|
|
|
|
#ifndef HEADER_INCLUDED
|
|
|
|
|
|
|
|
#define HEADER_INCLUDED
|
2012-07-12 03:58:23 +08:00
|
|
|
typedef auto f() -> int;
|
|
|
|
typedef int g();
|
2012-02-10 17:58:53 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
typedef void f; // expected-error {{typedef redefinition with different types ('void' vs 'auto () -> int')}}
|
2012-07-12 03:58:23 +08:00
|
|
|
// expected-note@7 {{here}}
|
2012-02-10 17:58:53 +08:00
|
|
|
typedef void g; // expected-error {{typedef redefinition with different types ('void' vs 'int ()')}}
|
2012-07-12 03:58:23 +08:00
|
|
|
// expected-note@8 {{here}}
|
2012-02-10 17:58:53 +08:00
|
|
|
|
|
|
|
#endif
|