DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
const bool ignore_using_decls) override;
- bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override;
-
ConstString DeclContextGetName(void *opaque_decl_ctx) override;
ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override;
ConstString GetScopeQualifiedName() const;
- bool IsStructUnionOrClass() const;
-
private:
TypeSystem *m_type_system = nullptr;
void *m_opaque_decl_ctx = nullptr;
DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
const bool ignore_imported_decls);
- virtual bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) = 0;
-
virtual ConstString DeclContextGetName(void *opaque_decl_ctx) = 0;
virtual ConstString
return LLDB_INVALID_DECL_LEVEL;
}
-bool ClangASTContext::DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) {
- if (opaque_decl_ctx)
- return ((clang::DeclContext *)opaque_decl_ctx)->isRecord();
- else
- return false;
-}
-
ConstString ClangASTContext::DeclContextGetName(void *opaque_decl_ctx) {
if (opaque_decl_ctx) {
clang::NamedDecl *named_decl =
return ConstString();
}
-bool CompilerDeclContext::IsStructUnionOrClass() const {
- if (IsValid())
- return m_type_system->DeclContextIsStructUnionOrClass(m_opaque_decl_ctx);
- else
- return false;
-}
-
bool CompilerDeclContext::IsClassMethod(lldb::LanguageType *language_ptr,
bool *is_instance_method_ptr,
ConstString *language_object_name_ptr) {