xref: /aosp_15_r20/external/clang/test/Misc/error-limit.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
2 
3 // error and note emitted
4 struct s1{};
5 struct s1{};
6 
7 // error and note suppressed by error-limit
8 struct s2{};
9 struct s2{};
10 
11 // CHECK: 5:8: error: redefinition of 's1'
12 // CHECK: 4:8: note: previous definition is here
13 // CHECK: fatal error: too many errors emitted, stopping now
14 // CHECK-NOT: 9:8: error: redefinition of 's2'
15 // CHECK-NOT: 8:8: note: previous definition is here
16