error-limit-multiple-notes.cpp 767 B

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