blob: 6a4b8f667cbc8c2fd3750423c6c4bf2bc764b5bf [file] [log] [blame]
Douglas Gregor68a2eb02009-04-15 21:30:51 +00001// Test this without pch.
Argyrios Kyrtzidiseea742b2010-10-18 19:20:05 +00002// RUN: %clang_cc1 -include %s -fsyntax-only -verify %s
Douglas Gregor68a2eb02009-04-15 21:30:51 +00003
4// Test with pch.
Argyrios Kyrtzidiseea742b2010-10-18 19:20:05 +00005// RUN: %clang_cc1 -emit-pch -o %t %s
Daniel Dunbara5728872009-12-15 20:14:24 +00006// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
Argyrios Kyrtzidiseea742b2010-10-18 19:20:05 +00007
8#ifndef HEADER
9#define HEADER
10
Jordan Rose78541c42012-07-11 19:58:23 +000011int f(int) __attribute__((visibility("default"), overloadable));
Argyrios Kyrtzidiseea742b2010-10-18 19:20:05 +000012
13#else
14
Douglas Gregor68a2eb02009-04-15 21:30:51 +000015double f(double); // expected-error{{overloadable}}
Jordan Rose78541c42012-07-11 19:58:23 +000016 // expected-note@11{{previous overload}}
Argyrios Kyrtzidiseea742b2010-10-18 19:20:05 +000017
18#endif