1 // RUN: %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s 2 3 // error and three notes emitted 4 void foo(int); 5 void foo(double); 6 void foo(int, int); 7 8 int main() 9 { 10 foo(); 11 } 12 13 // error and note suppressed by error-limit 14 struct s1{}; 15 struct s1{}; 16 17 // CHECK: 10:5: error: no matching function for call to 'foo' 18 // CHECK: 6:6: note: candidate function not viable: requires 2 arguments, but 0 were provided 19 // CHECK: 5:6: note: candidate function not viable: requires 1 argument, but 0 were provided 20 // CHECK: 4:6: note: candidate function not viable: requires 1 argument, but 0 were provided 21 // CHECK: fatal error: too many errors emitted, stopping now 22 // CHECK-NOT: 15:8: error: redefinition of 's1' 23 // CHECK-NOT: 14:8: note: previous definition is here 24