Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 1 | // Test this without pch. |
Argyrios Kyrtzidis | eea742b | 2010-10-18 19:20:05 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -include %s -fsyntax-only -verify %s |
Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 3 | |
| 4 | // Test with pch. |
Argyrios Kyrtzidis | eea742b | 2010-10-18 19:20:05 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -emit-pch -o %t %s |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 6 | // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s |
Argyrios Kyrtzidis | eea742b | 2010-10-18 19:20:05 +0000 | [diff] [blame] | 7 | |
| 8 | #ifndef HEADER |
| 9 | #define HEADER |
| 10 | |
Jordan Rose | 78541c4 | 2012-07-11 19:58:23 +0000 | [diff] [blame] | 11 | int f(int) __attribute__((visibility("default"), overloadable)); |
Argyrios Kyrtzidis | eea742b | 2010-10-18 19:20:05 +0000 | [diff] [blame] | 12 | |
| 13 | #else |
| 14 | |
Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 15 | double f(double); // expected-error{{overloadable}} |
Jordan Rose | 78541c4 | 2012-07-11 19:58:23 +0000 | [diff] [blame] | 16 | // expected-note@11{{previous overload}} |
Argyrios Kyrtzidis | eea742b | 2010-10-18 19:20:05 +0000 | [diff] [blame] | 17 | |
| 18 | #endif |