Eugene.Zelenko added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:18 +#include "clang/Tooling/Transformer/Stencil.h" +#include <cassert> + ---------------- asserts are not used. ================ Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:35 +llvm::Optional<transformer::RewriteRule> +MakeRule(const LangOptions &LangOpts, + const ClangTidyCheck::OptionsView &Options) { ---------------- Please use static instead of anonymous namespace for functions. ================ Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:38 + // Only support C++. + if (!LangOpts.CPlusPlus) + return llvm::None; ---------------- This belongs to isLanguageVersionSupported(). ================ Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h:16 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include <memory> +#include <string> ---------------- STL containers are not used in header. ================ Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.h:32 + StringFindStrContainsCheck(StringRef Name, ClangTidyContext *Context); +}; + ---------------- storeOptions() is missing. ================ Comment at: clang-tools-extra/docs/ReleaseNotes.rst:78 ^^^^^^^^^^ +- New :doc:`abseil-string-find-str-contains + <clang-tidy/checks/abseil-string-find-str-contains>` check. ---------------- Please separate with empty line. ================ Comment at: clang-tools-extra/docs/ReleaseNotes.rst:81 + + Finds string.find(...) == npos comparisons and suggests replacing with + absl::StrContains. ---------------- Please synchronize with first statement in documentation. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:15 - `abseil-duration-addition <abseil-duration-addition.html>`_, "Yes" - `abseil-duration-comparison <abseil-duration-comparison.html>`_, "Yes" - `abseil-duration-conversion-cast <abseil-duration-conversion-cast.html>`_, "Yes" - `abseil-duration-division <abseil-duration-division.html>`_, "Yes" - `abseil-duration-factory-float <abseil-duration-factory-float.html>`_, "Yes" - `abseil-duration-factory-scale <abseil-duration-factory-scale.html>`_, "Yes" - `abseil-duration-subtraction <abseil-duration-subtraction.html>`_, "Yes" - `abseil-duration-unnecessary-conversion <abseil-duration-unnecessary-conversion.html>`_, "Yes" - `abseil-faster-strsplit-delimiter <abseil-faster-strsplit-delimiter.html>`_, "Yes" + `abseil-duration-addition <abseil-duration-addition.html>`_, + `abseil-duration-comparison <abseil-duration-comparison.html>`_, ---------------- Unrelated and incorrect changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80023/new/ https://reviews.llvm.org/D80023 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits