1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// XFAIL: *
10
11// Make sure that even a simple unused variable warning is treated as an
12// error in the test suite. This is to make sure the test suite always runs
13// with -Werror.
14
15// ADDITIONAL_COMPILE_FLAGS: -Wunused-variable
16
17// TODO: We don't enable -Werror on GCC right now, because too many tests fail.
18// UNSUPPORTED: gcc
19
20int main(int, char**) {
21 int foo;
22}
23

source code of libcxx/test/selftest/pass.cpp/werror.pass.cpp