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