xref: /llvm-project/clang/test/Misc/error-limit.c (revision 925213b0fa3f9bbbe949326bb89a8d774c05994b)
1*925213b0SRafael Espindola // RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
214208800SDouglas Gregor 
314208800SDouglas Gregor // error and note emitted
414208800SDouglas Gregor struct s1{};
514208800SDouglas Gregor struct s1{};
614208800SDouglas Gregor 
714208800SDouglas Gregor // error and note suppressed by error-limit
814208800SDouglas Gregor struct s2{};
914208800SDouglas Gregor struct s2{};
1014208800SDouglas Gregor 
1114208800SDouglas Gregor // CHECK: 5:8: error: redefinition of 's1'
1214208800SDouglas Gregor // CHECK: 4:8: note: previous definition is here
1314208800SDouglas Gregor // CHECK: fatal error: too many errors emitted, stopping now
1414208800SDouglas Gregor // CHECK-NOT: 9:8: error: redefinition of 's2'
1514208800SDouglas Gregor // CHECK-NOT: 8:8: note: previous definition is here
16