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()
129 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction()
131 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in lookupBuiltinFunction()
144 return DeclRefExpr::Create(AST, NestedNameSpecifierLoc(), SourceLocation(), in lookupBuiltinFunction()
148 static Expr *emitResourceClassExpr(ASTContext &AST, ResourceClass RC) { in emitResourceClassExpr()
150 AST, in emitResourceClassExpr()
151 llvm::APInt(AST.getIntWidth(AST.UnsignedCharTy), in emitResourceClassExpr()
153 AST.UnsignedCharTy, SourceLocation()); in emitResourceClassExpr()
160 ASTContext &AST = Record->getASTContext(); in addDefaultHandleConstructor() local
163 AST.getFunctionType(AST.VoidTy, {}, FunctionProtoType::ExtProtoInfo()); in addDefaultHandleConstructor()
166 DeclarationName Name = AST.DeclarationNames.getCXXConstructorName(CanTy); in addDefaultHandleConstructor()
168 AST, Record, SourceLocation(), in addDefaultHandleConstructor()
170 AST.getTrivialTypeSourceInfo(ConstructorType, SourceLocation()), in addDefaultHandleConstructor()
175 lookupBuiltinFunction(AST, S, "__builtin_hlsl_create_handle"); in addDefaultHandleConstructor()
176 Expr *RCExpr = emitResourceClassExpr(AST, RC); in addDefaultHandleConstructor()
177 Expr *Call = CallExpr::Create(AST, Fn, {RCExpr}, AST.VoidPtrTy, VK_PRValue, in addDefaultHandleConstructor()
181 AST, SourceLocation(), Constructor->getFunctionObjectParameterType(), in addDefaultHandleConstructor()
183 Expr *Handle = MemberExpr::CreateImplicit(AST, This, false, Fields["h"], in addDefaultHandleConstructor()
189 if (Handle->getType().getCanonicalType() != AST.VoidPtrTy) { in addDefaultHandleConstructor()
191 AST, Handle->getType(), VK_PRValue, CK_Dependent, Call, nullptr, in addDefaultHandleConstructor()
192 AST.getTrivialTypeSourceInfo(Handle->getType(), SourceLocation()), in addDefaultHandleConstructor()
198 AST, Handle, Call, BO_Assign, Handle->getType(), VK_LValue, OK_Ordinary, in addDefaultHandleConstructor()
202 CompoundStmt::Create(AST, {Assign}, FPOptionsOverride(), in addDefaultHandleConstructor()
224 ASTContext &AST = Record->getASTContext(); in addArraySubscriptOperator() local
226 assert(Handle->getType().getCanonicalType() != AST.VoidPtrTy && in addArraySubscriptOperator()
237 ReturnTy = AST.getLValueReferenceType(ReturnTy); in addArraySubscriptOperator()
244 AST.getFunctionType(ReturnTy, {AST.UnsignedIntTy}, ExtInfo); in addArraySubscriptOperator()
245 auto *TSInfo = AST.getTrivialTypeSourceInfo(MethodTy, SourceLocation()); in addArraySubscriptOperator()
247 AST, Record, SourceLocation(), in addArraySubscriptOperator()
249 AST.DeclarationNames.getCXXOperatorName(OO_Subscript), in addArraySubscriptOperator()
254 IdentifierInfo &II = AST.Idents.get("Idx", tok::TokenKind::identifier); in addArraySubscriptOperator()
256 AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), in addArraySubscriptOperator()
257 &II, AST.UnsignedIntTy, in addArraySubscriptOperator()
258 AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()), in addArraySubscriptOperator()
267 CXXThisExpr::Create(AST, SourceLocation(), in addArraySubscriptOperator()
270 AST, This, false, Handle, Handle->getType(), VK_LValue, OK_Ordinary); in addArraySubscriptOperator()
273 AST, NestedNameSpecifierLoc(), SourceLocation(), IdxParam, false, in addArraySubscriptOperator()
275 AST.UnsignedIntTy, VK_PRValue); in addArraySubscriptOperator()
278 new (AST) ArraySubscriptExpr(HandleAccess, IndexExpr, ElemTy, VK_LValue, in addArraySubscriptOperator()
281 auto *Return = ReturnStmt::Create(AST, SourceLocation(), Array, nullptr); in addArraySubscriptOperator()
283 MethodDecl->setBody(CompoundStmt::Create(AST, {Return}, FPOptionsOverride(), in addArraySubscriptOperator()
289 AST, SourceRange(), AlwaysInlineAttr::CXX11_clang_always_inline)); in addArraySubscriptOperator()
392 ASTContext &AST = SemaPtr->getASTContext(); in InitializeSema() local
394 if (AST.getTranslationUnitDecl()->hasExternalLexicalStorage()) in InitializeSema()
395 (void)AST.getTranslationUnitDecl()->decls_begin(); in InitializeSema()
397 IdentifierInfo &HLSL = AST.Idents.get("hlsl", tok::TokenKind::identifier); in InitializeSema()
400 if (S.LookupQualifiedName(Result, AST.getTranslationUnitDecl())) in InitializeSema()
403 AST, AST.getTranslationUnitDecl(), /*Inline=*/false, SourceLocation(), in InitializeSema()
407 AST.getTranslationUnitDecl()->addDecl(HLSLNamespace); in InitializeSema()
421 AST, AST.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), in InitializeSema()
423 AST.getTranslationUnitDecl()); in InitializeSema()
425 AST.getTranslationUnitDecl()->addDecl(UsingDecl); in InitializeSema()
429 ASTContext &AST = SemaPtr->getASTContext(); in defineHLSLVectorAlias() local
434 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 0, in defineHLSLVectorAlias()
435 &AST.Idents.get("element", tok::TokenKind::identifier), false, false); in defineHLSLVectorAlias()
437 AST, SemaPtr->getTrivialTemplateArgumentLoc( in defineHLSLVectorAlias()
438 TemplateArgument(AST.FloatTy), QualType(), SourceLocation())); in defineHLSLVectorAlias()
443 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 1, in defineHLSLVectorAlias()
444 &AST.Idents.get("element_count", tok::TokenKind::identifier), AST.IntTy, in defineHLSLVectorAlias()
445 false, AST.getTrivialTypeSourceInfo(AST.IntTy)); in defineHLSLVectorAlias()
446 llvm::APInt Val(AST.getIntWidth(AST.IntTy), 4); in defineHLSLVectorAlias()
447 TemplateArgument Default(AST, llvm::APSInt(std::move(Val)), AST.IntTy, in defineHLSLVectorAlias()
450 AST, SemaPtr->getTrivialTemplateArgumentLoc(Default, AST.IntTy, in defineHLSLVectorAlias()
455 TemplateParameterList::Create(AST, SourceLocation(), SourceLocation(), in defineHLSLVectorAlias()
458 IdentifierInfo &II = AST.Idents.get("vector", tok::TokenKind::identifier); in defineHLSLVectorAlias()
460 QualType AliasType = AST.getDependentSizedExtVectorType( in defineHLSLVectorAlias()
461 AST.getTemplateTypeParmType(0, 0, false, TypeParam), in defineHLSLVectorAlias()
463 AST, NestedNameSpecifierLoc(), SourceLocation(), SizeParam, false, in defineHLSLVectorAlias()
465 AST.IntTy, VK_LValue), in defineHLSLVectorAlias()
468 auto *Record = TypeAliasDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()
470 AST.getTrivialTypeSourceInfo(AliasType)); in defineHLSLVectorAlias()
474 TypeAliasTemplateDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()