Richard Smith | eefb3d5 | 2012-02-10 09:58:53 +0000 | [diff] [blame] | 1 | // 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 Rose | 78541c4 | 2012-07-11 19:58:23 +0000 | [diff] [blame] | 7 | typedef auto f() -> int; |
| 8 | typedef int g(); |
Richard Smith | eefb3d5 | 2012-02-10 09:58:53 +0000 | [diff] [blame] | 9 | |
| 10 | #else |
| 11 | |
| 12 | typedef void f; // expected-error {{typedef redefinition with different types ('void' vs 'auto () -> int')}} |
Jordan Rose | 78541c4 | 2012-07-11 19:58:23 +0000 | [diff] [blame] | 13 | // expected-note@7 {{here}} |
Richard Smith | eefb3d5 | 2012-02-10 09:58:53 +0000 | [diff] [blame] | 14 | typedef void g; // expected-error {{typedef redefinition with different types ('void' vs 'int ()')}} |
Jordan Rose | 78541c4 | 2012-07-11 19:58:23 +0000 | [diff] [blame] | 15 | // expected-note@8 {{here}} |
Richard Smith | eefb3d5 | 2012-02-10 09:58:53 +0000 | [diff] [blame] | 16 | |
| 17 | #endif |