Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Misc / error-limit.c
blobe4ce7aab42e8db06e4d3b50e34017482b3962113
1 // RUN: not %clang_cc1 -ferror-limit 1 -fsyntax-only %s 2>&1 | FileCheck %s
3 // error and note emitted
4 struct s1{};
5 struct s1{};
7 // error and note suppressed by error-limit
8 struct s2{};
9 struct s2{};
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