Skip to content

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
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