[clang-tools-extra] [clang-tidy][NFC] Prefer `llvm::split` over `StringRef::split` (PR #174129)

via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 31 21:51:01 PST 2025


================
@@ -18,9 +18,8 @@ namespace clang::tidy::android {
 ComparisonInTempFailureRetryCheck::ComparisonInTempFailureRetryCheck(
     StringRef Name, ClangTidyContext *Context)
     : ClangTidyCheck(Name, Context),
-      RawRetryList(Options.get("RetryMacros", "TEMP_FAILURE_RETRY")) {
-  RawRetryList.split(RetryMacros, ",", -1, false);
-}
+      RawRetryList(Options.get("RetryMacros", "TEMP_FAILURE_RETRY")),
+      RetryMacros(llvm::split(RawRetryList, ',')) {}
----------------
zeyi2 wrote:

I'm not sure about the behaviour of this: I think the original implementation filters out empty strings while the current `llvm:split` keeps them? So maybe it's not a 100% NFC?

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


More information about the cfe-commits mailing list