tools/clang/lib/AST/ASTContextHLSL.cpp
/// <summary>Adds a handle field to the specified record.</summary>
Adds a handle field to the specified record.
Adds a handle field to the specified record .
static 
void AddHLSLHandleField(ASTContext& context, DeclContext* recordDecl, QualType handleQualType)
{
  IdentifierInfo& handleId = context.Idents.get(StringRef("h"), tok::TokenKind::identifier);
  TypeSourceInfo* fieldTypeSource = context.getTrivialTypeSourceInfo(handleQualType, NoLoc);
  const bool MutableFalse = false;
  const InClassInitStyle initStyle = InClassInitStyle::ICIS_NoInit;
  FieldDecl* handleDecl = FieldDecl::Create(
    context, recordDecl, NoLoc, NoLoc, &handleId, handleQualType, fieldTypeSource, nullptr, MutableFalse, initStyle);
  handleDecl->setAccess(AccessSpecifier::AS_private);
  handleDecl->setImplicit(true); 
  recordDecl->addDecl(handleDecl);
}
static void AddHLSLHandleField ( ASTContext & context , DeclContext * recordDecl , QualType handleQualType ) { IdentifierInfo & handleId = context . Idents . get ( StringRef ( " " ) , tok :: TokenKind :: identifier ) ; TypeSourceInfo * fieldTypeSource = context . getTrivialTypeSourceInfo ( handleQualType , NoLoc ) ; const bool MutableFalse = false ; const InClassInitStyle initStyle = InClassInitStyle :: ICIS_NoInit ; FieldDecl * handleDecl = FieldDecl :: Create ( context , recordDecl , NoLoc , NoLoc , & handleId , handleQualType , fieldTypeSource , nullptr , MutableFalse , initStyle ) ; handleDecl -> setAccess ( AccessSpecifier :: AS_private ) ; handleDecl -> setImplicit ( true ) ; recordDecl -> addDecl ( handleDecl ) ; }
<summary>Adds a handle field to the specified record.</summary>
<summary > Adds a handle field to the specified record . < / summary >