Skip to content

[AST] Use llvm::none_of (NFC) #141447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 26, 2025
@llvmbot
Copy link
Member

llvmbot commented May 26, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/141447.diff

1 Files Affected:

  • (modified) clang/unittests/AST/ASTImporterFixtures.cpp (+2-3)
diff --git a/clang/unittests/AST/ASTImporterFixtures.cpp b/clang/unittests/AST/ASTImporterFixtures.cpp
index 897b370dd3cdc..e4e5a078262c3 100644
--- a/clang/unittests/AST/ASTImporterFixtures.cpp
+++ b/clang/unittests/AST/ASTImporterFixtures.cpp
@@ -173,9 +173,8 @@ std::tuple<Decl *, Decl *> ASTImporterTestBase::getImportedDecl(
 TranslationUnitDecl *ASTImporterTestBase::getTuDecl(StringRef SrcCode,
                                                     TestLanguage Lang,
                                                     StringRef FileName) {
-  assert(llvm::find_if(FromTUs, [FileName](const TU &E) {
-           return E.FileName == FileName;
-         }) == FromTUs.end());
+  assert(llvm::none_of(
+      FromTUs, [FileName](const TU &E) { return E.FileName == FileName; }));
 
   std::vector<std::string> Args = getCommandLineArgsForLanguage(Lang);
   FromTUs.emplace_back(SrcCode, FileName, Args, Creator, ODRHandling);

@kazutakahirata kazutakahirata merged commit fe83587 into llvm:main May 26, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250525_llvm_none_of_clang branch May 26, 2025 16:24
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants