1925213b0SRafael Espindola // RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
214208800SDouglas Gregor
314208800SDouglas Gregor // error and three notes emitted
414208800SDouglas Gregor void foo(int);
514208800SDouglas Gregor void foo(double);
614208800SDouglas Gregor void foo(int, int);
7*b96b3be8SKaelyn Takata void foo(int, int, int, int);
814208800SDouglas Gregor
main()914208800SDouglas Gregor int main()
1014208800SDouglas Gregor {
11*b96b3be8SKaelyn Takata foo(1, 2, 3);
1214208800SDouglas Gregor }
1314208800SDouglas Gregor
1414208800SDouglas Gregor // error and note suppressed by error-limit
1514208800SDouglas Gregor struct s1{};
1614208800SDouglas Gregor struct s1{};
1714208800SDouglas Gregor
18*b96b3be8SKaelyn Takata // CHECK: 11:5: error: no matching function for call to 'foo'
19*b96b3be8SKaelyn Takata // CHECK: 6:6: note: candidate function not viable: requires 2 arguments, but 3 were provided
20*b96b3be8SKaelyn Takata // CHECK: 7:6: note: candidate function not viable: requires 4 arguments, but 3 were provided
21*b96b3be8SKaelyn Takata // CHECK: 5:6: note: candidate function not viable: requires 1 argument, but 3 were provided
22*b96b3be8SKaelyn Takata // CHECK: 4:6: note: candidate function not viable: requires 1 argument, but 3 were provided
2314208800SDouglas Gregor // CHECK: fatal error: too many errors emitted, stopping now
24*b96b3be8SKaelyn Takata // CHECK-NOT: 16:8: error: redefinition of 's1'
25*b96b3be8SKaelyn Takata // CHECK-NOT: 15:8: note: previous definition is here
26