https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/213962
None >From c2595ade9af75d5ecd657c3e7e1a0dd40b9ad7f9 Mon Sep 17 00:00:00 2001 From: Victor Baranov <[email protected]> Date: Tue, 4 Aug 2026 17:32:19 +0300 Subject: [PATCH] [clang-tidy][Docs] write guidline about -or-later suffix --- clang-tools-extra/docs/clang-tidy/Contributing.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/Contributing.rst b/clang-tools-extra/docs/clang-tidy/Contributing.rst index 7c2e1207b91aa..438d57562f00b 100644 --- a/clang-tools-extra/docs/clang-tidy/Contributing.rst +++ b/clang-tools-extra/docs/clang-tidy/Contributing.rst @@ -648,13 +648,17 @@ Here's an example: // CHECK-FIXES-NOT: using a::C;$ The ``-std`` flag controls which C or C++ standard(s) the test is compiled -under. It accepts a comma-separated list of standards and supports an -``-or-later`` suffix: +under. It accepts a comma-separated list of standards and supports +``-or-later`` and ``-or-earlier`` suffixes: - ``-std=c++17``: runs the test **only** with C++17. - ``-std=c++17-or-later``: runs the test once for each standard from C++17 onwards (currently C++17, C++20, C++23, and C++26), in separate invocations. Use this when a check should work correctly on all modern standards. +- ``-std=c++17-or-earlier``: runs the test once for each standard up to and + including C++17 (currently C++98, C++11, C++14, and C++17), in separate + invocations. Use this when a check should work correctly on all older + standards. - ``-std=c++14,c++17``: runs the test once with C++14 and once with C++17. When no ``-std`` is given, ``check_clang_tidy.py`` defaults to _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
