Skip to content

Commit

Permalink
[test] Test -Werror=foo -Wfoo & -Werror -Wno-error=foo -Wfoo
Browse files Browse the repository at this point in the history
Clang now matches GCC in the two cases.

D109981 fixed the second case though it did not call out the effect.
  • Loading branch information
MaskRay committed Apr 16, 2022
1 parent 847c398 commit 468c7b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/test/Misc/diag-mapping2.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

// -Werror can map this one warning to error.
// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error: foo"
// RUN: not %clang_cc1 %s -Werror=#warnings -W#warnings 2>&1 | grep "error: foo"

// -Wno-error= overrides -Werror. rdar://3158301
// -Wno-error= overrides -Werror. -Wno-error applies to a subsequent warning of the same name.
// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning: foo"
// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings -W#warnings 2>&1 | grep "warning: foo"

// -Wno-error overrides -Werror. PR4715
// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning: foo"
Expand Down

0 comments on commit 468c7b6

Please sign in to comment.