================ @@ -0,0 +1,110 @@ +//===--- UseSpanFirstLastCheck.cpp - clang-tidy-----------------*- 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 +// +//===----------------------------------------------------------------------===// + +#include "UseSpanFirstLastCheck.h" +#include "clang/AST/ASTContext.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Lex/Lexer.h" + +using namespace clang::ast_matchers; + +namespace clang::tidy::readability { + +void UseSpanFirstLastCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus20) + return; ---------------- 5chmidti wrote:
This should be done in `isLanguageVersionSupported` instead: https://github.com/llvm/llvm-project/blob/a8a494faab8af60754c4647dbb7b24bc86a80aab/clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h#L26-L28 https://github.com/llvm/llvm-project/pull/118074 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits