blob: 3ac8053761bf8cee527256c2f3a17c70e4580359 [file] [log] [blame]
Andy Gibbsb42f2002013-04-17 08:06:46 +00001// RUN: rm -rf %t
2// RUN: %clang_cc1 -verify -fmodules -fmodules-cache-path=%t -I %S/Inputs %s
Rafael Espindolac855ce72013-04-04 04:40:17 +00003
4#include "linkage-merge-bar.h"
5
6static int f(int);
7int f(int);
Rafael Espindola5a15b9d2013-04-05 00:52:14 +00008
Andy Gibbsb42f2002013-04-17 08:06:46 +00009static void g(int);
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070010// FIXME: Whether we notice the problem here depends on the order in which we
11// happen to find lookup results for 'g'; LookupResult::resolveKind needs to
12// be taught to prefer a visible result over a non-visible one.
13//
14// expected-error@9 {{functions that differ only in their return type cannot be overloaded}}
Stephen Hines651f13c2014-04-23 16:59:28 -070015// expected-note@Inputs/linkage-merge-foo.h:2 {{previous declaration is here}}