// Test that -Wsystem-headers works with default and custom mappings like -Werror.
// Keep run lines at the bottom for line number stability.
int // Use the old-style-cast warning as an arbitrary "ordinary" diagnostic for the purpose of testing.
// expected-warning@9 {{"custom message"}}
// expected-warning@7 {{use of old-style cast}}
// expected-warning@9 {{"custom message"}}
// expected-error@7 {{use of old-style cast}}
// expected-error@9 {{"custom message"}}
// expected-error@7 {{use of old-style cast}}
// expected-warning@9 {{"custom message"}}
// RUN: %clang_cc1 -verify -fsyntax-only -DA %s
// RUN: %clang_cc1 -verify -fsyntax-only -DB -Wold-style-cast %s
// RUN: %clang_cc1 -verify -fsyntax-only -DC -Wold-style-cast -Wsystem-headers %s
// RUN: %clang_cc1 -verify -fsyntax-only -DD -Wold-style-cast -Wsystem-headers -Werror %s
// RUN: %clang_cc1 -verify -fsyntax-only -DE -Wold-style-cast -Wsystem-headers -Werror=old-style-cast %s