error-limit.c 454 B

123456789101112131415
  1. // RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
  2. // error and note emitted
  3. struct s1{};
  4. struct s1{};
  5. // error and note suppressed by error-limit
  6. struct s2{};
  7. struct s2{};
  8. // CHECK: 5:8: error: redefinition of 's1'
  9. // CHECK: 4:8: note: previous definition is here
  10. // CHECK: fatal error: too many errors emitted, stopping now
  11. // CHECK-NOT: 9:8: error: redefinition of 's2'
  12. // CHECK-NOT: 8:8: note: previous definition is here