Path: blob/main/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp
39654 views
//===-- ClangDeclVendor.cpp -----------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "Plugins/ExpressionParser/Clang/ClangDeclVendor.h"9#include "Plugins/ExpressionParser/Clang/ClangUtil.h"10#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"1112#include "lldb/Utility/ConstString.h"1314using namespace lldb_private;1516uint32_t ClangDeclVendor::FindDecls(ConstString name, bool append,17uint32_t max_matches,18std::vector<clang::NamedDecl *> &decls) {19if (!append)20decls.clear();2122std::vector<CompilerDecl> compiler_decls;23uint32_t ret = FindDecls(name, /*append*/ false, max_matches, compiler_decls);24for (CompilerDecl compiler_decl : compiler_decls) {25clang::Decl *d = ClangUtil::GetDecl(compiler_decl);26clang::NamedDecl *nd = llvm::cast<clang::NamedDecl>(d);27decls.push_back(nd);28}29return ret;30}313233