decl->setAnonymousStructOrUnion(true);
}
- if (decl) {
- if (metadata)
- SetMetadata(decl, *metadata);
+ if (metadata)
+ SetMetadata(decl, *metadata);
- if (access_type != eAccessNone)
- decl->setAccess(ConvertAccessTypeToAccessSpecifier(access_type));
+ if (access_type != eAccessNone)
+ decl->setAccess(ConvertAccessTypeToAccessSpecifier(access_type));
- if (decl_ctx)
- decl_ctx->addDecl(decl);
+ if (decl_ctx)
+ decl_ctx->addDecl(decl);
- return GetType(ast.getTagDeclType(decl));
- }
- return CompilerType();
+ return GetType(ast.getTagDeclType(decl));
}
namespace {
template_cxx_decl->setDescribedClassTemplate(class_template_decl);
SetOwningModule(class_template_decl, owning_module);
- if (class_template_decl) {
- if (access_type != eAccessNone)
- class_template_decl->setAccess(
- ConvertAccessTypeToAccessSpecifier(access_type));
+ if (access_type != eAccessNone)
+ class_template_decl->setAccess(
+ ConvertAccessTypeToAccessSpecifier(access_type));
- decl_ctx->addDecl(class_template_decl);
+ decl_ctx->addDecl(class_template_decl);
- VerifyDecl(class_template_decl);
- }
+ VerifyDecl(class_template_decl);
return class_template_decl;
}
decl->setImplicit(isInternal);
SetOwningModule(decl, owning_module);
- if (decl && metadata)
+ if (metadata)
SetMetadata(decl, *metadata);
return GetType(ast.getObjCInterfaceType(decl));
? ConstexprSpecKind::Constexpr
: ConstexprSpecKind::Unspecified);
SetOwningModule(func_decl, owning_module);
- if (func_decl)
- decl_ctx->addDecl(func_decl);
+ decl_ctx->addDecl(func_decl);
VerifyDecl(func_decl);
enum_decl->setScopedUsingClassTag(is_scoped);
enum_decl->setFixed(false);
SetOwningModule(enum_decl, owning_module);
- if (enum_decl) {
- if (decl_ctx)
- decl_ctx->addDecl(enum_decl);
+ if (decl_ctx)
+ decl_ctx->addDecl(enum_decl);
- // TODO: check if we should be setting the promotion type too?
- enum_decl->setIntegerType(ClangUtil::GetQualType(integer_clang_type));
+ // TODO: check if we should be setting the promotion type too?
+ enum_decl->setIntegerType(ClangUtil::GetQualType(integer_clang_type));
- enum_decl->setAccess(AS_public); // TODO respect what's in the debug info
+ enum_decl->setAccess(AS_public); // TODO respect what's in the debug info
- return GetType(ast.getTagDeclType(enum_decl));
- }
- return CompilerType();
+ return GetType(ast.getTagDeclType(enum_decl));
}
CompilerType TypeSystemClang::GetIntTypeFromBitSize(size_t bit_size,