aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/selftest/sh.cpp/werror.sh.cpp
blob: 3188f57ec8fd169bdd1e6490fc2ca9cec5ef6057 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// XFAIL: *

// Make sure that even a simple unused variable warning is treated as an
// error in the test suite, including in .sh.cpp tests.

// TODO: We don't enable -Werror on GCC right now, because too many tests fail.
// UNSUPPORTED: gcc

// RUN: %{build} -Wunused-variable
// RUN: %{run}

int main(int, char**) {
    int foo;
    return 0;
}