1 //===-- ClangDeclVendor.cpp -----------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "Plugins/ExpressionParser/Clang/ClangDeclVendor.h"
10 #include "Plugins/ExpressionParser/Clang/ClangUtil.h"
11 #include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
13 #include "lldb/Utility/ConstString.h"
15 using namespace lldb_private
;
17 uint32_t ClangDeclVendor::FindDecls(ConstString name
, bool append
,
19 std::vector
<clang::NamedDecl
*> &decls
) {
23 std::vector
<CompilerDecl
> compiler_decls
;
24 uint32_t ret
= FindDecls(name
, /*append*/ false, max_matches
, compiler_decls
);
25 for (CompilerDecl compiler_decl
: compiler_decls
) {
26 clang::Decl
*d
= ClangUtil::GetDecl(compiler_decl
);
27 clang::NamedDecl
*nd
= llvm::cast
<clang::NamedDecl
>(d
);