tools/clang/lib/Sema/SemaHLSL.cpp
/// <summary>Creates a Typedef in the specified ASTContext.</summary>
Creates a Typedef in the specified ASTContext.
Creates a Typedef in the specified ASTContext .
static
TypedefDecl *CreateGlobalTypedef(ASTContext* context, const char* ident, QualType baseType)
{
  DXASSERT_NOMSG(context != nullptr);
  DXASSERT_NOMSG(ident != nullptr);
  DXASSERT_NOMSG(!baseType.isNull());
  DeclContext* declContext = context->getTranslationUnitDecl();
  TypeSourceInfo* typeSource = context->getTrivialTypeSourceInfo(baseType);
  TypedefDecl* decl = TypedefDecl::Create(*context, declContext, NoLoc, NoLoc, &context->Idents.get(ident), typeSource);
  declContext->addDecl(decl);
  decl->setImplicit(true);
  return decl;
}
static TypedefDecl * CreateGlobalTypedef ( ASTContext * context , const char * ident , QualType baseType ) { DXASSERT_NOMSG ( context != nullptr ) ; DXASSERT_NOMSG ( ident != nullptr ) ; DXASSERT_NOMSG ( ! baseType . isNull ( ) ) ; DeclContext * declContext = context -> getTranslationUnitDecl ( ) ; TypeSourceInfo * typeSource = context -> getTrivialTypeSourceInfo ( baseType ) ; TypedefDecl * decl = TypedefDecl :: Create ( * context , declContext , NoLoc , NoLoc , & context -> Idents . get ( ident ) , typeSource ) ; declContext -> addDecl ( decl ) ; decl -> setImplicit ( true ) ; return decl ; }
<summary>Creates a Typedef in the specified ASTContext.</summary>
<summary > Creates a Typedef in the specified ASTContext . < / summary >