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::TTK_Class, in BuiltinTypeDeclBuilder()
73 Record->addAttr(FinalAttr::CreateImplicit(AST, SourceRange(), in BuiltinTypeDeclBuilder()
90 ASTContext &AST = Record->getASTContext(); in addMemberVariable() local
92 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in addMemberVariable()
94 AST.getTrivialTypeSourceInfo(Type, SourceLocation()); in addMemberVariable()
96 AST, Record, SourceLocation(), SourceLocation(), &II, Type, MemTySource, in addMemberVariable()
129 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction()
132 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in lookupBuiltinFunction()
141 return DeclRefExpr::Create(AST, NestedNameSpecifierLoc(), SourceLocation(), in lookupBuiltinFunction()
145 static Expr *emitResourceClassExpr(ASTContext &AST, ResourceClass RC) { in emitResourceClassExpr()
147 AST, in emitResourceClassExpr()
148 llvm::APInt(AST.getIntWidth(AST.UnsignedCharTy), in emitResourceClassExpr()
150 AST.UnsignedCharTy, SourceLocation()); in emitResourceClassExpr()
157 ASTContext &AST = Record->getASTContext(); in addDefaultHandleConstructor() local
160 AST.getFunctionType(AST.VoidTy, {}, FunctionProtoType::ExtProtoInfo()); in addDefaultHandleConstructor()
163 DeclarationName Name = AST.DeclarationNames.getCXXConstructorName(CanTy); in addDefaultHandleConstructor()
165 AST, Record, SourceLocation(), in addDefaultHandleConstructor()
167 AST.getTrivialTypeSourceInfo(ConstructorType, SourceLocation()), in addDefaultHandleConstructor()
172 lookupBuiltinFunction(AST, S, "__builtin_hlsl_create_handle"); in addDefaultHandleConstructor()
174 Expr *RCExpr = emitResourceClassExpr(AST, RC); in addDefaultHandleConstructor()
175 Expr *Call = CallExpr::Create(AST, Fn, {RCExpr}, AST.VoidPtrTy, VK_PRValue, in addDefaultHandleConstructor()
178 CXXThisExpr *This = new (AST) CXXThisExpr( in addDefaultHandleConstructor()
182 Expr *Handle = MemberExpr::CreateImplicit(AST, This, false, Fields["h"], in addDefaultHandleConstructor()
188 if (Handle->getType().getCanonicalType() != AST.VoidPtrTy) { in addDefaultHandleConstructor()
190 AST, Handle->getType(), VK_PRValue, CK_Dependent, Call, nullptr, in addDefaultHandleConstructor()
191 AST.getTrivialTypeSourceInfo(Handle->getType(), SourceLocation()), in addDefaultHandleConstructor()
197 AST, Handle, Call, BO_Assign, Handle->getType(), VK_LValue, OK_Ordinary, in addDefaultHandleConstructor()
201 CompoundStmt::Create(AST, {Assign}, FPOptionsOverride(), in addDefaultHandleConstructor()
223 ASTContext &AST = Record->getASTContext(); in addArraySubscriptOperator() local
225 assert(Handle->getType().getCanonicalType() != AST.VoidPtrTy && in addArraySubscriptOperator()
236 ReturnTy = AST.getLValueReferenceType(ReturnTy); in addArraySubscriptOperator()
243 AST.getFunctionType(ReturnTy, {AST.UnsignedIntTy}, ExtInfo); in addArraySubscriptOperator()
244 auto *TSInfo = AST.getTrivialTypeSourceInfo(MethodTy, SourceLocation()); in addArraySubscriptOperator()
246 AST, Record, SourceLocation(), in addArraySubscriptOperator()
248 AST.DeclarationNames.getCXXOperatorName(OO_Subscript), in addArraySubscriptOperator()
253 IdentifierInfo &II = AST.Idents.get("Idx", tok::TokenKind::identifier); in addArraySubscriptOperator()
255 AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), in addArraySubscriptOperator()
256 &II, AST.UnsignedIntTy, in addArraySubscriptOperator()
257 AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()), in addArraySubscriptOperator()
265 auto *This = new (AST) CXXThisExpr( 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(), AttributeCommonInfo::AS_Keyword, in addArraySubscriptOperator()
318 ASTContext * member
322 : Builder(RB), AST(RB.Record->getASTContext()) {} in TemplateParameterListBuilder()
332 AST, Builder.Record->getDeclContext(), SourceLocation(), in addTypeParameter()
334 &AST.Idents.get(Name, tok::TokenKind::identifier), /* Typename */ false, in addTypeParameter()
337 Decl->setDefaultArgument(AST.getTrivialTypeSourceInfo(DefaultValue)); in addTypeParameter()
347 TemplateParameterList::Create(AST, SourceLocation(), SourceLocation(), in finalizeTemplateArgs()
350 AST, Builder.Record->getDeclContext(), SourceLocation(), in finalizeTemplateArgs()
363 T = AST.getInjectedClassNameType(Builder.Record, T); in finalizeTemplateArgs()
378 ASTContext &AST = SemaPtr->getASTContext(); in InitializeSema() local
380 if (AST.getTranslationUnitDecl()->hasExternalLexicalStorage()) in InitializeSema()
381 (void)AST.getTranslationUnitDecl()->decls_begin(); in InitializeSema()
383 IdentifierInfo &HLSL = AST.Idents.get("hlsl", tok::TokenKind::identifier); in InitializeSema()
386 if (S.LookupQualifiedName(Result, AST.getTranslationUnitDecl())) in InitializeSema()
389 AST, AST.getTranslationUnitDecl(), /*Inline=*/false, SourceLocation(), in InitializeSema()
393 AST.getTranslationUnitDecl()->addDecl(HLSLNamespace); in InitializeSema()
407 AST, AST.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), in InitializeSema()
409 AST.getTranslationUnitDecl()); in InitializeSema()
411 AST.getTranslationUnitDecl()->addDecl(UsingDecl); in InitializeSema()
415 ASTContext &AST = SemaPtr->getASTContext(); in defineHLSLVectorAlias() local
420 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 0, in defineHLSLVectorAlias()
421 &AST.Idents.get("element", tok::TokenKind::identifier), false, false); in defineHLSLVectorAlias()
422 TypeParam->setDefaultArgument(AST.getTrivialTypeSourceInfo(AST.FloatTy)); in defineHLSLVectorAlias()
427 AST, HLSLNamespace, SourceLocation(), SourceLocation(), 0, 1, in defineHLSLVectorAlias()
428 &AST.Idents.get("element_count", tok::TokenKind::identifier), AST.IntTy, in defineHLSLVectorAlias()
429 false, AST.getTrivialTypeSourceInfo(AST.IntTy)); in defineHLSLVectorAlias()
431 IntegerLiteral::Create(AST, llvm::APInt(AST.getIntWidth(AST.IntTy), 4), in defineHLSLVectorAlias()
432 AST.IntTy, SourceLocation()); in defineHLSLVectorAlias()
437 TemplateParameterList::Create(AST, SourceLocation(), SourceLocation(), in defineHLSLVectorAlias()
440 IdentifierInfo &II = AST.Idents.get("vector", tok::TokenKind::identifier); in defineHLSLVectorAlias()
442 QualType AliasType = AST.getDependentSizedExtVectorType( in defineHLSLVectorAlias()
443 AST.getTemplateTypeParmType(0, 0, false, TypeParam), in defineHLSLVectorAlias()
445 AST, NestedNameSpecifierLoc(), SourceLocation(), SizeParam, false, in defineHLSLVectorAlias()
447 AST.IntTy, VK_LValue), in defineHLSLVectorAlias()
450 auto *Record = TypeAliasDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()
452 AST.getTrivialTypeSourceInfo(AliasType)); in defineHLSLVectorAlias()
456 TypeAliasTemplateDecl::Create(AST, HLSLNamespace, SourceLocation(), in defineHLSLVectorAlias()