Lines Matching +full:- +full:e
1 //===--- ASTWriterStmt.cpp - Statement and Expression Serialization -------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
27 //===----------------------------------------------------------------------===//
29 //===----------------------------------------------------------------------===//
44 /// Record.push_back(a->isSomething());
49 /// Record.push_back(b->isAnother());
97 CurrentPackingBits(this->Record) {} in ASTStmtWriter()
105 "unhandled sub-statement writing AST file"); in Emit()
133 Record.AddSourceLocation(S->getSemiLoc()); in VisitNullStmt()
134 Record.push_back(S->NullStmtBits.HasLeadingEmptyMacro); in VisitNullStmt()
141 Record.push_back(S->size()); in VisitCompoundStmt()
142 Record.push_back(S->hasStoredFPFeatures()); in VisitCompoundStmt()
144 for (auto *CS : S->body()) in VisitCompoundStmt()
146 if (S->hasStoredFPFeatures()) in VisitCompoundStmt()
147 Record.push_back(S->getStoredFPFeatures().getAsOpaqueInt()); in VisitCompoundStmt()
148 Record.AddSourceLocation(S->getLBracLoc()); in VisitCompoundStmt()
149 Record.AddSourceLocation(S->getRBracLoc()); in VisitCompoundStmt()
151 if (!S->hasStoredFPFeatures()) in VisitCompoundStmt()
160 Record.AddSourceLocation(S->getKeywordLoc()); in VisitSwitchCase()
161 Record.AddSourceLocation(S->getColonLoc()); in VisitSwitchCase()
166 Record.push_back(S->caseStmtIsGNURange()); in VisitCaseStmt()
167 Record.AddStmt(S->getLHS()); in VisitCaseStmt()
168 Record.AddStmt(S->getSubStmt()); in VisitCaseStmt()
169 if (S->caseStmtIsGNURange()) { in VisitCaseStmt()
170 Record.AddStmt(S->getRHS()); in VisitCaseStmt()
171 Record.AddSourceLocation(S->getEllipsisLoc()); in VisitCaseStmt()
178 Record.AddStmt(S->getSubStmt()); in VisitDefaultStmt()
184 Record.push_back(S->isSideEntry()); in VisitLabelStmt()
185 Record.AddDeclRef(S->getDecl()); in VisitLabelStmt()
186 Record.AddStmt(S->getSubStmt()); in VisitLabelStmt()
187 Record.AddSourceLocation(S->getIdentLoc()); in VisitLabelStmt()
193 Record.push_back(S->getAttrs().size()); in VisitAttributedStmt()
194 Record.AddAttributes(S->getAttrs()); in VisitAttributedStmt()
195 Record.AddStmt(S->getSubStmt()); in VisitAttributedStmt()
196 Record.AddSourceLocation(S->getAttrLoc()); in VisitAttributedStmt()
203 bool HasElse = S->getElse() != nullptr; in VisitIfStmt()
204 bool HasVar = S->getConditionVariableDeclStmt() != nullptr; in VisitIfStmt()
205 bool HasInit = S->getInit() != nullptr; in VisitIfStmt()
212 Record.push_back(static_cast<uint64_t>(S->getStatementKind())); in VisitIfStmt()
213 Record.AddStmt(S->getCond()); in VisitIfStmt()
214 Record.AddStmt(S->getThen()); in VisitIfStmt()
216 Record.AddStmt(S->getElse()); in VisitIfStmt()
218 Record.AddStmt(S->getConditionVariableDeclStmt()); in VisitIfStmt()
220 Record.AddStmt(S->getInit()); in VisitIfStmt()
222 Record.AddSourceLocation(S->getIfLoc()); in VisitIfStmt()
223 Record.AddSourceLocation(S->getLParenLoc()); in VisitIfStmt()
224 Record.AddSourceLocation(S->getRParenLoc()); in VisitIfStmt()
226 Record.AddSourceLocation(S->getElseLoc()); in VisitIfStmt()
234 bool HasInit = S->getInit() != nullptr; in VisitSwitchStmt()
235 bool HasVar = S->getConditionVariableDeclStmt() != nullptr; in VisitSwitchStmt()
238 Record.push_back(S->isAllEnumCasesCovered()); in VisitSwitchStmt()
240 Record.AddStmt(S->getCond()); in VisitSwitchStmt()
241 Record.AddStmt(S->getBody()); in VisitSwitchStmt()
243 Record.AddStmt(S->getInit()); in VisitSwitchStmt()
245 Record.AddStmt(S->getConditionVariableDeclStmt()); in VisitSwitchStmt()
247 Record.AddSourceLocation(S->getSwitchLoc()); in VisitSwitchStmt()
248 Record.AddSourceLocation(S->getLParenLoc()); in VisitSwitchStmt()
249 Record.AddSourceLocation(S->getRParenLoc()); in VisitSwitchStmt()
251 for (SwitchCase *SC = S->getSwitchCaseList(); SC; in VisitSwitchStmt()
252 SC = SC->getNextSwitchCase()) in VisitSwitchStmt()
260 bool HasVar = S->getConditionVariableDeclStmt() != nullptr; in VisitWhileStmt()
263 Record.AddStmt(S->getCond()); in VisitWhileStmt()
264 Record.AddStmt(S->getBody()); in VisitWhileStmt()
266 Record.AddStmt(S->getConditionVariableDeclStmt()); in VisitWhileStmt()
268 Record.AddSourceLocation(S->getWhileLoc()); in VisitWhileStmt()
269 Record.AddSourceLocation(S->getLParenLoc()); in VisitWhileStmt()
270 Record.AddSourceLocation(S->getRParenLoc()); in VisitWhileStmt()
276 Record.AddStmt(S->getCond()); in VisitDoStmt()
277 Record.AddStmt(S->getBody()); in VisitDoStmt()
278 Record.AddSourceLocation(S->getDoLoc()); in VisitDoStmt()
279 Record.AddSourceLocation(S->getWhileLoc()); in VisitDoStmt()
280 Record.AddSourceLocation(S->getRParenLoc()); in VisitDoStmt()
286 Record.AddStmt(S->getInit()); in VisitForStmt()
287 Record.AddStmt(S->getCond()); in VisitForStmt()
288 Record.AddStmt(S->getConditionVariableDeclStmt()); in VisitForStmt()
289 Record.AddStmt(S->getInc()); in VisitForStmt()
290 Record.AddStmt(S->getBody()); in VisitForStmt()
291 Record.AddSourceLocation(S->getForLoc()); in VisitForStmt()
292 Record.AddSourceLocation(S->getLParenLoc()); in VisitForStmt()
293 Record.AddSourceLocation(S->getRParenLoc()); in VisitForStmt()
299 Record.AddDeclRef(S->getLabel()); in VisitGotoStmt()
300 Record.AddSourceLocation(S->getGotoLoc()); in VisitGotoStmt()
301 Record.AddSourceLocation(S->getLabelLoc()); in VisitGotoStmt()
307 Record.AddSourceLocation(S->getGotoLoc()); in VisitIndirectGotoStmt()
308 Record.AddSourceLocation(S->getStarLoc()); in VisitIndirectGotoStmt()
309 Record.AddStmt(S->getTarget()); in VisitIndirectGotoStmt()
315 Record.AddSourceLocation(S->getContinueLoc()); in VisitContinueStmt()
321 Record.AddSourceLocation(S->getBreakLoc()); in VisitBreakStmt()
328 bool HasNRVOCandidate = S->getNRVOCandidate() != nullptr; in VisitReturnStmt()
331 Record.AddStmt(S->getRetValue()); in VisitReturnStmt()
333 Record.AddDeclRef(S->getNRVOCandidate()); in VisitReturnStmt()
335 Record.AddSourceLocation(S->getReturnLoc()); in VisitReturnStmt()
341 Record.AddSourceLocation(S->getBeginLoc()); in VisitDeclStmt()
342 Record.AddSourceLocation(S->getEndLoc()); in VisitDeclStmt()
343 DeclGroupRef DG = S->getDeclGroup(); in VisitDeclStmt()
351 Record.push_back(S->getNumOutputs()); in VisitAsmStmt()
352 Record.push_back(S->getNumInputs()); in VisitAsmStmt()
353 Record.push_back(S->getNumClobbers()); in VisitAsmStmt()
354 Record.AddSourceLocation(S->getAsmLoc()); in VisitAsmStmt()
355 Record.push_back(S->isVolatile()); in VisitAsmStmt()
356 Record.push_back(S->isSimple()); in VisitAsmStmt()
361 Record.push_back(S->getNumLabels()); in VisitGCCAsmStmt()
362 Record.AddSourceLocation(S->getRParenLoc()); in VisitGCCAsmStmt()
363 Record.AddStmt(S->getAsmString()); in VisitGCCAsmStmt()
366 for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) { in VisitGCCAsmStmt()
367 Record.AddIdentifierRef(S->getOutputIdentifier(I)); in VisitGCCAsmStmt()
368 Record.AddStmt(S->getOutputConstraintLiteral(I)); in VisitGCCAsmStmt()
369 Record.AddStmt(S->getOutputExpr(I)); in VisitGCCAsmStmt()
373 for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) { in VisitGCCAsmStmt()
374 Record.AddIdentifierRef(S->getInputIdentifier(I)); in VisitGCCAsmStmt()
375 Record.AddStmt(S->getInputConstraintLiteral(I)); in VisitGCCAsmStmt()
376 Record.AddStmt(S->getInputExpr(I)); in VisitGCCAsmStmt()
380 for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) in VisitGCCAsmStmt()
381 Record.AddStmt(S->getClobberStringLiteral(I)); in VisitGCCAsmStmt()
384 for (unsigned I = 0, N = S->getNumLabels(); I != N; ++I) { in VisitGCCAsmStmt()
385 Record.AddIdentifierRef(S->getLabelIdentifier(I)); in VisitGCCAsmStmt()
386 Record.AddStmt(S->getLabelExpr(I)); in VisitGCCAsmStmt()
394 Record.AddSourceLocation(S->getLBraceLoc()); in VisitMSAsmStmt()
395 Record.AddSourceLocation(S->getEndLoc()); in VisitMSAsmStmt()
396 Record.push_back(S->getNumAsmToks()); in VisitMSAsmStmt()
397 Record.AddString(S->getAsmString()); in VisitMSAsmStmt()
400 for (unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) { in VisitMSAsmStmt()
402 Writer.AddToken(S->getAsmToks()[I], Record.getRecordData()); in VisitMSAsmStmt()
406 for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) { in VisitMSAsmStmt()
407 Record.AddString(S->getClobber(I)); in VisitMSAsmStmt()
411 for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) { in VisitMSAsmStmt()
412 Record.AddStmt(S->getOutputExpr(I)); in VisitMSAsmStmt()
413 Record.AddString(S->getOutputConstraint(I)); in VisitMSAsmStmt()
417 for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) { in VisitMSAsmStmt()
418 Record.AddStmt(S->getInputExpr(I)); in VisitMSAsmStmt()
419 Record.AddString(S->getInputConstraint(I)); in VisitMSAsmStmt()
427 Record.push_back(CoroStmt->getParamMoves().size()); in VisitCoroutineBodyStmt()
428 for (Stmt *S : CoroStmt->children()) in VisitCoroutineBodyStmt()
435 Record.AddSourceLocation(S->getKeywordLoc()); in VisitCoreturnStmt()
436 Record.AddStmt(S->getOperand()); in VisitCoreturnStmt()
437 Record.AddStmt(S->getPromiseCall()); in VisitCoreturnStmt()
438 Record.push_back(S->isImplicit()); in VisitCoreturnStmt()
442 void ASTStmtWriter::VisitCoroutineSuspendExpr(CoroutineSuspendExpr *E) { in VisitCoroutineSuspendExpr() argument
443 VisitExpr(E); in VisitCoroutineSuspendExpr()
444 Record.AddSourceLocation(E->getKeywordLoc()); in VisitCoroutineSuspendExpr()
445 for (Stmt *S : E->children()) in VisitCoroutineSuspendExpr()
447 Record.AddStmt(E->getOpaqueValue()); in VisitCoroutineSuspendExpr()
450 void ASTStmtWriter::VisitCoawaitExpr(CoawaitExpr *E) { in VisitCoawaitExpr() argument
451 VisitCoroutineSuspendExpr(E); in VisitCoawaitExpr()
452 Record.push_back(E->isImplicit()); in VisitCoawaitExpr()
456 void ASTStmtWriter::VisitCoyieldExpr(CoyieldExpr *E) { in VisitCoyieldExpr() argument
457 VisitCoroutineSuspendExpr(E); in VisitCoyieldExpr()
461 void ASTStmtWriter::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) { in VisitDependentCoawaitExpr() argument
462 VisitExpr(E); in VisitDependentCoawaitExpr()
463 Record.AddSourceLocation(E->getKeywordLoc()); in VisitDependentCoawaitExpr()
464 for (Stmt *S : E->children()) in VisitDependentCoawaitExpr()
477 auto *E = DetailRecord.dyn_cast<Expr *>(); in addConstraintSatisfaction() local
478 Record.push_back(/* IsDiagnostic */ E == nullptr); in addConstraintSatisfaction()
479 if (E) in addConstraintSatisfaction()
480 Record.AddStmt(E); in addConstraintSatisfaction()
483 Record.AddSourceLocation(Diag->first); in addConstraintSatisfaction()
484 Record.AddString(Diag->second); in addConstraintSatisfaction()
494 Record.AddString(D->SubstitutedEntity); in addSubstitutionDiagnostic()
495 Record.AddSourceLocation(D->DiagLoc); in addSubstitutionDiagnostic()
496 Record.AddString(D->DiagMessage); in addSubstitutionDiagnostic()
500 ConceptSpecializationExpr *E) { in VisitConceptSpecializationExpr() argument
501 VisitExpr(E); in VisitConceptSpecializationExpr()
502 Record.AddDeclRef(E->getSpecializationDecl()); in VisitConceptSpecializationExpr()
503 const ConceptReference *CR = E->getConceptReference(); in VisitConceptSpecializationExpr()
507 if (!E->isValueDependent()) in VisitConceptSpecializationExpr()
508 addConstraintSatisfaction(Record, E->getSatisfaction()); in VisitConceptSpecializationExpr()
513 void ASTStmtWriter::VisitRequiresExpr(RequiresExpr *E) { in VisitRequiresExpr() argument
514 VisitExpr(E); in VisitRequiresExpr()
515 Record.push_back(E->getLocalParameters().size()); in VisitRequiresExpr()
516 Record.push_back(E->getRequirements().size()); in VisitRequiresExpr()
517 Record.AddSourceLocation(E->RequiresExprBits.RequiresKWLoc); in VisitRequiresExpr()
518 Record.push_back(E->RequiresExprBits.IsSatisfied); in VisitRequiresExpr()
519 Record.AddDeclRef(E->getBody()); in VisitRequiresExpr()
520 for (ParmVarDecl *P : E->getLocalParameters()) in VisitRequiresExpr()
522 for (concepts::Requirement *R : E->getRequirements()) { in VisitRequiresExpr()
525 Record.push_back(TypeReq->Status); in VisitRequiresExpr()
526 if (TypeReq->Status == concepts::TypeRequirement::SS_SubstitutionFailure) in VisitRequiresExpr()
527 addSubstitutionDiagnostic(Record, TypeReq->getSubstitutionDiagnostic()); in VisitRequiresExpr()
529 Record.AddTypeSourceInfo(TypeReq->getType()); in VisitRequiresExpr()
531 Record.push_back(ExprReq->getKind()); in VisitRequiresExpr()
532 Record.push_back(ExprReq->Status); in VisitRequiresExpr()
533 if (ExprReq->isExprSubstitutionFailure()) { in VisitRequiresExpr()
535 ExprReq->Value.get<concepts::Requirement::SubstitutionDiagnostic *>()); in VisitRequiresExpr()
537 Record.AddStmt(ExprReq->Value.get<Expr *>()); in VisitRequiresExpr()
538 if (ExprReq->getKind() == concepts::Requirement::RK_Compound) { in VisitRequiresExpr()
539 Record.AddSourceLocation(ExprReq->NoexceptLoc); in VisitRequiresExpr()
540 const auto &RetReq = ExprReq->getReturnTypeRequirement(); in VisitRequiresExpr()
548 if (ExprReq->Status >= in VisitRequiresExpr()
551 ExprReq->getReturnTypeRequirementSubstitutedConstraintExpr()); in VisitRequiresExpr()
560 Record.push_back(NestedReq->hasInvalidConstraint()); in VisitRequiresExpr()
561 if (NestedReq->hasInvalidConstraint()) { in VisitRequiresExpr()
562 Record.AddString(NestedReq->getInvalidConstraintEntity()); in VisitRequiresExpr()
563 addConstraintSatisfaction(Record, *NestedReq->Satisfaction); in VisitRequiresExpr()
565 Record.AddStmt(NestedReq->getConstraintExpr()); in VisitRequiresExpr()
566 if (!NestedReq->isDependent()) in VisitRequiresExpr()
567 addConstraintSatisfaction(Record, *NestedReq->Satisfaction); in VisitRequiresExpr()
571 Record.AddSourceLocation(E->getLParenLoc()); in VisitRequiresExpr()
572 Record.AddSourceLocation(E->getRParenLoc()); in VisitRequiresExpr()
573 Record.AddSourceLocation(E->getEndLoc()); in VisitRequiresExpr()
582 Record.push_back(std::distance(S->capture_begin(), S->capture_end())); in VisitCapturedStmt()
585 Record.AddDeclRef(S->getCapturedDecl()); in VisitCapturedStmt()
586 Record.push_back(S->getCapturedRegionKind()); in VisitCapturedStmt()
588 Record.AddDeclRef(S->getCapturedRecordDecl()); in VisitCapturedStmt()
591 for (auto *I : S->capture_inits()) in VisitCapturedStmt()
595 Record.AddStmt(S->getCapturedStmt()); in VisitCapturedStmt()
598 for (const auto &I : S->captures()) { in VisitCapturedStmt()
610 void ASTStmtWriter::VisitExpr(Expr *E) { in VisitExpr() argument
611 VisitStmt(E); in VisitExpr()
614 CurrentPackingBits.addBits(E->getDependence(), /*BitsWidth=*/5); in VisitExpr()
615 CurrentPackingBits.addBits(E->getValueKind(), /*BitsWidth=*/2); in VisitExpr()
616 CurrentPackingBits.addBits(E->getObjectKind(), /*BitsWidth=*/3); in VisitExpr()
618 Record.AddTypeRef(E->getType()); in VisitExpr()
621 void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) { in VisitConstantExpr() argument
622 VisitExpr(E); in VisitConstantExpr()
623 Record.push_back(E->ConstantExprBits.ResultKind); in VisitConstantExpr()
625 Record.push_back(E->ConstantExprBits.APValueKind); in VisitConstantExpr()
626 Record.push_back(E->ConstantExprBits.IsUnsigned); in VisitConstantExpr()
627 Record.push_back(E->ConstantExprBits.BitWidth); in VisitConstantExpr()
629 Record.push_back(E->ConstantExprBits.IsImmediateInvocation); in VisitConstantExpr()
631 switch (E->getResultStorageKind()) { in VisitConstantExpr()
635 Record.push_back(E->Int64Result()); in VisitConstantExpr()
638 Record.AddAPValue(E->APValueResult()); in VisitConstantExpr()
642 Record.AddStmt(E->getSubExpr()); in VisitConstantExpr()
646 void ASTStmtWriter::VisitSYCLUniqueStableNameExpr(SYCLUniqueStableNameExpr *E) { in VisitSYCLUniqueStableNameExpr() argument
647 VisitExpr(E); in VisitSYCLUniqueStableNameExpr()
649 Record.AddSourceLocation(E->getLocation()); in VisitSYCLUniqueStableNameExpr()
650 Record.AddSourceLocation(E->getLParenLocation()); in VisitSYCLUniqueStableNameExpr()
651 Record.AddSourceLocation(E->getRParenLocation()); in VisitSYCLUniqueStableNameExpr()
652 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitSYCLUniqueStableNameExpr()
657 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) { in VisitPredefinedExpr() argument
658 VisitExpr(E); in VisitPredefinedExpr()
660 bool HasFunctionName = E->getFunctionName() != nullptr; in VisitPredefinedExpr()
663 llvm::to_underlying(E->getIdentKind())); // FIXME: stable encoding in VisitPredefinedExpr()
664 Record.push_back(E->isTransparent()); in VisitPredefinedExpr()
665 Record.AddSourceLocation(E->getLocation()); in VisitPredefinedExpr()
667 Record.AddStmt(E->getFunctionName()); in VisitPredefinedExpr()
671 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr() argument
672 VisitExpr(E); in VisitDeclRefExpr()
676 CurrentPackingBits.addBit(E->hadMultipleCandidates()); in VisitDeclRefExpr()
677 CurrentPackingBits.addBit(E->refersToEnclosingVariableOrCapture()); in VisitDeclRefExpr()
678 CurrentPackingBits.addBits(E->isNonOdrUse(), /*Width=*/2); in VisitDeclRefExpr()
679 CurrentPackingBits.addBit(E->isImmediateEscalating()); in VisitDeclRefExpr()
680 CurrentPackingBits.addBit(E->getDecl() != E->getFoundDecl()); in VisitDeclRefExpr()
681 CurrentPackingBits.addBit(E->hasQualifier()); in VisitDeclRefExpr()
682 CurrentPackingBits.addBit(E->hasTemplateKWAndArgsInfo()); in VisitDeclRefExpr()
684 if (E->hasTemplateKWAndArgsInfo()) { in VisitDeclRefExpr()
685 unsigned NumTemplateArgs = E->getNumTemplateArgs(); in VisitDeclRefExpr()
689 DeclarationName::NameKind nk = (E->getDecl()->getDeclName().getNameKind()); in VisitDeclRefExpr()
691 if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) && in VisitDeclRefExpr()
692 (E->getDecl() == E->getFoundDecl()) && in VisitDeclRefExpr()
693 nk == DeclarationName::Identifier && E->getObjectKind() == OK_Ordinary) { in VisitDeclRefExpr()
697 if (E->hasQualifier()) in VisitDeclRefExpr()
698 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitDeclRefExpr()
700 if (E->getDecl() != E->getFoundDecl()) in VisitDeclRefExpr()
701 Record.AddDeclRef(E->getFoundDecl()); in VisitDeclRefExpr()
703 if (E->hasTemplateKWAndArgsInfo()) in VisitDeclRefExpr()
704 AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(), in VisitDeclRefExpr()
705 E->getTrailingObjects<TemplateArgumentLoc>()); in VisitDeclRefExpr()
707 Record.AddDeclRef(E->getDecl()); in VisitDeclRefExpr()
708 Record.AddSourceLocation(E->getLocation()); in VisitDeclRefExpr()
709 Record.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName()); in VisitDeclRefExpr()
713 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) { in VisitIntegerLiteral() argument
714 VisitExpr(E); in VisitIntegerLiteral()
715 Record.AddSourceLocation(E->getLocation()); in VisitIntegerLiteral()
716 Record.AddAPInt(E->getValue()); in VisitIntegerLiteral()
718 if (E->getValue().getBitWidth() == 32) { in VisitIntegerLiteral()
725 void ASTStmtWriter::VisitFixedPointLiteral(FixedPointLiteral *E) { in VisitFixedPointLiteral() argument
726 VisitExpr(E); in VisitFixedPointLiteral()
727 Record.AddSourceLocation(E->getLocation()); in VisitFixedPointLiteral()
728 Record.push_back(E->getScale()); in VisitFixedPointLiteral()
729 Record.AddAPInt(E->getValue()); in VisitFixedPointLiteral()
733 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) { in VisitFloatingLiteral() argument
734 VisitExpr(E); in VisitFloatingLiteral()
735 Record.push_back(E->getRawSemantics()); in VisitFloatingLiteral()
736 Record.push_back(E->isExact()); in VisitFloatingLiteral()
737 Record.AddAPFloat(E->getValue()); in VisitFloatingLiteral()
738 Record.AddSourceLocation(E->getLocation()); in VisitFloatingLiteral()
742 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) { in VisitImaginaryLiteral() argument
743 VisitExpr(E); in VisitImaginaryLiteral()
744 Record.AddStmt(E->getSubExpr()); in VisitImaginaryLiteral()
748 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) { in VisitStringLiteral() argument
749 VisitExpr(E); in VisitStringLiteral()
752 Record.push_back(E->getNumConcatenated()); in VisitStringLiteral()
753 Record.push_back(E->getLength()); in VisitStringLiteral()
754 Record.push_back(E->getCharByteWidth()); in VisitStringLiteral()
755 Record.push_back(llvm::to_underlying(E->getKind())); in VisitStringLiteral()
756 Record.push_back(E->isPascal()); in VisitStringLiteral()
759 for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I) in VisitStringLiteral()
760 Record.AddSourceLocation(E->getStrTokenLoc(I)); in VisitStringLiteral()
763 StringRef StrData = E->getBytes(); in VisitStringLiteral()
764 for (unsigned I = 0, N = E->getByteLength(); I != N; ++I) in VisitStringLiteral()
770 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) { in VisitCharacterLiteral() argument
771 VisitExpr(E); in VisitCharacterLiteral()
772 Record.push_back(E->getValue()); in VisitCharacterLiteral()
773 Record.AddSourceLocation(E->getLocation()); in VisitCharacterLiteral()
774 Record.push_back(llvm::to_underlying(E->getKind())); in VisitCharacterLiteral()
781 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) { in VisitParenExpr() argument
782 VisitExpr(E); in VisitParenExpr()
783 Record.AddSourceLocation(E->getLParen()); in VisitParenExpr()
784 Record.AddSourceLocation(E->getRParen()); in VisitParenExpr()
785 Record.AddStmt(E->getSubExpr()); in VisitParenExpr()
789 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) { in VisitParenListExpr() argument
790 VisitExpr(E); in VisitParenListExpr()
791 Record.push_back(E->getNumExprs()); in VisitParenListExpr()
792 for (auto *SubStmt : E->exprs()) in VisitParenListExpr()
794 Record.AddSourceLocation(E->getLParenLoc()); in VisitParenListExpr()
795 Record.AddSourceLocation(E->getRParenLoc()); in VisitParenListExpr()
799 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) { in VisitUnaryOperator() argument
800 VisitExpr(E); in VisitUnaryOperator()
801 bool HasFPFeatures = E->hasStoredFPFeatures(); in VisitUnaryOperator()
805 Record.AddStmt(E->getSubExpr()); in VisitUnaryOperator()
806 CurrentPackingBits.addBits(E->getOpcode(), in VisitUnaryOperator()
808 Record.AddSourceLocation(E->getOperatorLoc()); in VisitUnaryOperator()
809 CurrentPackingBits.addBit(E->canOverflow()); in VisitUnaryOperator()
812 Record.push_back(E->getStoredFPFeatures().getAsOpaqueInt()); in VisitUnaryOperator()
816 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) { in VisitOffsetOfExpr() argument
817 VisitExpr(E); in VisitOffsetOfExpr()
818 Record.push_back(E->getNumComponents()); in VisitOffsetOfExpr()
819 Record.push_back(E->getNumExpressions()); in VisitOffsetOfExpr()
820 Record.AddSourceLocation(E->getOperatorLoc()); in VisitOffsetOfExpr()
821 Record.AddSourceLocation(E->getRParenLoc()); in VisitOffsetOfExpr()
822 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitOffsetOfExpr()
823 for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) { in VisitOffsetOfExpr()
824 const OffsetOfNode &ON = E->getComponent(I); in VisitOffsetOfExpr()
846 for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I) in VisitOffsetOfExpr()
847 Record.AddStmt(E->getIndexExpr(I)); in VisitOffsetOfExpr()
851 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) { in VisitUnaryExprOrTypeTraitExpr() argument
852 VisitExpr(E); in VisitUnaryExprOrTypeTraitExpr()
853 Record.push_back(E->getKind()); in VisitUnaryExprOrTypeTraitExpr()
854 if (E->isArgumentType()) in VisitUnaryExprOrTypeTraitExpr()
855 Record.AddTypeSourceInfo(E->getArgumentTypeInfo()); in VisitUnaryExprOrTypeTraitExpr()
858 Record.AddStmt(E->getArgumentExpr()); in VisitUnaryExprOrTypeTraitExpr()
860 Record.AddSourceLocation(E->getOperatorLoc()); in VisitUnaryExprOrTypeTraitExpr()
861 Record.AddSourceLocation(E->getRParenLoc()); in VisitUnaryExprOrTypeTraitExpr()
865 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) { in VisitArraySubscriptExpr() argument
866 VisitExpr(E); in VisitArraySubscriptExpr()
867 Record.AddStmt(E->getLHS()); in VisitArraySubscriptExpr()
868 Record.AddStmt(E->getRHS()); in VisitArraySubscriptExpr()
869 Record.AddSourceLocation(E->getRBracketLoc()); in VisitArraySubscriptExpr()
873 void ASTStmtWriter::VisitMatrixSubscriptExpr(MatrixSubscriptExpr *E) { in VisitMatrixSubscriptExpr() argument
874 VisitExpr(E); in VisitMatrixSubscriptExpr()
875 Record.AddStmt(E->getBase()); in VisitMatrixSubscriptExpr()
876 Record.AddStmt(E->getRowIdx()); in VisitMatrixSubscriptExpr()
877 Record.AddStmt(E->getColumnIdx()); in VisitMatrixSubscriptExpr()
878 Record.AddSourceLocation(E->getRBracketLoc()); in VisitMatrixSubscriptExpr()
882 void ASTStmtWriter::VisitArraySectionExpr(ArraySectionExpr *E) { in VisitArraySectionExpr() argument
883 VisitExpr(E); in VisitArraySectionExpr()
884 Record.writeEnum(E->ASType); in VisitArraySectionExpr()
885 Record.AddStmt(E->getBase()); in VisitArraySectionExpr()
886 Record.AddStmt(E->getLowerBound()); in VisitArraySectionExpr()
887 Record.AddStmt(E->getLength()); in VisitArraySectionExpr()
888 if (E->isOMPArraySection()) in VisitArraySectionExpr()
889 Record.AddStmt(E->getStride()); in VisitArraySectionExpr()
890 Record.AddSourceLocation(E->getColonLocFirst()); in VisitArraySectionExpr()
892 if (E->isOMPArraySection()) in VisitArraySectionExpr()
893 Record.AddSourceLocation(E->getColonLocSecond()); in VisitArraySectionExpr()
895 Record.AddSourceLocation(E->getRBracketLoc()); in VisitArraySectionExpr()
899 void ASTStmtWriter::VisitOMPArrayShapingExpr(OMPArrayShapingExpr *E) { in VisitOMPArrayShapingExpr() argument
900 VisitExpr(E); in VisitOMPArrayShapingExpr()
901 Record.push_back(E->getDimensions().size()); in VisitOMPArrayShapingExpr()
902 Record.AddStmt(E->getBase()); in VisitOMPArrayShapingExpr()
903 for (Expr *Dim : E->getDimensions()) in VisitOMPArrayShapingExpr()
905 for (SourceRange SR : E->getBracketsRanges()) in VisitOMPArrayShapingExpr()
907 Record.AddSourceLocation(E->getLParenLoc()); in VisitOMPArrayShapingExpr()
908 Record.AddSourceLocation(E->getRParenLoc()); in VisitOMPArrayShapingExpr()
912 void ASTStmtWriter::VisitOMPIteratorExpr(OMPIteratorExpr *E) { in VisitOMPIteratorExpr() argument
913 VisitExpr(E); in VisitOMPIteratorExpr()
914 Record.push_back(E->numOfIterators()); in VisitOMPIteratorExpr()
915 Record.AddSourceLocation(E->getIteratorKwLoc()); in VisitOMPIteratorExpr()
916 Record.AddSourceLocation(E->getLParenLoc()); in VisitOMPIteratorExpr()
917 Record.AddSourceLocation(E->getRParenLoc()); in VisitOMPIteratorExpr()
918 for (unsigned I = 0, End = E->numOfIterators(); I < End; ++I) { in VisitOMPIteratorExpr()
919 Record.AddDeclRef(E->getIteratorDecl(I)); in VisitOMPIteratorExpr()
920 Record.AddSourceLocation(E->getAssignLoc(I)); in VisitOMPIteratorExpr()
921 OMPIteratorExpr::IteratorRange Range = E->getIteratorRange(I); in VisitOMPIteratorExpr()
925 Record.AddSourceLocation(E->getColonLoc(I)); in VisitOMPIteratorExpr()
927 Record.AddSourceLocation(E->getSecondColonLoc(I)); in VisitOMPIteratorExpr()
929 OMPIteratorHelperData &HD = E->getHelper(I); in VisitOMPIteratorExpr()
938 void ASTStmtWriter::VisitCallExpr(CallExpr *E) { in VisitCallExpr() argument
939 VisitExpr(E); in VisitCallExpr()
941 Record.push_back(E->getNumArgs()); in VisitCallExpr()
943 CurrentPackingBits.addBit(static_cast<bool>(E->getADLCallKind())); in VisitCallExpr()
944 CurrentPackingBits.addBit(E->hasStoredFPFeatures()); in VisitCallExpr()
946 Record.AddSourceLocation(E->getRParenLoc()); in VisitCallExpr()
947 Record.AddStmt(E->getCallee()); in VisitCallExpr()
948 for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end(); in VisitCallExpr()
952 if (E->hasStoredFPFeatures()) in VisitCallExpr()
953 Record.push_back(E->getFPFeatures().getAsOpaqueInt()); in VisitCallExpr()
955 if (!E->hasStoredFPFeatures() && !static_cast<bool>(E->getADLCallKind()) && in VisitCallExpr()
956 E->getStmtClass() == Stmt::CallExprClass) in VisitCallExpr()
962 void ASTStmtWriter::VisitRecoveryExpr(RecoveryExpr *E) { in VisitRecoveryExpr() argument
963 VisitExpr(E); in VisitRecoveryExpr()
964 Record.push_back(std::distance(E->children().begin(), E->children().end())); in VisitRecoveryExpr()
965 Record.AddSourceLocation(E->getBeginLoc()); in VisitRecoveryExpr()
966 Record.AddSourceLocation(E->getEndLoc()); in VisitRecoveryExpr()
967 for (Stmt *Child : E->children()) in VisitRecoveryExpr()
972 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) { in VisitMemberExpr() argument
973 VisitExpr(E); in VisitMemberExpr()
975 bool HasQualifier = E->hasQualifier(); in VisitMemberExpr()
976 bool HasFoundDecl = E->hasFoundDecl(); in VisitMemberExpr()
977 bool HasTemplateInfo = E->hasTemplateKWAndArgsInfo(); in VisitMemberExpr()
978 unsigned NumTemplateArgs = E->getNumTemplateArgs(); in VisitMemberExpr()
988 Record.AddStmt(E->getBase()); in VisitMemberExpr()
989 Record.AddDeclRef(E->getMemberDecl()); in VisitMemberExpr()
990 Record.AddDeclarationNameLoc(E->MemberDNLoc, in VisitMemberExpr()
991 E->getMemberDecl()->getDeclName()); in VisitMemberExpr()
992 Record.AddSourceLocation(E->getMemberLoc()); in VisitMemberExpr()
993 CurrentPackingBits.addBit(E->isArrow()); in VisitMemberExpr()
994 CurrentPackingBits.addBit(E->hadMultipleCandidates()); in VisitMemberExpr()
995 CurrentPackingBits.addBits(E->isNonOdrUse(), /*Width=*/2); in VisitMemberExpr()
996 Record.AddSourceLocation(E->getOperatorLoc()); in VisitMemberExpr()
999 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitMemberExpr()
1002 DeclAccessPair FoundDecl = E->getFoundDecl(); in VisitMemberExpr()
1008 AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(), in VisitMemberExpr()
1009 E->getTrailingObjects<TemplateArgumentLoc>()); in VisitMemberExpr()
1014 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) { in VisitObjCIsaExpr() argument
1015 VisitExpr(E); in VisitObjCIsaExpr()
1016 Record.AddStmt(E->getBase()); in VisitObjCIsaExpr()
1017 Record.AddSourceLocation(E->getIsaMemberLoc()); in VisitObjCIsaExpr()
1018 Record.AddSourceLocation(E->getOpLoc()); in VisitObjCIsaExpr()
1019 Record.push_back(E->isArrow()); in VisitObjCIsaExpr()
1024 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) { in VisitObjCIndirectCopyRestoreExpr() argument
1025 VisitExpr(E); in VisitObjCIndirectCopyRestoreExpr()
1026 Record.AddStmt(E->getSubExpr()); in VisitObjCIndirectCopyRestoreExpr()
1027 Record.push_back(E->shouldCopy()); in VisitObjCIndirectCopyRestoreExpr()
1031 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) { in VisitObjCBridgedCastExpr() argument
1032 VisitExplicitCastExpr(E); in VisitObjCBridgedCastExpr()
1033 Record.AddSourceLocation(E->getLParenLoc()); in VisitObjCBridgedCastExpr()
1034 Record.AddSourceLocation(E->getBridgeKeywordLoc()); in VisitObjCBridgedCastExpr()
1035 Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding in VisitObjCBridgedCastExpr()
1039 void ASTStmtWriter::VisitCastExpr(CastExpr *E) { in VisitCastExpr() argument
1040 VisitExpr(E); in VisitCastExpr()
1042 Record.push_back(E->path_size()); in VisitCastExpr()
1045 CurrentPackingBits.addBits(E->getCastKind(), /*Width=*/7); in VisitCastExpr()
1046 CurrentPackingBits.addBit(E->hasStoredFPFeatures()); in VisitCastExpr()
1047 Record.AddStmt(E->getSubExpr()); in VisitCastExpr()
1050 PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI) in VisitCastExpr()
1053 if (E->hasStoredFPFeatures()) in VisitCastExpr()
1054 Record.push_back(E->getFPFeatures().getAsOpaqueInt()); in VisitCastExpr()
1057 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator() argument
1058 VisitExpr(E); in VisitBinaryOperator()
1063 CurrentPackingBits.addBits(E->getOpcode(), /*Width=*/6); in VisitBinaryOperator()
1064 bool HasFPFeatures = E->hasStoredFPFeatures(); in VisitBinaryOperator()
1066 Record.AddStmt(E->getLHS()); in VisitBinaryOperator()
1067 Record.AddStmt(E->getRHS()); in VisitBinaryOperator()
1068 Record.AddSourceLocation(E->getOperatorLoc()); in VisitBinaryOperator()
1070 Record.push_back(E->getStoredFPFeatures().getAsOpaqueInt()); in VisitBinaryOperator()
1072 if (!HasFPFeatures && E->getValueKind() == VK_PRValue && in VisitBinaryOperator()
1073 E->getObjectKind() == OK_Ordinary) in VisitBinaryOperator()
1079 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) { in VisitCompoundAssignOperator() argument
1080 VisitBinaryOperator(E); in VisitCompoundAssignOperator()
1081 Record.AddTypeRef(E->getComputationLHSType()); in VisitCompoundAssignOperator()
1082 Record.AddTypeRef(E->getComputationResultType()); in VisitCompoundAssignOperator()
1084 if (!E->hasStoredFPFeatures() && E->getValueKind() == VK_PRValue && in VisitCompoundAssignOperator()
1085 E->getObjectKind() == OK_Ordinary) in VisitCompoundAssignOperator()
1091 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) { in VisitConditionalOperator() argument
1092 VisitExpr(E); in VisitConditionalOperator()
1093 Record.AddStmt(E->getCond()); in VisitConditionalOperator()
1094 Record.AddStmt(E->getLHS()); in VisitConditionalOperator()
1095 Record.AddStmt(E->getRHS()); in VisitConditionalOperator()
1096 Record.AddSourceLocation(E->getQuestionLoc()); in VisitConditionalOperator()
1097 Record.AddSourceLocation(E->getColonLoc()); in VisitConditionalOperator()
1102 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) { in VisitBinaryConditionalOperator() argument
1103 VisitExpr(E); in VisitBinaryConditionalOperator()
1104 Record.AddStmt(E->getOpaqueValue()); in VisitBinaryConditionalOperator()
1105 Record.AddStmt(E->getCommon()); in VisitBinaryConditionalOperator()
1106 Record.AddStmt(E->getCond()); in VisitBinaryConditionalOperator()
1107 Record.AddStmt(E->getTrueExpr()); in VisitBinaryConditionalOperator()
1108 Record.AddStmt(E->getFalseExpr()); in VisitBinaryConditionalOperator()
1109 Record.AddSourceLocation(E->getQuestionLoc()); in VisitBinaryConditionalOperator()
1110 Record.AddSourceLocation(E->getColonLoc()); in VisitBinaryConditionalOperator()
1114 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) { in VisitImplicitCastExpr() argument
1115 VisitCastExpr(E); in VisitImplicitCastExpr()
1116 CurrentPackingBits.addBit(E->isPartOfExplicitCast()); in VisitImplicitCastExpr()
1118 if (E->path_size() == 0 && !E->hasStoredFPFeatures()) in VisitImplicitCastExpr()
1124 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) { in VisitExplicitCastExpr() argument
1125 VisitCastExpr(E); in VisitExplicitCastExpr()
1126 Record.AddTypeSourceInfo(E->getTypeInfoAsWritten()); in VisitExplicitCastExpr()
1129 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) { in VisitCStyleCastExpr() argument
1130 VisitExplicitCastExpr(E); in VisitCStyleCastExpr()
1131 Record.AddSourceLocation(E->getLParenLoc()); in VisitCStyleCastExpr()
1132 Record.AddSourceLocation(E->getRParenLoc()); in VisitCStyleCastExpr()
1136 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { in VisitCompoundLiteralExpr() argument
1137 VisitExpr(E); in VisitCompoundLiteralExpr()
1138 Record.AddSourceLocation(E->getLParenLoc()); in VisitCompoundLiteralExpr()
1139 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitCompoundLiteralExpr()
1140 Record.AddStmt(E->getInitializer()); in VisitCompoundLiteralExpr()
1141 Record.push_back(E->isFileScope()); in VisitCompoundLiteralExpr()
1145 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) { in VisitExtVectorElementExpr() argument
1146 VisitExpr(E); in VisitExtVectorElementExpr()
1147 Record.AddStmt(E->getBase()); in VisitExtVectorElementExpr()
1148 Record.AddIdentifierRef(&E->getAccessor()); in VisitExtVectorElementExpr()
1149 Record.AddSourceLocation(E->getAccessorLoc()); in VisitExtVectorElementExpr()
1153 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) { in VisitInitListExpr() argument
1154 VisitExpr(E); in VisitInitListExpr()
1157 Record.AddStmt(E->getSyntacticForm()); in VisitInitListExpr()
1158 Record.AddSourceLocation(E->getLBraceLoc()); in VisitInitListExpr()
1159 Record.AddSourceLocation(E->getRBraceLoc()); in VisitInitListExpr()
1160 bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>(); in VisitInitListExpr()
1163 Record.AddStmt(E->getArrayFiller()); in VisitInitListExpr()
1165 Record.AddDeclRef(E->getInitializedFieldInUnion()); in VisitInitListExpr()
1166 Record.push_back(E->hadArrayRangeDesignator()); in VisitInitListExpr()
1167 Record.push_back(E->getNumInits()); in VisitInitListExpr()
1171 Expr *filler = E->getArrayFiller(); in VisitInitListExpr()
1172 for (unsigned I = 0, N = E->getNumInits(); I != N; ++I) in VisitInitListExpr()
1173 Record.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr); in VisitInitListExpr()
1175 for (unsigned I = 0, N = E->getNumInits(); I != N; ++I) in VisitInitListExpr()
1176 Record.AddStmt(E->getInit(I)); in VisitInitListExpr()
1181 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) { in VisitDesignatedInitExpr() argument
1182 VisitExpr(E); in VisitDesignatedInitExpr()
1183 Record.push_back(E->getNumSubExprs()); in VisitDesignatedInitExpr()
1184 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitDesignatedInitExpr()
1185 Record.AddStmt(E->getSubExpr(I)); in VisitDesignatedInitExpr()
1186 Record.AddSourceLocation(E->getEqualOrColonLoc()); in VisitDesignatedInitExpr()
1187 Record.push_back(E->usesGNUSyntax()); in VisitDesignatedInitExpr()
1188 for (const DesignatedInitExpr::Designator &D : E->designators()) { in VisitDesignatedInitExpr()
1216 void ASTStmtWriter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) { in VisitDesignatedInitUpdateExpr() argument
1217 VisitExpr(E); in VisitDesignatedInitUpdateExpr()
1218 Record.AddStmt(E->getBase()); in VisitDesignatedInitUpdateExpr()
1219 Record.AddStmt(E->getUpdater()); in VisitDesignatedInitUpdateExpr()
1223 void ASTStmtWriter::VisitNoInitExpr(NoInitExpr *E) { in VisitNoInitExpr() argument
1224 VisitExpr(E); in VisitNoInitExpr()
1228 void ASTStmtWriter::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) { in VisitArrayInitLoopExpr() argument
1229 VisitExpr(E); in VisitArrayInitLoopExpr()
1230 Record.AddStmt(E->SubExprs[0]); in VisitArrayInitLoopExpr()
1231 Record.AddStmt(E->SubExprs[1]); in VisitArrayInitLoopExpr()
1235 void ASTStmtWriter::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) { in VisitArrayInitIndexExpr() argument
1236 VisitExpr(E); in VisitArrayInitIndexExpr()
1240 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) { in VisitImplicitValueInitExpr() argument
1241 VisitExpr(E); in VisitImplicitValueInitExpr()
1245 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) { in VisitVAArgExpr() argument
1246 VisitExpr(E); in VisitVAArgExpr()
1247 Record.AddStmt(E->getSubExpr()); in VisitVAArgExpr()
1248 Record.AddTypeSourceInfo(E->getWrittenTypeInfo()); in VisitVAArgExpr()
1249 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitVAArgExpr()
1250 Record.AddSourceLocation(E->getRParenLoc()); in VisitVAArgExpr()
1251 Record.push_back(E->isMicrosoftABI()); in VisitVAArgExpr()
1255 void ASTStmtWriter::VisitSourceLocExpr(SourceLocExpr *E) { in VisitSourceLocExpr() argument
1256 VisitExpr(E); in VisitSourceLocExpr()
1257 Record.AddDeclRef(cast_or_null<Decl>(E->getParentContext())); in VisitSourceLocExpr()
1258 Record.AddSourceLocation(E->getBeginLoc()); in VisitSourceLocExpr()
1259 Record.AddSourceLocation(E->getEndLoc()); in VisitSourceLocExpr()
1260 Record.push_back(llvm::to_underlying(E->getIdentKind())); in VisitSourceLocExpr()
1264 void ASTStmtWriter::VisitEmbedExpr(EmbedExpr *E) { in VisitEmbedExpr() argument
1265 VisitExpr(E); in VisitEmbedExpr()
1266 Record.AddSourceLocation(E->getBeginLoc()); in VisitEmbedExpr()
1267 Record.AddSourceLocation(E->getEndLoc()); in VisitEmbedExpr()
1268 Record.AddStmt(E->getDataStringLiteral()); in VisitEmbedExpr()
1269 Record.writeUInt32(E->getStartingElementPos()); in VisitEmbedExpr()
1270 Record.writeUInt32(E->getDataElementCount()); in VisitEmbedExpr()
1274 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) { in VisitAddrLabelExpr() argument
1275 VisitExpr(E); in VisitAddrLabelExpr()
1276 Record.AddSourceLocation(E->getAmpAmpLoc()); in VisitAddrLabelExpr()
1277 Record.AddSourceLocation(E->getLabelLoc()); in VisitAddrLabelExpr()
1278 Record.AddDeclRef(E->getLabel()); in VisitAddrLabelExpr()
1282 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) { in VisitStmtExpr() argument
1283 VisitExpr(E); in VisitStmtExpr()
1284 Record.AddStmt(E->getSubStmt()); in VisitStmtExpr()
1285 Record.AddSourceLocation(E->getLParenLoc()); in VisitStmtExpr()
1286 Record.AddSourceLocation(E->getRParenLoc()); in VisitStmtExpr()
1287 Record.push_back(E->getTemplateDepth()); in VisitStmtExpr()
1291 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) { in VisitChooseExpr() argument
1292 VisitExpr(E); in VisitChooseExpr()
1293 Record.AddStmt(E->getCond()); in VisitChooseExpr()
1294 Record.AddStmt(E->getLHS()); in VisitChooseExpr()
1295 Record.AddStmt(E->getRHS()); in VisitChooseExpr()
1296 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitChooseExpr()
1297 Record.AddSourceLocation(E->getRParenLoc()); in VisitChooseExpr()
1298 Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue()); in VisitChooseExpr()
1302 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) { in VisitGNUNullExpr() argument
1303 VisitExpr(E); in VisitGNUNullExpr()
1304 Record.AddSourceLocation(E->getTokenLocation()); in VisitGNUNullExpr()
1308 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { in VisitShuffleVectorExpr() argument
1309 VisitExpr(E); in VisitShuffleVectorExpr()
1310 Record.push_back(E->getNumSubExprs()); in VisitShuffleVectorExpr()
1311 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitShuffleVectorExpr()
1312 Record.AddStmt(E->getExpr(I)); in VisitShuffleVectorExpr()
1313 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitShuffleVectorExpr()
1314 Record.AddSourceLocation(E->getRParenLoc()); in VisitShuffleVectorExpr()
1318 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) { in VisitConvertVectorExpr() argument
1319 VisitExpr(E); in VisitConvertVectorExpr()
1320 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitConvertVectorExpr()
1321 Record.AddSourceLocation(E->getRParenLoc()); in VisitConvertVectorExpr()
1322 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitConvertVectorExpr()
1323 Record.AddStmt(E->getSrcExpr()); in VisitConvertVectorExpr()
1327 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) { in VisitBlockExpr() argument
1328 VisitExpr(E); in VisitBlockExpr()
1329 Record.AddDeclRef(E->getBlockDecl()); in VisitBlockExpr()
1333 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) { in VisitGenericSelectionExpr() argument
1334 VisitExpr(E); in VisitGenericSelectionExpr()
1336 Record.push_back(E->getNumAssocs()); in VisitGenericSelectionExpr()
1337 Record.push_back(E->isExprPredicate()); in VisitGenericSelectionExpr()
1338 Record.push_back(E->ResultIndex); in VisitGenericSelectionExpr()
1339 Record.AddSourceLocation(E->getGenericLoc()); in VisitGenericSelectionExpr()
1340 Record.AddSourceLocation(E->getDefaultLoc()); in VisitGenericSelectionExpr()
1341 Record.AddSourceLocation(E->getRParenLoc()); in VisitGenericSelectionExpr()
1343 Stmt **Stmts = E->getTrailingObjects<Stmt *>(); in VisitGenericSelectionExpr()
1347 for (unsigned I = 0, N = E->getNumAssocs() + 1; I < N; ++I) in VisitGenericSelectionExpr()
1350 TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>(); in VisitGenericSelectionExpr()
1351 for (unsigned I = 0, N = E->getNumAssocs(); I < N; ++I) in VisitGenericSelectionExpr()
1357 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) { in VisitPseudoObjectExpr() argument
1358 VisitExpr(E); in VisitPseudoObjectExpr()
1359 Record.push_back(E->getNumSemanticExprs()); in VisitPseudoObjectExpr()
1363 unsigned result = E->getResultExprIndex(); in VisitPseudoObjectExpr()
1367 Record.AddStmt(E->getSyntacticForm()); in VisitPseudoObjectExpr()
1369 i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) { in VisitPseudoObjectExpr() local
1375 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) { in VisitAtomicExpr() argument
1376 VisitExpr(E); in VisitAtomicExpr()
1377 Record.push_back(E->getOp()); in VisitAtomicExpr()
1378 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitAtomicExpr()
1379 Record.AddStmt(E->getSubExprs()[I]); in VisitAtomicExpr()
1380 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitAtomicExpr()
1381 Record.AddSourceLocation(E->getRParenLoc()); in VisitAtomicExpr()
1385 //===----------------------------------------------------------------------===//
1386 // Objective-C Expressions and Statements.
1387 //===----------------------------------------------------------------------===//
1389 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) { in VisitObjCStringLiteral() argument
1390 VisitExpr(E); in VisitObjCStringLiteral()
1391 Record.AddStmt(E->getString()); in VisitObjCStringLiteral()
1392 Record.AddSourceLocation(E->getAtLoc()); in VisitObjCStringLiteral()
1396 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) { in VisitObjCBoxedExpr() argument
1397 VisitExpr(E); in VisitObjCBoxedExpr()
1398 Record.AddStmt(E->getSubExpr()); in VisitObjCBoxedExpr()
1399 Record.AddDeclRef(E->getBoxingMethod()); in VisitObjCBoxedExpr()
1400 Record.AddSourceRange(E->getSourceRange()); in VisitObjCBoxedExpr()
1404 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) { in VisitObjCArrayLiteral() argument
1405 VisitExpr(E); in VisitObjCArrayLiteral()
1406 Record.push_back(E->getNumElements()); in VisitObjCArrayLiteral()
1407 for (unsigned i = 0; i < E->getNumElements(); i++) in VisitObjCArrayLiteral()
1408 Record.AddStmt(E->getElement(i)); in VisitObjCArrayLiteral()
1409 Record.AddDeclRef(E->getArrayWithObjectsMethod()); in VisitObjCArrayLiteral()
1410 Record.AddSourceRange(E->getSourceRange()); in VisitObjCArrayLiteral()
1414 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) { in VisitObjCDictionaryLiteral() argument
1415 VisitExpr(E); in VisitObjCDictionaryLiteral()
1416 Record.push_back(E->getNumElements()); in VisitObjCDictionaryLiteral()
1417 Record.push_back(E->HasPackExpansions); in VisitObjCDictionaryLiteral()
1418 for (unsigned i = 0; i < E->getNumElements(); i++) { in VisitObjCDictionaryLiteral()
1419 ObjCDictionaryElement Element = E->getKeyValueElement(i); in VisitObjCDictionaryLiteral()
1422 if (E->HasPackExpansions) { in VisitObjCDictionaryLiteral()
1431 Record.AddDeclRef(E->getDictWithObjectsMethod()); in VisitObjCDictionaryLiteral()
1432 Record.AddSourceRange(E->getSourceRange()); in VisitObjCDictionaryLiteral()
1436 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { in VisitObjCEncodeExpr() argument
1437 VisitExpr(E); in VisitObjCEncodeExpr()
1438 Record.AddTypeSourceInfo(E->getEncodedTypeSourceInfo()); in VisitObjCEncodeExpr()
1439 Record.AddSourceLocation(E->getAtLoc()); in VisitObjCEncodeExpr()
1440 Record.AddSourceLocation(E->getRParenLoc()); in VisitObjCEncodeExpr()
1444 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) { in VisitObjCSelectorExpr() argument
1445 VisitExpr(E); in VisitObjCSelectorExpr()
1446 Record.AddSelectorRef(E->getSelector()); in VisitObjCSelectorExpr()
1447 Record.AddSourceLocation(E->getAtLoc()); in VisitObjCSelectorExpr()
1448 Record.AddSourceLocation(E->getRParenLoc()); in VisitObjCSelectorExpr()
1452 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) { in VisitObjCProtocolExpr() argument
1453 VisitExpr(E); in VisitObjCProtocolExpr()
1454 Record.AddDeclRef(E->getProtocol()); in VisitObjCProtocolExpr()
1455 Record.AddSourceLocation(E->getAtLoc()); in VisitObjCProtocolExpr()
1456 Record.AddSourceLocation(E->ProtoLoc); in VisitObjCProtocolExpr()
1457 Record.AddSourceLocation(E->getRParenLoc()); in VisitObjCProtocolExpr()
1461 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { in VisitObjCIvarRefExpr() argument
1462 VisitExpr(E); in VisitObjCIvarRefExpr()
1463 Record.AddDeclRef(E->getDecl()); in VisitObjCIvarRefExpr()
1464 Record.AddSourceLocation(E->getLocation()); in VisitObjCIvarRefExpr()
1465 Record.AddSourceLocation(E->getOpLoc()); in VisitObjCIvarRefExpr()
1466 Record.AddStmt(E->getBase()); in VisitObjCIvarRefExpr()
1467 Record.push_back(E->isArrow()); in VisitObjCIvarRefExpr()
1468 Record.push_back(E->isFreeIvar()); in VisitObjCIvarRefExpr()
1472 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { in VisitObjCPropertyRefExpr() argument
1473 VisitExpr(E); in VisitObjCPropertyRefExpr()
1474 Record.push_back(E->SetterAndMethodRefFlags.getInt()); in VisitObjCPropertyRefExpr()
1475 Record.push_back(E->isImplicitProperty()); in VisitObjCPropertyRefExpr()
1476 if (E->isImplicitProperty()) { in VisitObjCPropertyRefExpr()
1477 Record.AddDeclRef(E->getImplicitPropertyGetter()); in VisitObjCPropertyRefExpr()
1478 Record.AddDeclRef(E->getImplicitPropertySetter()); in VisitObjCPropertyRefExpr()
1480 Record.AddDeclRef(E->getExplicitProperty()); in VisitObjCPropertyRefExpr()
1482 Record.AddSourceLocation(E->getLocation()); in VisitObjCPropertyRefExpr()
1483 Record.AddSourceLocation(E->getReceiverLocation()); in VisitObjCPropertyRefExpr()
1484 if (E->isObjectReceiver()) { in VisitObjCPropertyRefExpr()
1486 Record.AddStmt(E->getBase()); in VisitObjCPropertyRefExpr()
1487 } else if (E->isSuperReceiver()) { in VisitObjCPropertyRefExpr()
1489 Record.AddTypeRef(E->getSuperReceiverType()); in VisitObjCPropertyRefExpr()
1492 Record.AddDeclRef(E->getClassReceiver()); in VisitObjCPropertyRefExpr()
1498 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) { in VisitObjCSubscriptRefExpr() argument
1499 VisitExpr(E); in VisitObjCSubscriptRefExpr()
1500 Record.AddSourceLocation(E->getRBracket()); in VisitObjCSubscriptRefExpr()
1501 Record.AddStmt(E->getBaseExpr()); in VisitObjCSubscriptRefExpr()
1502 Record.AddStmt(E->getKeyExpr()); in VisitObjCSubscriptRefExpr()
1503 Record.AddDeclRef(E->getAtIndexMethodDecl()); in VisitObjCSubscriptRefExpr()
1504 Record.AddDeclRef(E->setAtIndexMethodDecl()); in VisitObjCSubscriptRefExpr()
1509 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) { in VisitObjCMessageExpr() argument
1510 VisitExpr(E); in VisitObjCMessageExpr()
1511 Record.push_back(E->getNumArgs()); in VisitObjCMessageExpr()
1512 Record.push_back(E->getNumStoredSelLocs()); in VisitObjCMessageExpr()
1513 Record.push_back(E->SelLocsKind); in VisitObjCMessageExpr()
1514 Record.push_back(E->isDelegateInitCall()); in VisitObjCMessageExpr()
1515 Record.push_back(E->IsImplicit); in VisitObjCMessageExpr()
1516 Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding in VisitObjCMessageExpr()
1517 switch (E->getReceiverKind()) { in VisitObjCMessageExpr()
1519 Record.AddStmt(E->getInstanceReceiver()); in VisitObjCMessageExpr()
1523 Record.AddTypeSourceInfo(E->getClassReceiverTypeInfo()); in VisitObjCMessageExpr()
1528 Record.AddTypeRef(E->getSuperType()); in VisitObjCMessageExpr()
1529 Record.AddSourceLocation(E->getSuperLoc()); in VisitObjCMessageExpr()
1533 if (E->getMethodDecl()) { in VisitObjCMessageExpr()
1535 Record.AddDeclRef(E->getMethodDecl()); in VisitObjCMessageExpr()
1538 Record.AddSelectorRef(E->getSelector()); in VisitObjCMessageExpr()
1541 Record.AddSourceLocation(E->getLeftLoc()); in VisitObjCMessageExpr()
1542 Record.AddSourceLocation(E->getRightLoc()); in VisitObjCMessageExpr()
1544 for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end(); in VisitObjCMessageExpr()
1548 SourceLocation *Locs = E->getStoredSelLocs(); in VisitObjCMessageExpr()
1549 for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i) in VisitObjCMessageExpr() local
1557 Record.AddStmt(S->getElement()); in VisitObjCForCollectionStmt()
1558 Record.AddStmt(S->getCollection()); in VisitObjCForCollectionStmt()
1559 Record.AddStmt(S->getBody()); in VisitObjCForCollectionStmt()
1560 Record.AddSourceLocation(S->getForLoc()); in VisitObjCForCollectionStmt()
1561 Record.AddSourceLocation(S->getRParenLoc()); in VisitObjCForCollectionStmt()
1567 Record.AddStmt(S->getCatchBody()); in VisitObjCAtCatchStmt()
1568 Record.AddDeclRef(S->getCatchParamDecl()); in VisitObjCAtCatchStmt()
1569 Record.AddSourceLocation(S->getAtCatchLoc()); in VisitObjCAtCatchStmt()
1570 Record.AddSourceLocation(S->getRParenLoc()); in VisitObjCAtCatchStmt()
1576 Record.AddStmt(S->getFinallyBody()); in VisitObjCAtFinallyStmt()
1577 Record.AddSourceLocation(S->getAtFinallyLoc()); in VisitObjCAtFinallyStmt()
1583 Record.AddStmt(S->getSubStmt()); in VisitObjCAutoreleasePoolStmt()
1584 Record.AddSourceLocation(S->getAtLoc()); in VisitObjCAutoreleasePoolStmt()
1590 Record.push_back(S->getNumCatchStmts()); in VisitObjCAtTryStmt()
1591 Record.push_back(S->getFinallyStmt() != nullptr); in VisitObjCAtTryStmt()
1592 Record.AddStmt(S->getTryBody()); in VisitObjCAtTryStmt()
1593 for (ObjCAtCatchStmt *C : S->catch_stmts()) in VisitObjCAtTryStmt()
1595 if (S->getFinallyStmt()) in VisitObjCAtTryStmt()
1596 Record.AddStmt(S->getFinallyStmt()); in VisitObjCAtTryStmt()
1597 Record.AddSourceLocation(S->getAtTryLoc()); in VisitObjCAtTryStmt()
1603 Record.AddStmt(S->getSynchExpr()); in VisitObjCAtSynchronizedStmt()
1604 Record.AddStmt(S->getSynchBody()); in VisitObjCAtSynchronizedStmt()
1605 Record.AddSourceLocation(S->getAtSynchronizedLoc()); in VisitObjCAtSynchronizedStmt()
1611 Record.AddStmt(S->getThrowExpr()); in VisitObjCAtThrowStmt()
1612 Record.AddSourceLocation(S->getThrowLoc()); in VisitObjCAtThrowStmt()
1616 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) { in VisitObjCBoolLiteralExpr() argument
1617 VisitExpr(E); in VisitObjCBoolLiteralExpr()
1618 Record.push_back(E->getValue()); in VisitObjCBoolLiteralExpr()
1619 Record.AddSourceLocation(E->getLocation()); in VisitObjCBoolLiteralExpr()
1623 void ASTStmtWriter::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) { in VisitObjCAvailabilityCheckExpr() argument
1624 VisitExpr(E); in VisitObjCAvailabilityCheckExpr()
1625 Record.AddSourceRange(E->getSourceRange()); in VisitObjCAvailabilityCheckExpr()
1626 Record.AddVersionTuple(E->getVersion()); in VisitObjCAvailabilityCheckExpr()
1630 //===----------------------------------------------------------------------===//
1632 //===----------------------------------------------------------------------===//
1636 Record.AddSourceLocation(S->getCatchLoc()); in VisitCXXCatchStmt()
1637 Record.AddDeclRef(S->getExceptionDecl()); in VisitCXXCatchStmt()
1638 Record.AddStmt(S->getHandlerBlock()); in VisitCXXCatchStmt()
1644 Record.push_back(S->getNumHandlers()); in VisitCXXTryStmt()
1645 Record.AddSourceLocation(S->getTryLoc()); in VisitCXXTryStmt()
1646 Record.AddStmt(S->getTryBlock()); in VisitCXXTryStmt()
1647 for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i) in VisitCXXTryStmt() local
1648 Record.AddStmt(S->getHandler(i)); in VisitCXXTryStmt()
1654 Record.AddSourceLocation(S->getForLoc()); in VisitCXXForRangeStmt()
1655 Record.AddSourceLocation(S->getCoawaitLoc()); in VisitCXXForRangeStmt()
1656 Record.AddSourceLocation(S->getColonLoc()); in VisitCXXForRangeStmt()
1657 Record.AddSourceLocation(S->getRParenLoc()); in VisitCXXForRangeStmt()
1658 Record.AddStmt(S->getInit()); in VisitCXXForRangeStmt()
1659 Record.AddStmt(S->getRangeStmt()); in VisitCXXForRangeStmt()
1660 Record.AddStmt(S->getBeginStmt()); in VisitCXXForRangeStmt()
1661 Record.AddStmt(S->getEndStmt()); in VisitCXXForRangeStmt()
1662 Record.AddStmt(S->getCond()); in VisitCXXForRangeStmt()
1663 Record.AddStmt(S->getInc()); in VisitCXXForRangeStmt()
1664 Record.AddStmt(S->getLoopVarStmt()); in VisitCXXForRangeStmt()
1665 Record.AddStmt(S->getBody()); in VisitCXXForRangeStmt()
1671 Record.AddSourceLocation(S->getKeywordLoc()); in VisitMSDependentExistsStmt()
1672 Record.push_back(S->isIfExists()); in VisitMSDependentExistsStmt()
1673 Record.AddNestedNameSpecifierLoc(S->getQualifierLoc()); in VisitMSDependentExistsStmt()
1674 Record.AddDeclarationNameInfo(S->getNameInfo()); in VisitMSDependentExistsStmt()
1675 Record.AddStmt(S->getSubStmt()); in VisitMSDependentExistsStmt()
1679 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { in VisitCXXOperatorCallExpr() argument
1680 VisitCallExpr(E); in VisitCXXOperatorCallExpr()
1681 Record.push_back(E->getOperator()); in VisitCXXOperatorCallExpr()
1682 Record.AddSourceRange(E->Range); in VisitCXXOperatorCallExpr()
1684 if (!E->hasStoredFPFeatures() && !static_cast<bool>(E->getADLCallKind())) in VisitCXXOperatorCallExpr()
1690 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) { in VisitCXXMemberCallExpr() argument
1691 VisitCallExpr(E); in VisitCXXMemberCallExpr()
1693 if (!E->hasStoredFPFeatures() && !static_cast<bool>(E->getADLCallKind())) in VisitCXXMemberCallExpr()
1700 CXXRewrittenBinaryOperator *E) { in VisitCXXRewrittenBinaryOperator() argument
1701 VisitExpr(E); in VisitCXXRewrittenBinaryOperator()
1702 Record.push_back(E->isReversed()); in VisitCXXRewrittenBinaryOperator()
1703 Record.AddStmt(E->getSemanticForm()); in VisitCXXRewrittenBinaryOperator()
1707 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) { in VisitCXXConstructExpr() argument
1708 VisitExpr(E); in VisitCXXConstructExpr()
1710 Record.push_back(E->getNumArgs()); in VisitCXXConstructExpr()
1711 Record.push_back(E->isElidable()); in VisitCXXConstructExpr()
1712 Record.push_back(E->hadMultipleCandidates()); in VisitCXXConstructExpr()
1713 Record.push_back(E->isListInitialization()); in VisitCXXConstructExpr()
1714 Record.push_back(E->isStdInitListInitialization()); in VisitCXXConstructExpr()
1715 Record.push_back(E->requiresZeroInitialization()); in VisitCXXConstructExpr()
1717 llvm::to_underlying(E->getConstructionKind())); // FIXME: stable encoding in VisitCXXConstructExpr()
1718 Record.push_back(E->isImmediateEscalating()); in VisitCXXConstructExpr()
1719 Record.AddSourceLocation(E->getLocation()); in VisitCXXConstructExpr()
1720 Record.AddDeclRef(E->getConstructor()); in VisitCXXConstructExpr()
1721 Record.AddSourceRange(E->getParenOrBraceRange()); in VisitCXXConstructExpr()
1723 for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) in VisitCXXConstructExpr()
1724 Record.AddStmt(E->getArg(I)); in VisitCXXConstructExpr()
1729 void ASTStmtWriter::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) { in VisitCXXInheritedCtorInitExpr() argument
1730 VisitExpr(E); in VisitCXXInheritedCtorInitExpr()
1731 Record.AddDeclRef(E->getConstructor()); in VisitCXXInheritedCtorInitExpr()
1732 Record.AddSourceLocation(E->getLocation()); in VisitCXXInheritedCtorInitExpr()
1733 Record.push_back(E->constructsVBase()); in VisitCXXInheritedCtorInitExpr()
1734 Record.push_back(E->inheritedFromVBase()); in VisitCXXInheritedCtorInitExpr()
1738 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) { in VisitCXXTemporaryObjectExpr() argument
1739 VisitCXXConstructExpr(E); in VisitCXXTemporaryObjectExpr()
1740 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitCXXTemporaryObjectExpr()
1744 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) { in VisitLambdaExpr() argument
1745 VisitExpr(E); in VisitLambdaExpr()
1746 Record.push_back(E->LambdaExprBits.NumCaptures); in VisitLambdaExpr()
1747 Record.AddSourceRange(E->IntroducerRange); in VisitLambdaExpr()
1748 Record.push_back(E->LambdaExprBits.CaptureDefault); // FIXME: stable encoding in VisitLambdaExpr()
1749 Record.AddSourceLocation(E->CaptureDefaultLoc); in VisitLambdaExpr()
1750 Record.push_back(E->LambdaExprBits.ExplicitParams); in VisitLambdaExpr()
1751 Record.push_back(E->LambdaExprBits.ExplicitResultType); in VisitLambdaExpr()
1752 Record.AddSourceLocation(E->ClosingBrace); in VisitLambdaExpr()
1755 for (LambdaExpr::capture_init_iterator C = E->capture_init_begin(), in VisitLambdaExpr()
1756 CEnd = E->capture_init_end(); in VisitLambdaExpr()
1767 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { in VisitCXXStdInitializerListExpr() argument
1768 VisitExpr(E); in VisitCXXStdInitializerListExpr()
1769 Record.AddStmt(E->getSubExpr()); in VisitCXXStdInitializerListExpr()
1773 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) { in VisitCXXNamedCastExpr() argument
1774 VisitExplicitCastExpr(E); in VisitCXXNamedCastExpr()
1775 Record.AddSourceRange(SourceRange(E->getOperatorLoc(), E->getRParenLoc())); in VisitCXXNamedCastExpr()
1776 CurrentPackingBits.addBit(E->getAngleBrackets().isValid()); in VisitCXXNamedCastExpr()
1777 if (E->getAngleBrackets().isValid()) in VisitCXXNamedCastExpr()
1778 Record.AddSourceRange(E->getAngleBrackets()); in VisitCXXNamedCastExpr()
1781 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) { in VisitCXXStaticCastExpr() argument
1782 VisitCXXNamedCastExpr(E); in VisitCXXStaticCastExpr()
1786 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) { in VisitCXXDynamicCastExpr() argument
1787 VisitCXXNamedCastExpr(E); in VisitCXXDynamicCastExpr()
1791 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) { in VisitCXXReinterpretCastExpr() argument
1792 VisitCXXNamedCastExpr(E); in VisitCXXReinterpretCastExpr()
1796 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) { in VisitCXXConstCastExpr() argument
1797 VisitCXXNamedCastExpr(E); in VisitCXXConstCastExpr()
1801 void ASTStmtWriter::VisitCXXAddrspaceCastExpr(CXXAddrspaceCastExpr *E) { in VisitCXXAddrspaceCastExpr() argument
1802 VisitCXXNamedCastExpr(E); in VisitCXXAddrspaceCastExpr()
1806 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) { in VisitCXXFunctionalCastExpr() argument
1807 VisitExplicitCastExpr(E); in VisitCXXFunctionalCastExpr()
1808 Record.AddSourceLocation(E->getLParenLoc()); in VisitCXXFunctionalCastExpr()
1809 Record.AddSourceLocation(E->getRParenLoc()); in VisitCXXFunctionalCastExpr()
1813 void ASTStmtWriter::VisitBuiltinBitCastExpr(BuiltinBitCastExpr *E) { in VisitBuiltinBitCastExpr() argument
1814 VisitExplicitCastExpr(E); in VisitBuiltinBitCastExpr()
1815 Record.AddSourceLocation(E->getBeginLoc()); in VisitBuiltinBitCastExpr()
1816 Record.AddSourceLocation(E->getEndLoc()); in VisitBuiltinBitCastExpr()
1820 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) { in VisitUserDefinedLiteral() argument
1821 VisitCallExpr(E); in VisitUserDefinedLiteral()
1822 Record.AddSourceLocation(E->UDSuffixLoc); in VisitUserDefinedLiteral()
1826 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) { in VisitCXXBoolLiteralExpr() argument
1827 VisitExpr(E); in VisitCXXBoolLiteralExpr()
1828 Record.push_back(E->getValue()); in VisitCXXBoolLiteralExpr()
1829 Record.AddSourceLocation(E->getLocation()); in VisitCXXBoolLiteralExpr()
1833 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) { in VisitCXXNullPtrLiteralExpr() argument
1834 VisitExpr(E); in VisitCXXNullPtrLiteralExpr()
1835 Record.AddSourceLocation(E->getLocation()); in VisitCXXNullPtrLiteralExpr()
1839 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) { in VisitCXXTypeidExpr() argument
1840 VisitExpr(E); in VisitCXXTypeidExpr()
1841 Record.AddSourceRange(E->getSourceRange()); in VisitCXXTypeidExpr()
1842 if (E->isTypeOperand()) { in VisitCXXTypeidExpr()
1843 Record.AddTypeSourceInfo(E->getTypeOperandSourceInfo()); in VisitCXXTypeidExpr()
1846 Record.AddStmt(E->getExprOperand()); in VisitCXXTypeidExpr()
1851 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) { in VisitCXXThisExpr() argument
1852 VisitExpr(E); in VisitCXXThisExpr()
1853 Record.AddSourceLocation(E->getLocation()); in VisitCXXThisExpr()
1854 Record.push_back(E->isImplicit()); in VisitCXXThisExpr()
1855 Record.push_back(E->isCapturedByCopyInLambdaWithExplicitObjectParameter()); in VisitCXXThisExpr()
1860 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) { in VisitCXXThrowExpr() argument
1861 VisitExpr(E); in VisitCXXThrowExpr()
1862 Record.AddSourceLocation(E->getThrowLoc()); in VisitCXXThrowExpr()
1863 Record.AddStmt(E->getSubExpr()); in VisitCXXThrowExpr()
1864 Record.push_back(E->isThrownVariableInScope()); in VisitCXXThrowExpr()
1868 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) { in VisitCXXDefaultArgExpr() argument
1869 VisitExpr(E); in VisitCXXDefaultArgExpr()
1870 Record.AddDeclRef(E->getParam()); in VisitCXXDefaultArgExpr()
1871 Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext())); in VisitCXXDefaultArgExpr()
1872 Record.AddSourceLocation(E->getUsedLocation()); in VisitCXXDefaultArgExpr()
1873 Record.push_back(E->hasRewrittenInit()); in VisitCXXDefaultArgExpr()
1874 if (E->hasRewrittenInit()) in VisitCXXDefaultArgExpr()
1875 Record.AddStmt(E->getRewrittenExpr()); in VisitCXXDefaultArgExpr()
1879 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) { in VisitCXXDefaultInitExpr() argument
1880 VisitExpr(E); in VisitCXXDefaultInitExpr()
1881 Record.push_back(E->hasRewrittenInit()); in VisitCXXDefaultInitExpr()
1882 Record.AddDeclRef(E->getField()); in VisitCXXDefaultInitExpr()
1883 Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext())); in VisitCXXDefaultInitExpr()
1884 Record.AddSourceLocation(E->getExprLoc()); in VisitCXXDefaultInitExpr()
1885 if (E->hasRewrittenInit()) in VisitCXXDefaultInitExpr()
1886 Record.AddStmt(E->getRewrittenExpr()); in VisitCXXDefaultInitExpr()
1890 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) { in VisitCXXBindTemporaryExpr() argument
1891 VisitExpr(E); in VisitCXXBindTemporaryExpr()
1892 Record.AddCXXTemporary(E->getTemporary()); in VisitCXXBindTemporaryExpr()
1893 Record.AddStmt(E->getSubExpr()); in VisitCXXBindTemporaryExpr()
1897 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { in VisitCXXScalarValueInitExpr() argument
1898 VisitExpr(E); in VisitCXXScalarValueInitExpr()
1899 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitCXXScalarValueInitExpr()
1900 Record.AddSourceLocation(E->getRParenLoc()); in VisitCXXScalarValueInitExpr()
1904 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) { in VisitCXXNewExpr() argument
1905 VisitExpr(E); in VisitCXXNewExpr()
1907 Record.push_back(E->isArray()); in VisitCXXNewExpr()
1908 Record.push_back(E->hasInitializer()); in VisitCXXNewExpr()
1909 Record.push_back(E->getNumPlacementArgs()); in VisitCXXNewExpr()
1910 Record.push_back(E->isParenTypeId()); in VisitCXXNewExpr()
1912 Record.push_back(E->isGlobalNew()); in VisitCXXNewExpr()
1913 Record.push_back(E->passAlignment()); in VisitCXXNewExpr()
1914 Record.push_back(E->doesUsualArrayDeleteWantSize()); in VisitCXXNewExpr()
1915 Record.push_back(E->CXXNewExprBits.HasInitializer); in VisitCXXNewExpr()
1916 Record.push_back(E->CXXNewExprBits.StoredInitializationStyle); in VisitCXXNewExpr()
1918 Record.AddDeclRef(E->getOperatorNew()); in VisitCXXNewExpr()
1919 Record.AddDeclRef(E->getOperatorDelete()); in VisitCXXNewExpr()
1920 Record.AddTypeSourceInfo(E->getAllocatedTypeSourceInfo()); in VisitCXXNewExpr()
1921 if (E->isParenTypeId()) in VisitCXXNewExpr()
1922 Record.AddSourceRange(E->getTypeIdParens()); in VisitCXXNewExpr()
1923 Record.AddSourceRange(E->getSourceRange()); in VisitCXXNewExpr()
1924 Record.AddSourceRange(E->getDirectInitRange()); in VisitCXXNewExpr()
1926 for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), N = E->raw_arg_end(); in VisitCXXNewExpr()
1933 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) { in VisitCXXDeleteExpr() argument
1934 VisitExpr(E); in VisitCXXDeleteExpr()
1935 Record.push_back(E->isGlobalDelete()); in VisitCXXDeleteExpr()
1936 Record.push_back(E->isArrayForm()); in VisitCXXDeleteExpr()
1937 Record.push_back(E->isArrayFormAsWritten()); in VisitCXXDeleteExpr()
1938 Record.push_back(E->doesUsualArrayDeleteWantSize()); in VisitCXXDeleteExpr()
1939 Record.AddDeclRef(E->getOperatorDelete()); in VisitCXXDeleteExpr()
1940 Record.AddStmt(E->getArgument()); in VisitCXXDeleteExpr()
1941 Record.AddSourceLocation(E->getBeginLoc()); in VisitCXXDeleteExpr()
1946 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) { in VisitCXXPseudoDestructorExpr() argument
1947 VisitExpr(E); in VisitCXXPseudoDestructorExpr()
1949 Record.AddStmt(E->getBase()); in VisitCXXPseudoDestructorExpr()
1950 Record.push_back(E->isArrow()); in VisitCXXPseudoDestructorExpr()
1951 Record.AddSourceLocation(E->getOperatorLoc()); in VisitCXXPseudoDestructorExpr()
1952 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitCXXPseudoDestructorExpr()
1953 Record.AddTypeSourceInfo(E->getScopeTypeInfo()); in VisitCXXPseudoDestructorExpr()
1954 Record.AddSourceLocation(E->getColonColonLoc()); in VisitCXXPseudoDestructorExpr()
1955 Record.AddSourceLocation(E->getTildeLoc()); in VisitCXXPseudoDestructorExpr()
1958 Record.AddIdentifierRef(E->getDestroyedTypeIdentifier()); in VisitCXXPseudoDestructorExpr()
1959 if (E->getDestroyedTypeIdentifier()) in VisitCXXPseudoDestructorExpr()
1960 Record.AddSourceLocation(E->getDestroyedTypeLoc()); in VisitCXXPseudoDestructorExpr()
1962 Record.AddTypeSourceInfo(E->getDestroyedTypeInfo()); in VisitCXXPseudoDestructorExpr()
1967 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) { in VisitExprWithCleanups() argument
1968 VisitExpr(E); in VisitExprWithCleanups()
1969 Record.push_back(E->getNumObjects()); in VisitExprWithCleanups()
1970 for (auto &Obj : E->getObjects()) { in VisitExprWithCleanups()
1980 Record.push_back(E->cleanupsHaveSideEffects()); in VisitExprWithCleanups()
1981 Record.AddStmt(E->getSubExpr()); in VisitExprWithCleanups()
1986 CXXDependentScopeMemberExpr *E) { in VisitCXXDependentScopeMemberExpr() argument
1987 VisitExpr(E); in VisitCXXDependentScopeMemberExpr()
1991 Record.push_back(E->getNumTemplateArgs()); in VisitCXXDependentScopeMemberExpr()
1993 CurrentPackingBits.addBit(E->hasTemplateKWAndArgsInfo()); in VisitCXXDependentScopeMemberExpr()
1994 CurrentPackingBits.addBit(E->hasFirstQualifierFoundInScope()); in VisitCXXDependentScopeMemberExpr()
1996 if (E->hasTemplateKWAndArgsInfo()) { in VisitCXXDependentScopeMemberExpr()
1998 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(); in VisitCXXDependentScopeMemberExpr()
2000 E->getTrailingObjects<TemplateArgumentLoc>()); in VisitCXXDependentScopeMemberExpr()
2003 CurrentPackingBits.addBit(E->isArrow()); in VisitCXXDependentScopeMemberExpr()
2005 Record.AddTypeRef(E->getBaseType()); in VisitCXXDependentScopeMemberExpr()
2006 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitCXXDependentScopeMemberExpr()
2007 CurrentPackingBits.addBit(!E->isImplicitAccess()); in VisitCXXDependentScopeMemberExpr()
2008 if (!E->isImplicitAccess()) in VisitCXXDependentScopeMemberExpr()
2009 Record.AddStmt(E->getBase()); in VisitCXXDependentScopeMemberExpr()
2011 Record.AddSourceLocation(E->getOperatorLoc()); in VisitCXXDependentScopeMemberExpr()
2013 if (E->hasFirstQualifierFoundInScope()) in VisitCXXDependentScopeMemberExpr()
2014 Record.AddDeclRef(E->getFirstQualifierFoundInScope()); in VisitCXXDependentScopeMemberExpr()
2016 Record.AddDeclarationNameInfo(E->MemberNameInfo); in VisitCXXDependentScopeMemberExpr()
2021 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) { in VisitDependentScopeDeclRefExpr() argument
2022 VisitExpr(E); in VisitDependentScopeDeclRefExpr()
2027 E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo); in VisitDependentScopeDeclRefExpr()
2029 if (E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo) { in VisitDependentScopeDeclRefExpr()
2031 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(); in VisitDependentScopeDeclRefExpr()
2035 E->getTrailingObjects<TemplateArgumentLoc>()); in VisitDependentScopeDeclRefExpr()
2038 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitDependentScopeDeclRefExpr()
2039 Record.AddDeclarationNameInfo(E->NameInfo); in VisitDependentScopeDeclRefExpr()
2044 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) { in VisitCXXUnresolvedConstructExpr() argument
2045 VisitExpr(E); in VisitCXXUnresolvedConstructExpr()
2046 Record.push_back(E->getNumArgs()); in VisitCXXUnresolvedConstructExpr()
2048 ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI) in VisitCXXUnresolvedConstructExpr()
2050 Record.AddTypeSourceInfo(E->getTypeSourceInfo()); in VisitCXXUnresolvedConstructExpr()
2051 Record.AddSourceLocation(E->getLParenLoc()); in VisitCXXUnresolvedConstructExpr()
2052 Record.AddSourceLocation(E->getRParenLoc()); in VisitCXXUnresolvedConstructExpr()
2053 Record.push_back(E->isListInitialization()); in VisitCXXUnresolvedConstructExpr()
2057 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) { in VisitOverloadExpr() argument
2058 VisitExpr(E); in VisitOverloadExpr()
2060 Record.push_back(E->getNumDecls()); in VisitOverloadExpr()
2063 CurrentPackingBits.addBit(E->hasTemplateKWAndArgsInfo()); in VisitOverloadExpr()
2064 if (E->hasTemplateKWAndArgsInfo()) { in VisitOverloadExpr()
2066 *E->getTrailingASTTemplateKWAndArgsInfo(); in VisitOverloadExpr()
2068 AddTemplateKWAndArgsInfo(ArgInfo, E->getTrailingTemplateArgumentLoc()); in VisitOverloadExpr()
2071 for (OverloadExpr::decls_iterator OvI = E->decls_begin(), in VisitOverloadExpr()
2072 OvE = E->decls_end(); in VisitOverloadExpr()
2078 Record.AddDeclarationNameInfo(E->getNameInfo()); in VisitOverloadExpr()
2079 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitOverloadExpr()
2082 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) { in VisitUnresolvedMemberExpr() argument
2083 VisitOverloadExpr(E); in VisitUnresolvedMemberExpr()
2084 CurrentPackingBits.addBit(E->isArrow()); in VisitUnresolvedMemberExpr()
2085 CurrentPackingBits.addBit(E->hasUnresolvedUsing()); in VisitUnresolvedMemberExpr()
2086 CurrentPackingBits.addBit(!E->isImplicitAccess()); in VisitUnresolvedMemberExpr()
2087 if (!E->isImplicitAccess()) in VisitUnresolvedMemberExpr()
2088 Record.AddStmt(E->getBase()); in VisitUnresolvedMemberExpr()
2090 Record.AddSourceLocation(E->getOperatorLoc()); in VisitUnresolvedMemberExpr()
2092 Record.AddTypeRef(E->getBaseType()); in VisitUnresolvedMemberExpr()
2096 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { in VisitUnresolvedLookupExpr() argument
2097 VisitOverloadExpr(E); in VisitUnresolvedLookupExpr()
2098 CurrentPackingBits.addBit(E->requiresADL()); in VisitUnresolvedLookupExpr()
2099 Record.AddDeclRef(E->getNamingClass()); in VisitUnresolvedLookupExpr()
2105 DeclarationName Name = E->getName(); in VisitUnresolvedLookupExpr()
2107 Writer.getASTContext().getTranslationUnitDecl()->lookup(Name)) in VisitUnresolvedLookupExpr()
2108 if (Found->isFromASTFile()) in VisitUnresolvedLookupExpr()
2112 Writer.getChain()->ReadKnownNamespaces(ExternalNSs); in VisitUnresolvedLookupExpr()
2114 for (auto *Found : NS->lookup(Name)) in VisitUnresolvedLookupExpr()
2119 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) { in VisitTypeTraitExpr() argument
2120 VisitExpr(E); in VisitTypeTraitExpr()
2121 Record.push_back(E->TypeTraitExprBits.NumArgs); in VisitTypeTraitExpr()
2122 Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding in VisitTypeTraitExpr()
2123 Record.push_back(E->TypeTraitExprBits.Value); in VisitTypeTraitExpr()
2124 Record.AddSourceRange(E->getSourceRange()); in VisitTypeTraitExpr()
2125 for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) in VisitTypeTraitExpr()
2126 Record.AddTypeSourceInfo(E->getArg(I)); in VisitTypeTraitExpr()
2130 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) { in VisitArrayTypeTraitExpr() argument
2131 VisitExpr(E); in VisitArrayTypeTraitExpr()
2132 Record.push_back(E->getTrait()); in VisitArrayTypeTraitExpr()
2133 Record.push_back(E->getValue()); in VisitArrayTypeTraitExpr()
2134 Record.AddSourceRange(E->getSourceRange()); in VisitArrayTypeTraitExpr()
2135 Record.AddTypeSourceInfo(E->getQueriedTypeSourceInfo()); in VisitArrayTypeTraitExpr()
2136 Record.AddStmt(E->getDimensionExpression()); in VisitArrayTypeTraitExpr()
2140 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) { in VisitExpressionTraitExpr() argument
2141 VisitExpr(E); in VisitExpressionTraitExpr()
2142 Record.push_back(E->getTrait()); in VisitExpressionTraitExpr()
2143 Record.push_back(E->getValue()); in VisitExpressionTraitExpr()
2144 Record.AddSourceRange(E->getSourceRange()); in VisitExpressionTraitExpr()
2145 Record.AddStmt(E->getQueriedExpression()); in VisitExpressionTraitExpr()
2149 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) { in VisitCXXNoexceptExpr() argument
2150 VisitExpr(E); in VisitCXXNoexceptExpr()
2151 Record.push_back(E->getValue()); in VisitCXXNoexceptExpr()
2152 Record.AddSourceRange(E->getSourceRange()); in VisitCXXNoexceptExpr()
2153 Record.AddStmt(E->getOperand()); in VisitCXXNoexceptExpr()
2157 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) { in VisitPackExpansionExpr() argument
2158 VisitExpr(E); in VisitPackExpansionExpr()
2159 Record.AddSourceLocation(E->getEllipsisLoc()); in VisitPackExpansionExpr()
2160 Record.push_back(E->NumExpansions); in VisitPackExpansionExpr()
2161 Record.AddStmt(E->getPattern()); in VisitPackExpansionExpr()
2165 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) { in VisitSizeOfPackExpr() argument
2166 VisitExpr(E); in VisitSizeOfPackExpr()
2167 Record.push_back(E->isPartiallySubstituted() ? E->getPartialArguments().size() in VisitSizeOfPackExpr()
2169 Record.AddSourceLocation(E->OperatorLoc); in VisitSizeOfPackExpr()
2170 Record.AddSourceLocation(E->PackLoc); in VisitSizeOfPackExpr()
2171 Record.AddSourceLocation(E->RParenLoc); in VisitSizeOfPackExpr()
2172 Record.AddDeclRef(E->Pack); in VisitSizeOfPackExpr()
2173 if (E->isPartiallySubstituted()) { in VisitSizeOfPackExpr()
2174 for (const auto &TA : E->getPartialArguments()) in VisitSizeOfPackExpr()
2176 } else if (!E->isValueDependent()) { in VisitSizeOfPackExpr()
2177 Record.push_back(E->getPackLength()); in VisitSizeOfPackExpr()
2182 void ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) { in VisitPackIndexingExpr() argument
2183 VisitExpr(E); in VisitPackIndexingExpr()
2184 Record.push_back(E->TransformedExpressions); in VisitPackIndexingExpr()
2185 Record.push_back(E->ExpandedToEmptyPack); in VisitPackIndexingExpr()
2186 Record.AddSourceLocation(E->getEllipsisLoc()); in VisitPackIndexingExpr()
2187 Record.AddSourceLocation(E->getRSquareLoc()); in VisitPackIndexingExpr()
2188 Record.AddStmt(E->getPackIdExpression()); in VisitPackIndexingExpr()
2189 Record.AddStmt(E->getIndexExpr()); in VisitPackIndexingExpr()
2190 for (Expr *Sub : E->getExpressions()) in VisitPackIndexingExpr()
2196 SubstNonTypeTemplateParmExpr *E) { in VisitSubstNonTypeTemplateParmExpr() argument
2197 VisitExpr(E); in VisitSubstNonTypeTemplateParmExpr()
2198 Record.AddDeclRef(E->getAssociatedDecl()); in VisitSubstNonTypeTemplateParmExpr()
2199 CurrentPackingBits.addBit(E->isReferenceParameter()); in VisitSubstNonTypeTemplateParmExpr()
2200 CurrentPackingBits.addBits(E->getIndex(), /*Width=*/12); in VisitSubstNonTypeTemplateParmExpr()
2201 CurrentPackingBits.addBit((bool)E->getPackIndex()); in VisitSubstNonTypeTemplateParmExpr()
2202 if (auto PackIndex = E->getPackIndex()) in VisitSubstNonTypeTemplateParmExpr()
2205 Record.AddSourceLocation(E->getNameLoc()); in VisitSubstNonTypeTemplateParmExpr()
2206 Record.AddStmt(E->getReplacement()); in VisitSubstNonTypeTemplateParmExpr()
2211 SubstNonTypeTemplateParmPackExpr *E) { in VisitSubstNonTypeTemplateParmPackExpr() argument
2212 VisitExpr(E); in VisitSubstNonTypeTemplateParmPackExpr()
2213 Record.AddDeclRef(E->getAssociatedDecl()); in VisitSubstNonTypeTemplateParmPackExpr()
2214 Record.push_back(E->getIndex()); in VisitSubstNonTypeTemplateParmPackExpr()
2215 Record.AddTemplateArgument(E->getArgumentPack()); in VisitSubstNonTypeTemplateParmPackExpr()
2216 Record.AddSourceLocation(E->getParameterPackLocation()); in VisitSubstNonTypeTemplateParmPackExpr()
2220 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) { in VisitFunctionParmPackExpr() argument
2221 VisitExpr(E); in VisitFunctionParmPackExpr()
2222 Record.push_back(E->getNumExpansions()); in VisitFunctionParmPackExpr()
2223 Record.AddDeclRef(E->getParameterPack()); in VisitFunctionParmPackExpr()
2224 Record.AddSourceLocation(E->getParameterPackLocation()); in VisitFunctionParmPackExpr()
2225 for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end(); in VisitFunctionParmPackExpr()
2231 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) { in VisitMaterializeTemporaryExpr() argument
2232 VisitExpr(E); in VisitMaterializeTemporaryExpr()
2233 Record.push_back(static_cast<bool>(E->getLifetimeExtendedTemporaryDecl())); in VisitMaterializeTemporaryExpr()
2234 if (E->getLifetimeExtendedTemporaryDecl()) in VisitMaterializeTemporaryExpr()
2235 Record.AddDeclRef(E->getLifetimeExtendedTemporaryDecl()); in VisitMaterializeTemporaryExpr()
2237 Record.AddStmt(E->getSubExpr()); in VisitMaterializeTemporaryExpr()
2241 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) { in VisitCXXFoldExpr() argument
2242 VisitExpr(E); in VisitCXXFoldExpr()
2243 Record.AddSourceLocation(E->LParenLoc); in VisitCXXFoldExpr()
2244 Record.AddSourceLocation(E->EllipsisLoc); in VisitCXXFoldExpr()
2245 Record.AddSourceLocation(E->RParenLoc); in VisitCXXFoldExpr()
2246 Record.push_back(E->NumExpansions); in VisitCXXFoldExpr()
2247 Record.AddStmt(E->SubExprs[0]); in VisitCXXFoldExpr()
2248 Record.AddStmt(E->SubExprs[1]); in VisitCXXFoldExpr()
2249 Record.AddStmt(E->SubExprs[2]); in VisitCXXFoldExpr()
2250 Record.push_back(E->Opcode); in VisitCXXFoldExpr()
2254 void ASTStmtWriter::VisitCXXParenListInitExpr(CXXParenListInitExpr *E) { in VisitCXXParenListInitExpr() argument
2255 VisitExpr(E); in VisitCXXParenListInitExpr()
2256 ArrayRef<Expr *> InitExprs = E->getInitExprs(); in VisitCXXParenListInitExpr()
2258 Record.push_back(E->getUserSpecifiedInitExprs().size()); in VisitCXXParenListInitExpr()
2259 Record.AddSourceLocation(E->getInitLoc()); in VisitCXXParenListInitExpr()
2260 Record.AddSourceLocation(E->getBeginLoc()); in VisitCXXParenListInitExpr()
2261 Record.AddSourceLocation(E->getEndLoc()); in VisitCXXParenListInitExpr()
2262 for (Expr *InitExpr : E->getInitExprs()) in VisitCXXParenListInitExpr()
2264 Expr *ArrayFiller = E->getArrayFiller(); in VisitCXXParenListInitExpr()
2265 FieldDecl *UnionField = E->getInitializedFieldInUnion(); in VisitCXXParenListInitExpr()
2278 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) { in VisitOpaqueValueExpr() argument
2279 VisitExpr(E); in VisitOpaqueValueExpr()
2280 Record.AddStmt(E->getSourceExpr()); in VisitOpaqueValueExpr()
2281 Record.AddSourceLocation(E->getLocation()); in VisitOpaqueValueExpr()
2282 Record.push_back(E->isUnique()); in VisitOpaqueValueExpr()
2286 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) { in VisitTypoExpr() argument
2287 VisitExpr(E); in VisitTypoExpr()
2292 //===----------------------------------------------------------------------===//
2294 //===----------------------------------------------------------------------===//
2296 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) { in VisitCUDAKernelCallExpr() argument
2297 VisitCallExpr(E); in VisitCUDAKernelCallExpr()
2298 Record.AddStmt(E->getConfig()); in VisitCUDAKernelCallExpr()
2302 //===----------------------------------------------------------------------===//
2304 //===----------------------------------------------------------------------===//
2305 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) { in VisitAsTypeExpr() argument
2306 VisitExpr(E); in VisitAsTypeExpr()
2307 Record.AddSourceLocation(E->getBuiltinLoc()); in VisitAsTypeExpr()
2308 Record.AddSourceLocation(E->getRParenLoc()); in VisitAsTypeExpr()
2309 Record.AddStmt(E->getSrcExpr()); in VisitAsTypeExpr()
2313 //===----------------------------------------------------------------------===//
2315 //===----------------------------------------------------------------------===//
2316 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) { in VisitMSPropertyRefExpr() argument
2317 VisitExpr(E); in VisitMSPropertyRefExpr()
2318 Record.push_back(E->isArrow()); in VisitMSPropertyRefExpr()
2319 Record.AddStmt(E->getBaseExpr()); in VisitMSPropertyRefExpr()
2320 Record.AddNestedNameSpecifierLoc(E->getQualifierLoc()); in VisitMSPropertyRefExpr()
2321 Record.AddSourceLocation(E->getMemberLoc()); in VisitMSPropertyRefExpr()
2322 Record.AddDeclRef(E->getPropertyDecl()); in VisitMSPropertyRefExpr()
2326 void ASTStmtWriter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) { in VisitMSPropertySubscriptExpr() argument
2327 VisitExpr(E); in VisitMSPropertySubscriptExpr()
2328 Record.AddStmt(E->getBase()); in VisitMSPropertySubscriptExpr()
2329 Record.AddStmt(E->getIdx()); in VisitMSPropertySubscriptExpr()
2330 Record.AddSourceLocation(E->getRBracketLoc()); in VisitMSPropertySubscriptExpr()
2334 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) { in VisitCXXUuidofExpr() argument
2335 VisitExpr(E); in VisitCXXUuidofExpr()
2336 Record.AddSourceRange(E->getSourceRange()); in VisitCXXUuidofExpr()
2337 Record.AddDeclRef(E->getGuidDecl()); in VisitCXXUuidofExpr()
2338 if (E->isTypeOperand()) { in VisitCXXUuidofExpr()
2339 Record.AddTypeSourceInfo(E->getTypeOperandSourceInfo()); in VisitCXXUuidofExpr()
2342 Record.AddStmt(E->getExprOperand()); in VisitCXXUuidofExpr()
2349 Record.AddSourceLocation(S->getExceptLoc()); in VisitSEHExceptStmt()
2350 Record.AddStmt(S->getFilterExpr()); in VisitSEHExceptStmt()
2351 Record.AddStmt(S->getBlock()); in VisitSEHExceptStmt()
2357 Record.AddSourceLocation(S->getFinallyLoc()); in VisitSEHFinallyStmt()
2358 Record.AddStmt(S->getBlock()); in VisitSEHFinallyStmt()
2364 Record.push_back(S->getIsCXXTry()); in VisitSEHTryStmt()
2365 Record.AddSourceLocation(S->getTryLoc()); in VisitSEHTryStmt()
2366 Record.AddStmt(S->getTryBlock()); in VisitSEHTryStmt()
2367 Record.AddStmt(S->getHandler()); in VisitSEHTryStmt()
2373 Record.AddSourceLocation(S->getLeaveLoc()); in VisitSEHLeaveStmt()
2377 //===----------------------------------------------------------------------===//
2379 //===----------------------------------------------------------------------===//
2383 for (Stmt *SubStmt : S->SubStmts) in VisitOMPCanonicalLoop()
2388 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) { in VisitOMPExecutableDirective() argument
2389 Record.writeOMPChildren(E->Data); in VisitOMPExecutableDirective()
2390 Record.AddSourceLocation(E->getBeginLoc()); in VisitOMPExecutableDirective()
2391 Record.AddSourceLocation(E->getEndLoc()); in VisitOMPExecutableDirective()
2392 Record.writeEnum(E->getMappedDirective()); in VisitOMPExecutableDirective()
2397 Record.writeUInt32(D->getLoopsNumber()); in VisitOMPLoopBasedDirective()
2407 Record.push_back(D->getNumClauses()); in VisitOMPMetaDirective()
2415 Record.writeBool(D->hasCancel()); in VisitOMPParallelDirective()
2427 Record.writeUInt32(D->getNumGeneratedLoops()); in VisitOMPLoopTransformationDirective()
2452 Record.writeBool(D->hasCancel()); in VisitOMPForDirective()
2464 Record.writeBool(D->hasCancel()); in VisitOMPSectionsDirective()
2471 Record.writeBool(D->hasCancel()); in VisitOMPSectionDirective()
2496 Record.AddDeclarationNameInfo(D->getDirectiveName()); in VisitOMPCriticalDirective()
2502 Record.writeBool(D->hasCancel()); in VisitOMPParallelForDirective()
2530 Record.writeBool(D->hasCancel()); in VisitOMPParallelSectionsDirective()
2537 Record.writeBool(D->hasCancel()); in VisitOMPTaskDirective()
2544 Record.writeBool(D->isXLHSInRHSPart()); in VisitOMPAtomicDirective()
2545 Record.writeBool(D->isPostfixUpdate()); in VisitOMPAtomicDirective()
2546 Record.writeBool(D->isFailOnly()); in VisitOMPAtomicDirective()
2580 Record.writeBool(D->hasCancel()); in VisitOMPTargetParallelDirective()
2587 Record.writeBool(D->hasCancel()); in VisitOMPTargetParallelForDirective()
2605 Record.push_back(D->getNumClauses()); in VisitOMPTaskwaitDirective()
2612 Record.push_back(D->getNumClauses()); in VisitOMPErrorDirective()
2657 Record.writeEnum(D->getCancelRegion()); in VisitOMPCancellationPointDirective()
2664 Record.writeEnum(D->getCancelRegion()); in VisitOMPCancelDirective()
2670 Record.writeBool(D->hasCancel()); in VisitOMPTaskLoopDirective()
2682 Record.writeBool(D->hasCancel()); in VisitOMPMasterTaskLoopDirective()
2689 Record.writeBool(D->hasCancel()); in VisitOMPMaskedTaskLoopDirective()
2708 Record.writeBool(D->hasCancel()); in VisitOMPParallelMasterTaskLoopDirective()
2715 Record.writeBool(D->hasCancel()); in VisitOMPParallelMaskedTaskLoopDirective()
2745 Record.writeBool(D->hasCancel()); in VisitOMPDistributeParallelForDirective()
2793 Record.writeBool(D->hasCancel()); in VisitOMPTeamsDistributeParallelForDirective()
2812 Record.writeBool(D->hasCancel()); in VisitOMPTargetTeamsDistributeParallelForDirective()
2838 Record.AddSourceLocation(D->getTargetCallLoc()); in VisitOMPDispatchDirective()
2862 Record.writeBool(D->canBeParallelFor()); in VisitOMPTargetTeamsGenericLoopDirective()
2878 //===----------------------------------------------------------------------===//
2880 //===----------------------------------------------------------------------===//
2882 Record.push_back(S->clauses().size()); in VisitOpenACCConstructStmt()
2883 Record.writeEnum(S->Kind); in VisitOpenACCConstructStmt()
2884 Record.AddSourceRange(S->Range); in VisitOpenACCConstructStmt()
2885 Record.AddSourceLocation(S->DirectiveLoc); in VisitOpenACCConstructStmt()
2886 Record.writeOpenACCClauseList(S->clauses()); in VisitOpenACCConstructStmt()
2892 Record.AddStmt(S->getAssociatedStmt()); in VisitOpenACCAssociatedStmtConstruct()
2907 //===----------------------------------------------------------------------===//
2909 //===----------------------------------------------------------------------===//
2941 Record.push_back(I->second); in WriteSubStmt()
2976 assert(Writer->SubStmtEntries.empty() && "unexpected entries in sub-stmt map"); in FlushStmts()
2977 assert(Writer->ParentStmts.empty() && "unexpected entries in parent stmt map"); in FlushStmts()
2980 Writer->WriteSubStmt(StmtsToEmit[I]); in FlushStmts()
2987 Writer->Stream.EmitRecord(serialization::STMT_STOP, ArrayRef<uint32_t>()); in FlushStmts()
2989 Writer->SubStmtEntries.clear(); in FlushStmts()
2990 Writer->ParentStmts.clear(); in FlushStmts()
3001 Writer->WriteSubStmt(StmtsToEmit[N - I - 1]); in FlushSubStmts()