llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/102720.diff 2 Files Affected: - (modified) clang/lib/Driver/Driver.cpp (+1-1) - (modified) clang/lib/Format/TokenAnnotator.cpp (+1-2) ``````````diff diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 8a5f83edfe081e..f4e909b79389bc 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -148,7 +148,7 @@ static std::optional<llvm::Triple> getHIPOffloadTargetTriple(const Driver &D, const ArgList &Args) { if (!Args.hasArg(options::OPT_offload_EQ)) { auto OffloadArchs = Args.getAllArgValues(options::OPT_offload_arch_EQ); - if (llvm::find(OffloadArchs, "amdgcnspirv") != OffloadArchs.cend()) { + if (llvm::is_contained(OffloadArchs, "amdgcnspirv")) { if (OffloadArchs.size() == 1) return llvm::Triple("spirv64-amd-amdhsa"); // Mixing specific & SPIR-V compilation is not supported for now. diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index e1c9f37c6e8dc2..7529c2e77950c5 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1014,8 +1014,7 @@ class AnnotatingParser { // The case next is colon, it is not a operator of identifier. if (!Tok.Next || Tok.Next->is(tok::colon)) return false; - return std::find(Opes.begin(), Opes.end(), Tok.TokenText.str()) != - Opes.end(); + return llvm::is_contained(Opes, Tok.TokenText.str()); } // SimpleValue6 ::= "(" DagArg [DagArgList] ")" `````````` </details> https://github.com/llvm/llvm-project/pull/102720 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits