[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (PR #91955)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 05:56:17 PDT 2024


https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/91955

>From 3afeccb1a2e86fd868c0c0a13a505e634c04750a Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Mon, 13 May 2024 08:54:36 -0400
Subject: [PATCH] [AST] Replace localUncachedLookup with noload_lookup in
 ASTImporterFixtures

---
 clang/unittests/AST/ASTImporterFixtures.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/clang/unittests/AST/ASTImporterFixtures.cpp b/clang/unittests/AST/ASTImporterFixtures.cpp
index 897b370dd3cdc..e8aaea7a6c5fc 100644
--- a/clang/unittests/AST/ASTImporterFixtures.cpp
+++ b/clang/unittests/AST/ASTImporterFixtures.cpp
@@ -157,11 +157,10 @@ std::tuple<Decl *, Decl *> ASTImporterTestBase::getImportedDecl(
   assert(ImportedII && "Declaration with the given identifier "
                        "should be specified in test!");
   DeclarationName ImportDeclName(ImportedII);
-  SmallVector<NamedDecl *, 1> FoundDecls;
-  FromCtx.getTranslationUnitDecl()->localUncachedLookup(ImportDeclName,
-                                                        FoundDecls);
+  DeclContext::lookup_result FoundDecls =
+      FromCtx.getTranslationUnitDecl()->noload_lookup(ImportDeclName);
 
-  assert(FoundDecls.size() == 1);
+  assert(!FoundDecls.empty());
 
   Decl *Imported =
       FromTU.import(SharedStatePtr, ToAST.get(), FoundDecls.front());



More information about the cfe-commits mailing list