Lines Matching refs:AST
45 ASTContext &AST = S.getASTContext(); in BuiltinTypeDeclBuilder() local
46 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in BuiltinTypeDeclBuilder()
65 Record = CXXRecordDecl::Create(AST, TagDecl::TagKind::Class, HLSLNamespace, in BuiltinTypeDeclBuilder()
73 Record->addAttr(FinalAttr::CreateImplicit(AST, SourceRange(), in BuiltinTypeDeclBuilder()
89 ASTContext &AST = Record->getASTContext(); in addMemberVariable() local
91 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in addMemberVariable()
93 AST.getTrivialTypeSourceInfo(Type, SourceLocation()); in addMemberVariable()
95 AST, Record, SourceLocation(), SourceLocation(), &II, Type, MemTySource, in addMemberVariable()
127 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction()
130 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in lookupBuiltinFunction()
139 return DeclRefExpr::Create(AST, NestedNameSpecifierLoc(), SourceLocation(), in lookupBuiltinFunction()
143 static Expr *emitResourceClassExpr(ASTContext &AST, ResourceClass RC) { in emitResourceClassExpr()
145 AST, in emitResourceClassExpr()
146 llvm::APInt(AST.getIntWidth(AST.UnsignedCharTy), in emitResourceClassExpr()
148 AST.UnsignedCharTy, SourceLocation()); in emitResourceClassExpr()
155 ASTContext &AST = Record->getASTContext(); in addDefaultHandleConstructor() local
158 AST.getFunctionType(AST.VoidTy, {}, FunctionProtoType::ExtProtoInfo()); in addDefaultHandleConstructor()
161 DeclarationName Name = AST.DeclarationNames.getCXXConstructorName(CanTy); in addDefaultHandleConstructor()
163 AST, Record, SourceLocation(), in addDefaultHandleConstructor()
165 AST.getTrivialTypeSourceInfo(ConstructorType, SourceLocation()), in addDefaultHandleConstructor()
170 lookupBuiltinFunction(AST, S, "__builtin_hlsl_create_handle"); in addDefaultHandleConstructor()
172 Expr *RCExpr = emitResourceClassExpr(AST, RC); in addDefaultHandleConstructor()
173 Expr *Call = CallExpr::Create(AST, Fn, {RCExpr}, AST.VoidPtrTy, VK_PRValue, in addDefaultHandleConstructor()
177 AST, SourceLocation(), Constructor->getFunctionObjectParameterType(), in addDefaultHandleConstructor()
179 Expr *Handle = MemberExpr::CreateImplicit(AST, This, false, Fields["h"], in addDefaultHandleConstructor()
185 if (Handle->getType().getCanonicalType() != AST.VoidPtrTy) { in addDefaultHandleConstructor()
187 AST, Handle->getType(), VK_PRValue, CK_Dependent, Call, nullptr, in addDefaultHandleConstructor()
188 AST.getTrivialTypeSourceInfo(Handle->getType(), SourceLocation()), in addDefaultHandleConstructor()
194 AST, Handle, Call, BO_Assign, Handle->getType(), VK_LValue, OK_Ordinary, in addDefaultHandleConstructor()
198 CompoundStmt::Create(AST, {Assign}, FPOptionsOverride(), in addDefaultHandleConstructor()
220 ASTContext &AST = Record->getASTContext(); in addArraySubscriptOperator() local
222 assert(Handle->getType().getCanonicalType() != AST.VoidPtrTy && in addArraySubscriptOperator()
233 ReturnTy = AST.getLValueReferenceType(ReturnTy); in addArraySubscriptOperator()
240 AST.getFunctionType(ReturnTy, {AST.UnsignedIntTy}, ExtInfo); in addArraySubscriptOperator()
241 auto *TSInfo = AST.getTrivialTypeSourceInfo(MethodTy, SourceLocation()); in addArraySubscriptOperator()
243 AST, Record, SourceLocation(), in addArraySubscriptOperator()
245 AST.DeclarationNames.getCXXOperatorName(OO_Subscript), in addArraySubscriptOperator()
250 IdentifierInfo &II = AST.Idents.get("Idx", tok::TokenKind::identifier); in addArraySubscriptOperator()
252 AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), in addArraySubscriptOperator()
253 &II, AST.UnsignedIntTy, in addArraySubscriptOperator()
254 AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()), in addArraySubscriptOperator()
263 CXXThisExpr::Create(AST, SourceLocation(), in addArraySubscriptOperator()
266 AST, This, false, Handle, Handle->getType(), VK_LValue, OK_Ordinary); in addArraySubscriptOperator()
269 AST, NestedNameSpecifierLoc(), SourceLocation(), IdxParam, false, in addArraySubscriptOperator()
271 AST.UnsignedIntTy, VK_PRValue); in addArraySubscriptOperator()
274 new (AST) ArraySubscriptExpr(HandleAccess, IndexExpr, ElemTy, VK_LValue, in addArraySubscriptOperator()
277 auto *Return = ReturnStmt::Create(AST, SourceLocation(), Array, nullptr); in addArraySubscriptOperator()
279 MethodDecl->setBody(CompoundStmt::Create(AST, {Return}, FPOptionsOverride(), in addArraySubscriptOperator()
285 AST, SourceRange(), AlwaysInlineAttr::CXX11_clang_always_inline)); in addArraySubscriptOperator()
314 ASTContext * member
318 : Builder(RB), AST(RB.Record->getASTContext()) {} in TemplateParameterListBuilder()
328 AST, Builder.Record->getDeclContext(), SourceLocation(), in addTypeParameter()
330 &AST.Idents.get(Name, tok::TokenKind::identifier), /* Typename */ false, in addTypeParameter()
333 Decl->setDefaultArgument(AST.getTrivialTypeSourceInfo(DefaultValue)); in addTypeParameter()
343 TemplateParameterList::Create(AST, SourceLocation(), SourceLocation(), in finalizeTemplateArgs()
346 AST, Builder.Record->getDeclContext(), SourceLocation(), in finalizeTemplateArgs()
359 T = AST.getInjectedClassNameType(Builder.Record, T); in finalizeTemplateArgs()
382 ASTContext &AST = SemaPtr->getASTContext(); in InitializeSema() local
384 if (AST.getTranslationUnitDecl()->hasExternalLexicalStorage()) in InitializeSema()
385 (void)AST.getTranslationUnitDecl()->decls_begin(); in InitializeSema()
387 IdentifierInfo &HLSL = AST.Idents.get("hlsl", tok::TokenKind::identifier); in InitializeSema()
390 if (S.LookupQualifiedName(Result, AST.getTranslationUnitDecl())) in InitializeSema()
393 AST, AST.getTranslationUnitDecl(), /*Inline=*/false, SourceLocation(), in InitializeSema()
397 AST.getTranslationUnitDecl()->addDecl(HLSLNamespace); in InitializeSema()
411 AST, AST.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), in InitializeSema()
413 AST.getTranslationUnitDecl()); in InitializeSema()
415 AST.getTranslationUnitDecl()->addDecl(UsingDecl); in InitializeSema()
419 ASTContext &AST = SemaPtr->getASTContext(); in defineHLSLVectorAlias() local
424 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 0, in defineHLSLVectorAlias()
425 &AST.Idents.get("element", tok::TokenKind::identifier), false, false); in defineHLSLVectorAlias()
426 TypeParam->setDefaultArgument(AST.getTrivialTypeSourceInfo(AST.FloatTy)); in defineHLSLVectorAlias()
431 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 1, in defineHLSLVectorAlias()
432 &AST.Idents.get("element_count", tok::TokenKind::identifier), AST.IntTy, in defineHLSLVectorAlias()
433 false, AST.getTrivialTypeSourceInfo(AST.IntTy)); in defineHLSLVectorAlias()
435 IntegerLiteral::Create(AST, llvm::APInt(AST.getIntWidth(AST.IntTy), 4), in defineHLSLVectorAlias()
436 AST.IntTy, SourceLocation()); in defineHLSLVectorAlias()
441 TemplateParameterList::Create(AST, SourceLocation(), SourceLocation(), in defineHLSLVectorAlias()
444 IdentifierInfo &II = AST.Idents.get("vector", tok::TokenKind::identifier); in defineHLSLVectorAlias()
446 QualType AliasType = AST.getDependentSizedExtVectorType( in defineHLSLVectorAlias()
447 AST.getTemplateTypeParmType(0, 0, false, TypeParam), in defineHLSLVectorAlias()
449 AST, NestedNameSpecifierLoc(), SourceLocation(), SizeParam, false, in defineHLSLVectorAlias()
451 AST.IntTy, VK_LValue), in defineHLSLVectorAlias()
454 auto *Record = TypeAliasDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()
456 AST.getTrivialTypeSourceInfo(AliasType)); in defineHLSLVectorAlias()
460 TypeAliasTemplateDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()