Louis Dionne 2fd7d364cd [libc++] Make the verify-support feature implicit
Tests that require support for Clang-verify are already marked as such
explicitly by their extension, which is .verify.cpp. Requiring the use
of an explicit Lit feature is, after thought, not really helpful.

This is a change in design: we have been bitten in the past by tests not
being enabled when we thought they were. However, the issue was mostly
with file extensions being ignored. The fix for that is not to blindly
require explicit features all the time, but instead to report all files
that are in the suite but that don't match any known test format. This
can be implemented in a follow-up patch.
2020-04-30 11:47:12 -04:00

29 lines
783 B
C++

// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// <iterator>
// <iterator>
// template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;
// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
#include <vector>
#include <iterator>
#include "test_macros.h"
int main(int, char**)
{
int c[5];
std::empty(c); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
return 0;
}