[libcxx-commits] [libcxx] [libc++] Add a utility for checking the output of commands (PR #65917)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 13 07:59:49 PDT 2023


================
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: has-clang-tidy
+
+// RUN: %{clang-tidy} %s -header-filter=.* --checks='-*,libcpp-cpp-version-check' --load=%{test-tools}/clang_tidy_checks/libcxx-tidy.plugin -- %{compile_flags} -fno-modules 2>&1 | %{check-output}
+
+#include <__config>
+
+// CHECK: warning: _LIBCPP_STD_VER >= version should be used instead of _LIBCPP_STD_VER > prev_version
----------------
EricWF wrote:

When we decide on this?  This seems like the wrong choice.

We don't know the name of the next C++ version nor its year before it actually exists. So saying "> LAST_VERSION" seems more correct.



https://github.com/llvm/llvm-project/pull/65917


More information about the libcxx-commits mailing list