| Andy Gibbs | b42f200 | 2013-04-17 08:06:46 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t | 
|  | 2 | // RUN: %clang_cc1 -verify -fmodules -fmodules-cache-path=%t -I %S/Inputs %s | 
| Rafael Espindola | c855ce7 | 2013-04-04 04:40:17 +0000 | [diff] [blame] | 3 |  | 
|  | 4 | #include "linkage-merge-bar.h" | 
|  | 5 |  | 
|  | 6 | static int f(int); | 
|  | 7 | int f(int); | 
| Rafael Espindola | 5a15b9d | 2013-04-05 00:52:14 +0000 | [diff] [blame] | 8 |  | 
| Andy Gibbs | b42f200 | 2013-04-17 08:06:46 +0000 | [diff] [blame] | 9 | static void g(int); | 
| Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 10 | // 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 Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 15 | // expected-note@Inputs/linkage-merge-foo.h:2 {{previous declaration is here}} |