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