Lines Matching refs:E

321 void ASTStmtWriter::VisitExpr(Expr *E) {  in VisitExpr()  argument
322 VisitStmt(E); in VisitExpr()
323 Writer.AddTypeRef(E->getType(), Record); in VisitExpr()
324 Record.push_back(E->isTypeDependent()); in VisitExpr()
325 Record.push_back(E->isValueDependent()); in VisitExpr()
326 Record.push_back(E->isInstantiationDependent()); in VisitExpr()
327 Record.push_back(E->containsUnexpandedParameterPack()); in VisitExpr()
328 Record.push_back(E->getValueKind()); in VisitExpr()
329 Record.push_back(E->getObjectKind()); in VisitExpr()
332 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) { in VisitPredefinedExpr() argument
333 VisitExpr(E); in VisitPredefinedExpr()
334 Writer.AddSourceLocation(E->getLocation(), Record); in VisitPredefinedExpr()
335 Record.push_back(E->getIdentType()); // FIXME: stable encoding in VisitPredefinedExpr()
336 Writer.AddStmt(E->getFunctionName()); in VisitPredefinedExpr()
340 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr() argument
341 VisitExpr(E); in VisitDeclRefExpr()
343 Record.push_back(E->hasQualifier()); in VisitDeclRefExpr()
344 Record.push_back(E->getDecl() != E->getFoundDecl()); in VisitDeclRefExpr()
345 Record.push_back(E->hasTemplateKWAndArgsInfo()); in VisitDeclRefExpr()
346 Record.push_back(E->hadMultipleCandidates()); in VisitDeclRefExpr()
347 Record.push_back(E->refersToEnclosingVariableOrCapture()); in VisitDeclRefExpr()
349 if (E->hasTemplateKWAndArgsInfo()) { in VisitDeclRefExpr()
350 unsigned NumTemplateArgs = E->getNumTemplateArgs(); in VisitDeclRefExpr()
354 DeclarationName::NameKind nk = (E->getDecl()->getDeclName().getNameKind()); in VisitDeclRefExpr()
356 if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) && in VisitDeclRefExpr()
357 (E->getDecl() == E->getFoundDecl()) && in VisitDeclRefExpr()
362 if (E->hasQualifier()) in VisitDeclRefExpr()
363 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitDeclRefExpr()
365 if (E->getDecl() != E->getFoundDecl()) in VisitDeclRefExpr()
366 Writer.AddDeclRef(E->getFoundDecl(), Record); in VisitDeclRefExpr()
368 if (E->hasTemplateKWAndArgsInfo()) in VisitDeclRefExpr()
369 AddTemplateKWAndArgsInfo(*E->getTemplateKWAndArgsInfo()); in VisitDeclRefExpr()
371 Writer.AddDeclRef(E->getDecl(), Record); in VisitDeclRefExpr()
372 Writer.AddSourceLocation(E->getLocation(), Record); in VisitDeclRefExpr()
373 Writer.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName(), Record); in VisitDeclRefExpr()
377 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) { in VisitIntegerLiteral() argument
378 VisitExpr(E); in VisitIntegerLiteral()
379 Writer.AddSourceLocation(E->getLocation(), Record); in VisitIntegerLiteral()
380 Writer.AddAPInt(E->getValue(), Record); in VisitIntegerLiteral()
382 if (E->getValue().getBitWidth() == 32) { in VisitIntegerLiteral()
389 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) { in VisitFloatingLiteral() argument
390 VisitExpr(E); in VisitFloatingLiteral()
391 Record.push_back(E->getRawSemantics()); in VisitFloatingLiteral()
392 Record.push_back(E->isExact()); in VisitFloatingLiteral()
393 Writer.AddAPFloat(E->getValue(), Record); in VisitFloatingLiteral()
394 Writer.AddSourceLocation(E->getLocation(), Record); in VisitFloatingLiteral()
398 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) { in VisitImaginaryLiteral() argument
399 VisitExpr(E); in VisitImaginaryLiteral()
400 Writer.AddStmt(E->getSubExpr()); in VisitImaginaryLiteral()
404 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) { in VisitStringLiteral() argument
405 VisitExpr(E); in VisitStringLiteral()
406 Record.push_back(E->getByteLength()); in VisitStringLiteral()
407 Record.push_back(E->getNumConcatenated()); in VisitStringLiteral()
408 Record.push_back(E->getKind()); in VisitStringLiteral()
409 Record.push_back(E->isPascal()); in VisitStringLiteral()
414 Record.append(E->getBytes().begin(), E->getBytes().end()); in VisitStringLiteral()
415 for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I) in VisitStringLiteral()
416 Writer.AddSourceLocation(E->getStrTokenLoc(I), Record); in VisitStringLiteral()
420 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) { in VisitCharacterLiteral() argument
421 VisitExpr(E); in VisitCharacterLiteral()
422 Record.push_back(E->getValue()); in VisitCharacterLiteral()
423 Writer.AddSourceLocation(E->getLocation(), Record); in VisitCharacterLiteral()
424 Record.push_back(E->getKind()); in VisitCharacterLiteral()
431 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) { in VisitParenExpr() argument
432 VisitExpr(E); in VisitParenExpr()
433 Writer.AddSourceLocation(E->getLParen(), Record); in VisitParenExpr()
434 Writer.AddSourceLocation(E->getRParen(), Record); in VisitParenExpr()
435 Writer.AddStmt(E->getSubExpr()); in VisitParenExpr()
439 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) { in VisitParenListExpr() argument
440 VisitExpr(E); in VisitParenListExpr()
441 Record.push_back(E->NumExprs); in VisitParenListExpr()
442 for (unsigned i=0; i != E->NumExprs; ++i) in VisitParenListExpr()
443 Writer.AddStmt(E->Exprs[i]); in VisitParenListExpr()
444 Writer.AddSourceLocation(E->LParenLoc, Record); in VisitParenListExpr()
445 Writer.AddSourceLocation(E->RParenLoc, Record); in VisitParenListExpr()
449 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) { in VisitUnaryOperator() argument
450 VisitExpr(E); in VisitUnaryOperator()
451 Writer.AddStmt(E->getSubExpr()); in VisitUnaryOperator()
452 Record.push_back(E->getOpcode()); // FIXME: stable encoding in VisitUnaryOperator()
453 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitUnaryOperator()
457 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) { in VisitOffsetOfExpr() argument
458 VisitExpr(E); in VisitOffsetOfExpr()
459 Record.push_back(E->getNumComponents()); in VisitOffsetOfExpr()
460 Record.push_back(E->getNumExpressions()); in VisitOffsetOfExpr()
461 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitOffsetOfExpr()
462 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitOffsetOfExpr()
463 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitOffsetOfExpr()
464 for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) { in VisitOffsetOfExpr()
465 const OffsetOfExpr::OffsetOfNode &ON = E->getComponent(I); in VisitOffsetOfExpr()
487 for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I) in VisitOffsetOfExpr()
488 Writer.AddStmt(E->getIndexExpr(I)); in VisitOffsetOfExpr()
492 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) { in VisitUnaryExprOrTypeTraitExpr() argument
493 VisitExpr(E); in VisitUnaryExprOrTypeTraitExpr()
494 Record.push_back(E->getKind()); in VisitUnaryExprOrTypeTraitExpr()
495 if (E->isArgumentType()) in VisitUnaryExprOrTypeTraitExpr()
496 Writer.AddTypeSourceInfo(E->getArgumentTypeInfo(), Record); in VisitUnaryExprOrTypeTraitExpr()
499 Writer.AddStmt(E->getArgumentExpr()); in VisitUnaryExprOrTypeTraitExpr()
501 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitUnaryExprOrTypeTraitExpr()
502 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitUnaryExprOrTypeTraitExpr()
506 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) { in VisitArraySubscriptExpr() argument
507 VisitExpr(E); in VisitArraySubscriptExpr()
508 Writer.AddStmt(E->getLHS()); in VisitArraySubscriptExpr()
509 Writer.AddStmt(E->getRHS()); in VisitArraySubscriptExpr()
510 Writer.AddSourceLocation(E->getRBracketLoc(), Record); in VisitArraySubscriptExpr()
514 void ASTStmtWriter::VisitCallExpr(CallExpr *E) { in VisitCallExpr() argument
515 VisitExpr(E); in VisitCallExpr()
516 Record.push_back(E->getNumArgs()); in VisitCallExpr()
517 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitCallExpr()
518 Writer.AddStmt(E->getCallee()); in VisitCallExpr()
519 for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end(); in VisitCallExpr()
525 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) { in VisitMemberExpr() argument
528 Record.push_back(E->hasQualifier()); in VisitMemberExpr()
529 if (E->hasQualifier()) in VisitMemberExpr()
530 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitMemberExpr()
532 Record.push_back(E->HasTemplateKWAndArgsInfo); in VisitMemberExpr()
533 if (E->HasTemplateKWAndArgsInfo) { in VisitMemberExpr()
534 Writer.AddSourceLocation(E->getTemplateKeywordLoc(), Record); in VisitMemberExpr()
535 unsigned NumTemplateArgs = E->getNumTemplateArgs(); in VisitMemberExpr()
537 Writer.AddSourceLocation(E->getLAngleLoc(), Record); in VisitMemberExpr()
538 Writer.AddSourceLocation(E->getRAngleLoc(), Record); in VisitMemberExpr()
540 Writer.AddTemplateArgumentLoc(E->getTemplateArgs()[i], Record); in VisitMemberExpr()
543 Record.push_back(E->hadMultipleCandidates()); in VisitMemberExpr()
545 DeclAccessPair FoundDecl = E->getFoundDecl(); in VisitMemberExpr()
549 Writer.AddTypeRef(E->getType(), Record); in VisitMemberExpr()
550 Record.push_back(E->getValueKind()); in VisitMemberExpr()
551 Record.push_back(E->getObjectKind()); in VisitMemberExpr()
552 Writer.AddStmt(E->getBase()); in VisitMemberExpr()
553 Writer.AddDeclRef(E->getMemberDecl(), Record); in VisitMemberExpr()
554 Writer.AddSourceLocation(E->getMemberLoc(), Record); in VisitMemberExpr()
555 Record.push_back(E->isArrow()); in VisitMemberExpr()
556 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitMemberExpr()
557 Writer.AddDeclarationNameLoc(E->MemberDNLoc, in VisitMemberExpr()
558 E->getMemberDecl()->getDeclName(), Record); in VisitMemberExpr()
562 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) { in VisitObjCIsaExpr() argument
563 VisitExpr(E); in VisitObjCIsaExpr()
564 Writer.AddStmt(E->getBase()); in VisitObjCIsaExpr()
565 Writer.AddSourceLocation(E->getIsaMemberLoc(), Record); in VisitObjCIsaExpr()
566 Writer.AddSourceLocation(E->getOpLoc(), Record); in VisitObjCIsaExpr()
567 Record.push_back(E->isArrow()); in VisitObjCIsaExpr()
572 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) { in VisitObjCIndirectCopyRestoreExpr() argument
573 VisitExpr(E); in VisitObjCIndirectCopyRestoreExpr()
574 Writer.AddStmt(E->getSubExpr()); in VisitObjCIndirectCopyRestoreExpr()
575 Record.push_back(E->shouldCopy()); in VisitObjCIndirectCopyRestoreExpr()
579 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) { in VisitObjCBridgedCastExpr() argument
580 VisitExplicitCastExpr(E); in VisitObjCBridgedCastExpr()
581 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitObjCBridgedCastExpr()
582 Writer.AddSourceLocation(E->getBridgeKeywordLoc(), Record); in VisitObjCBridgedCastExpr()
583 Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding in VisitObjCBridgedCastExpr()
587 void ASTStmtWriter::VisitCastExpr(CastExpr *E) { in VisitCastExpr() argument
588 VisitExpr(E); in VisitCastExpr()
589 Record.push_back(E->path_size()); in VisitCastExpr()
590 Writer.AddStmt(E->getSubExpr()); in VisitCastExpr()
591 Record.push_back(E->getCastKind()); // FIXME: stable encoding in VisitCastExpr()
594 PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI) in VisitCastExpr()
598 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator() argument
599 VisitExpr(E); in VisitBinaryOperator()
600 Writer.AddStmt(E->getLHS()); in VisitBinaryOperator()
601 Writer.AddStmt(E->getRHS()); in VisitBinaryOperator()
602 Record.push_back(E->getOpcode()); // FIXME: stable encoding in VisitBinaryOperator()
603 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitBinaryOperator()
604 Record.push_back(E->isFPContractable()); in VisitBinaryOperator()
608 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) { in VisitCompoundAssignOperator() argument
609 VisitBinaryOperator(E); in VisitCompoundAssignOperator()
610 Writer.AddTypeRef(E->getComputationLHSType(), Record); in VisitCompoundAssignOperator()
611 Writer.AddTypeRef(E->getComputationResultType(), Record); in VisitCompoundAssignOperator()
615 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) { in VisitConditionalOperator() argument
616 VisitExpr(E); in VisitConditionalOperator()
617 Writer.AddStmt(E->getCond()); in VisitConditionalOperator()
618 Writer.AddStmt(E->getLHS()); in VisitConditionalOperator()
619 Writer.AddStmt(E->getRHS()); in VisitConditionalOperator()
620 Writer.AddSourceLocation(E->getQuestionLoc(), Record); in VisitConditionalOperator()
621 Writer.AddSourceLocation(E->getColonLoc(), Record); in VisitConditionalOperator()
626 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) { in VisitBinaryConditionalOperator() argument
627 VisitExpr(E); in VisitBinaryConditionalOperator()
628 Writer.AddStmt(E->getOpaqueValue()); in VisitBinaryConditionalOperator()
629 Writer.AddStmt(E->getCommon()); in VisitBinaryConditionalOperator()
630 Writer.AddStmt(E->getCond()); in VisitBinaryConditionalOperator()
631 Writer.AddStmt(E->getTrueExpr()); in VisitBinaryConditionalOperator()
632 Writer.AddStmt(E->getFalseExpr()); in VisitBinaryConditionalOperator()
633 Writer.AddSourceLocation(E->getQuestionLoc(), Record); in VisitBinaryConditionalOperator()
634 Writer.AddSourceLocation(E->getColonLoc(), Record); in VisitBinaryConditionalOperator()
638 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) { in VisitImplicitCastExpr() argument
639 VisitCastExpr(E); in VisitImplicitCastExpr()
641 if (E->path_size() == 0) in VisitImplicitCastExpr()
647 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) { in VisitExplicitCastExpr() argument
648 VisitCastExpr(E); in VisitExplicitCastExpr()
649 Writer.AddTypeSourceInfo(E->getTypeInfoAsWritten(), Record); in VisitExplicitCastExpr()
652 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) { in VisitCStyleCastExpr() argument
653 VisitExplicitCastExpr(E); in VisitCStyleCastExpr()
654 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitCStyleCastExpr()
655 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitCStyleCastExpr()
659 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { in VisitCompoundLiteralExpr() argument
660 VisitExpr(E); in VisitCompoundLiteralExpr()
661 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitCompoundLiteralExpr()
662 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitCompoundLiteralExpr()
663 Writer.AddStmt(E->getInitializer()); in VisitCompoundLiteralExpr()
664 Record.push_back(E->isFileScope()); in VisitCompoundLiteralExpr()
668 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) { in VisitExtVectorElementExpr() argument
669 VisitExpr(E); in VisitExtVectorElementExpr()
670 Writer.AddStmt(E->getBase()); in VisitExtVectorElementExpr()
671 Writer.AddIdentifierRef(&E->getAccessor(), Record); in VisitExtVectorElementExpr()
672 Writer.AddSourceLocation(E->getAccessorLoc(), Record); in VisitExtVectorElementExpr()
676 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) { in VisitInitListExpr() argument
677 VisitExpr(E); in VisitInitListExpr()
680 Writer.AddStmt(E->getSyntacticForm()); in VisitInitListExpr()
681 Writer.AddSourceLocation(E->getLBraceLoc(), Record); in VisitInitListExpr()
682 Writer.AddSourceLocation(E->getRBraceLoc(), Record); in VisitInitListExpr()
683 bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>(); in VisitInitListExpr()
686 Writer.AddStmt(E->getArrayFiller()); in VisitInitListExpr()
688 Writer.AddDeclRef(E->getInitializedFieldInUnion(), Record); in VisitInitListExpr()
689 Record.push_back(E->hadArrayRangeDesignator()); in VisitInitListExpr()
690 Record.push_back(E->getNumInits()); in VisitInitListExpr()
694 Expr *filler = E->getArrayFiller(); in VisitInitListExpr()
695 for (unsigned I = 0, N = E->getNumInits(); I != N; ++I) in VisitInitListExpr()
696 Writer.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr); in VisitInitListExpr()
698 for (unsigned I = 0, N = E->getNumInits(); I != N; ++I) in VisitInitListExpr()
699 Writer.AddStmt(E->getInit(I)); in VisitInitListExpr()
704 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) { in VisitDesignatedInitExpr() argument
705 VisitExpr(E); in VisitDesignatedInitExpr()
706 Record.push_back(E->getNumSubExprs()); in VisitDesignatedInitExpr()
707 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitDesignatedInitExpr()
708 Writer.AddStmt(E->getSubExpr(I)); in VisitDesignatedInitExpr()
709 Writer.AddSourceLocation(E->getEqualOrColonLoc(), Record); in VisitDesignatedInitExpr()
710 Record.push_back(E->usesGNUSyntax()); in VisitDesignatedInitExpr()
711 for (DesignatedInitExpr::designators_iterator D = E->designators_begin(), in VisitDesignatedInitExpr()
712 DEnd = E->designators_end(); in VisitDesignatedInitExpr()
741 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) { in VisitImplicitValueInitExpr() argument
742 VisitExpr(E); in VisitImplicitValueInitExpr()
746 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) { in VisitVAArgExpr() argument
747 VisitExpr(E); in VisitVAArgExpr()
748 Writer.AddStmt(E->getSubExpr()); in VisitVAArgExpr()
749 Writer.AddTypeSourceInfo(E->getWrittenTypeInfo(), Record); in VisitVAArgExpr()
750 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitVAArgExpr()
751 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitVAArgExpr()
755 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) { in VisitAddrLabelExpr() argument
756 VisitExpr(E); in VisitAddrLabelExpr()
757 Writer.AddSourceLocation(E->getAmpAmpLoc(), Record); in VisitAddrLabelExpr()
758 Writer.AddSourceLocation(E->getLabelLoc(), Record); in VisitAddrLabelExpr()
759 Writer.AddDeclRef(E->getLabel(), Record); in VisitAddrLabelExpr()
763 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) { in VisitStmtExpr() argument
764 VisitExpr(E); in VisitStmtExpr()
765 Writer.AddStmt(E->getSubStmt()); in VisitStmtExpr()
766 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitStmtExpr()
767 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitStmtExpr()
771 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) { in VisitChooseExpr() argument
772 VisitExpr(E); in VisitChooseExpr()
773 Writer.AddStmt(E->getCond()); in VisitChooseExpr()
774 Writer.AddStmt(E->getLHS()); in VisitChooseExpr()
775 Writer.AddStmt(E->getRHS()); in VisitChooseExpr()
776 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitChooseExpr()
777 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitChooseExpr()
778 Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue()); in VisitChooseExpr()
782 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) { in VisitGNUNullExpr() argument
783 VisitExpr(E); in VisitGNUNullExpr()
784 Writer.AddSourceLocation(E->getTokenLocation(), Record); in VisitGNUNullExpr()
788 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { in VisitShuffleVectorExpr() argument
789 VisitExpr(E); in VisitShuffleVectorExpr()
790 Record.push_back(E->getNumSubExprs()); in VisitShuffleVectorExpr()
791 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitShuffleVectorExpr()
792 Writer.AddStmt(E->getExpr(I)); in VisitShuffleVectorExpr()
793 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitShuffleVectorExpr()
794 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitShuffleVectorExpr()
798 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) { in VisitConvertVectorExpr() argument
799 VisitExpr(E); in VisitConvertVectorExpr()
800 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitConvertVectorExpr()
801 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitConvertVectorExpr()
802 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitConvertVectorExpr()
803 Writer.AddStmt(E->getSrcExpr()); in VisitConvertVectorExpr()
807 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) { in VisitBlockExpr() argument
808 VisitExpr(E); in VisitBlockExpr()
809 Writer.AddDeclRef(E->getBlockDecl(), Record); in VisitBlockExpr()
813 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) { in VisitGenericSelectionExpr() argument
814 VisitExpr(E); in VisitGenericSelectionExpr()
815 Record.push_back(E->getNumAssocs()); in VisitGenericSelectionExpr()
817 Writer.AddStmt(E->getControllingExpr()); in VisitGenericSelectionExpr()
818 for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) { in VisitGenericSelectionExpr()
819 Writer.AddTypeSourceInfo(E->getAssocTypeSourceInfo(I), Record); in VisitGenericSelectionExpr()
820 Writer.AddStmt(E->getAssocExpr(I)); in VisitGenericSelectionExpr()
822 Record.push_back(E->isResultDependent() ? -1U : E->getResultIndex()); in VisitGenericSelectionExpr()
824 Writer.AddSourceLocation(E->getGenericLoc(), Record); in VisitGenericSelectionExpr()
825 Writer.AddSourceLocation(E->getDefaultLoc(), Record); in VisitGenericSelectionExpr()
826 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitGenericSelectionExpr()
830 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) { in VisitPseudoObjectExpr() argument
831 VisitExpr(E); in VisitPseudoObjectExpr()
832 Record.push_back(E->getNumSemanticExprs()); in VisitPseudoObjectExpr()
836 unsigned result = E->getResultExprIndex(); in VisitPseudoObjectExpr()
840 Writer.AddStmt(E->getSyntacticForm()); in VisitPseudoObjectExpr()
842 i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) { in VisitPseudoObjectExpr()
848 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) { in VisitAtomicExpr() argument
849 VisitExpr(E); in VisitAtomicExpr()
850 Record.push_back(E->getOp()); in VisitAtomicExpr()
851 for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) in VisitAtomicExpr()
852 Writer.AddStmt(E->getSubExprs()[I]); in VisitAtomicExpr()
853 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitAtomicExpr()
854 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitAtomicExpr()
862 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) { in VisitObjCStringLiteral() argument
863 VisitExpr(E); in VisitObjCStringLiteral()
864 Writer.AddStmt(E->getString()); in VisitObjCStringLiteral()
865 Writer.AddSourceLocation(E->getAtLoc(), Record); in VisitObjCStringLiteral()
869 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) { in VisitObjCBoxedExpr() argument
870 VisitExpr(E); in VisitObjCBoxedExpr()
871 Writer.AddStmt(E->getSubExpr()); in VisitObjCBoxedExpr()
872 Writer.AddDeclRef(E->getBoxingMethod(), Record); in VisitObjCBoxedExpr()
873 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitObjCBoxedExpr()
877 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) { in VisitObjCArrayLiteral() argument
878 VisitExpr(E); in VisitObjCArrayLiteral()
879 Record.push_back(E->getNumElements()); in VisitObjCArrayLiteral()
880 for (unsigned i = 0; i < E->getNumElements(); i++) in VisitObjCArrayLiteral()
881 Writer.AddStmt(E->getElement(i)); in VisitObjCArrayLiteral()
882 Writer.AddDeclRef(E->getArrayWithObjectsMethod(), Record); in VisitObjCArrayLiteral()
883 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitObjCArrayLiteral()
887 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) { in VisitObjCDictionaryLiteral() argument
888 VisitExpr(E); in VisitObjCDictionaryLiteral()
889 Record.push_back(E->getNumElements()); in VisitObjCDictionaryLiteral()
890 Record.push_back(E->HasPackExpansions); in VisitObjCDictionaryLiteral()
891 for (unsigned i = 0; i < E->getNumElements(); i++) { in VisitObjCDictionaryLiteral()
892 ObjCDictionaryElement Element = E->getKeyValueElement(i); in VisitObjCDictionaryLiteral()
895 if (E->HasPackExpansions) { in VisitObjCDictionaryLiteral()
904 Writer.AddDeclRef(E->getDictWithObjectsMethod(), Record); in VisitObjCDictionaryLiteral()
905 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitObjCDictionaryLiteral()
909 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { in VisitObjCEncodeExpr() argument
910 VisitExpr(E); in VisitObjCEncodeExpr()
911 Writer.AddTypeSourceInfo(E->getEncodedTypeSourceInfo(), Record); in VisitObjCEncodeExpr()
912 Writer.AddSourceLocation(E->getAtLoc(), Record); in VisitObjCEncodeExpr()
913 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitObjCEncodeExpr()
917 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) { in VisitObjCSelectorExpr() argument
918 VisitExpr(E); in VisitObjCSelectorExpr()
919 Writer.AddSelectorRef(E->getSelector(), Record); in VisitObjCSelectorExpr()
920 Writer.AddSourceLocation(E->getAtLoc(), Record); in VisitObjCSelectorExpr()
921 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitObjCSelectorExpr()
925 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) { in VisitObjCProtocolExpr() argument
926 VisitExpr(E); in VisitObjCProtocolExpr()
927 Writer.AddDeclRef(E->getProtocol(), Record); in VisitObjCProtocolExpr()
928 Writer.AddSourceLocation(E->getAtLoc(), Record); in VisitObjCProtocolExpr()
929 Writer.AddSourceLocation(E->ProtoLoc, Record); in VisitObjCProtocolExpr()
930 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitObjCProtocolExpr()
934 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { in VisitObjCIvarRefExpr() argument
935 VisitExpr(E); in VisitObjCIvarRefExpr()
936 Writer.AddDeclRef(E->getDecl(), Record); in VisitObjCIvarRefExpr()
937 Writer.AddSourceLocation(E->getLocation(), Record); in VisitObjCIvarRefExpr()
938 Writer.AddSourceLocation(E->getOpLoc(), Record); in VisitObjCIvarRefExpr()
939 Writer.AddStmt(E->getBase()); in VisitObjCIvarRefExpr()
940 Record.push_back(E->isArrow()); in VisitObjCIvarRefExpr()
941 Record.push_back(E->isFreeIvar()); in VisitObjCIvarRefExpr()
945 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { in VisitObjCPropertyRefExpr() argument
946 VisitExpr(E); in VisitObjCPropertyRefExpr()
947 Record.push_back(E->SetterAndMethodRefFlags.getInt()); in VisitObjCPropertyRefExpr()
948 Record.push_back(E->isImplicitProperty()); in VisitObjCPropertyRefExpr()
949 if (E->isImplicitProperty()) { in VisitObjCPropertyRefExpr()
950 Writer.AddDeclRef(E->getImplicitPropertyGetter(), Record); in VisitObjCPropertyRefExpr()
951 Writer.AddDeclRef(E->getImplicitPropertySetter(), Record); in VisitObjCPropertyRefExpr()
953 Writer.AddDeclRef(E->getExplicitProperty(), Record); in VisitObjCPropertyRefExpr()
955 Writer.AddSourceLocation(E->getLocation(), Record); in VisitObjCPropertyRefExpr()
956 Writer.AddSourceLocation(E->getReceiverLocation(), Record); in VisitObjCPropertyRefExpr()
957 if (E->isObjectReceiver()) { in VisitObjCPropertyRefExpr()
959 Writer.AddStmt(E->getBase()); in VisitObjCPropertyRefExpr()
960 } else if (E->isSuperReceiver()) { in VisitObjCPropertyRefExpr()
962 Writer.AddTypeRef(E->getSuperReceiverType(), Record); in VisitObjCPropertyRefExpr()
965 Writer.AddDeclRef(E->getClassReceiver(), Record); in VisitObjCPropertyRefExpr()
971 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) { in VisitObjCSubscriptRefExpr() argument
972 VisitExpr(E); in VisitObjCSubscriptRefExpr()
973 Writer.AddSourceLocation(E->getRBracket(), Record); in VisitObjCSubscriptRefExpr()
974 Writer.AddStmt(E->getBaseExpr()); in VisitObjCSubscriptRefExpr()
975 Writer.AddStmt(E->getKeyExpr()); in VisitObjCSubscriptRefExpr()
976 Writer.AddDeclRef(E->getAtIndexMethodDecl(), Record); in VisitObjCSubscriptRefExpr()
977 Writer.AddDeclRef(E->setAtIndexMethodDecl(), Record); in VisitObjCSubscriptRefExpr()
982 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) { in VisitObjCMessageExpr() argument
983 VisitExpr(E); in VisitObjCMessageExpr()
984 Record.push_back(E->getNumArgs()); in VisitObjCMessageExpr()
985 Record.push_back(E->getNumStoredSelLocs()); in VisitObjCMessageExpr()
986 Record.push_back(E->SelLocsKind); in VisitObjCMessageExpr()
987 Record.push_back(E->isDelegateInitCall()); in VisitObjCMessageExpr()
988 Record.push_back(E->IsImplicit); in VisitObjCMessageExpr()
989 Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding in VisitObjCMessageExpr()
990 switch (E->getReceiverKind()) { in VisitObjCMessageExpr()
992 Writer.AddStmt(E->getInstanceReceiver()); in VisitObjCMessageExpr()
996 Writer.AddTypeSourceInfo(E->getClassReceiverTypeInfo(), Record); in VisitObjCMessageExpr()
1001 Writer.AddTypeRef(E->getSuperType(), Record); in VisitObjCMessageExpr()
1002 Writer.AddSourceLocation(E->getSuperLoc(), Record); in VisitObjCMessageExpr()
1006 if (E->getMethodDecl()) { in VisitObjCMessageExpr()
1008 Writer.AddDeclRef(E->getMethodDecl(), Record); in VisitObjCMessageExpr()
1011 Writer.AddSelectorRef(E->getSelector(), Record); in VisitObjCMessageExpr()
1014 Writer.AddSourceLocation(E->getLeftLoc(), Record); in VisitObjCMessageExpr()
1015 Writer.AddSourceLocation(E->getRightLoc(), Record); in VisitObjCMessageExpr()
1017 for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end(); in VisitObjCMessageExpr()
1021 SourceLocation *Locs = E->getStoredSelLocs(); in VisitObjCMessageExpr()
1022 for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i) in VisitObjCMessageExpr()
1083 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) { in VisitObjCBoolLiteralExpr() argument
1084 VisitExpr(E); in VisitObjCBoolLiteralExpr()
1085 Record.push_back(E->getValue()); in VisitObjCBoolLiteralExpr()
1086 Writer.AddSourceLocation(E->getLocation(), Record); in VisitObjCBoolLiteralExpr()
1136 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { in VisitCXXOperatorCallExpr() argument
1137 VisitCallExpr(E); in VisitCXXOperatorCallExpr()
1138 Record.push_back(E->getOperator()); in VisitCXXOperatorCallExpr()
1139 Writer.AddSourceRange(E->Range, Record); in VisitCXXOperatorCallExpr()
1140 Record.push_back(E->isFPContractable()); in VisitCXXOperatorCallExpr()
1144 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) { in VisitCXXMemberCallExpr() argument
1145 VisitCallExpr(E); in VisitCXXMemberCallExpr()
1149 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) { in VisitCXXConstructExpr() argument
1150 VisitExpr(E); in VisitCXXConstructExpr()
1151 Record.push_back(E->getNumArgs()); in VisitCXXConstructExpr()
1152 for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) in VisitCXXConstructExpr()
1153 Writer.AddStmt(E->getArg(I)); in VisitCXXConstructExpr()
1154 Writer.AddDeclRef(E->getConstructor(), Record); in VisitCXXConstructExpr()
1155 Writer.AddSourceLocation(E->getLocation(), Record); in VisitCXXConstructExpr()
1156 Record.push_back(E->isElidable()); in VisitCXXConstructExpr()
1157 Record.push_back(E->hadMultipleCandidates()); in VisitCXXConstructExpr()
1158 Record.push_back(E->isListInitialization()); in VisitCXXConstructExpr()
1159 Record.push_back(E->isStdInitListInitialization()); in VisitCXXConstructExpr()
1160 Record.push_back(E->requiresZeroInitialization()); in VisitCXXConstructExpr()
1161 Record.push_back(E->getConstructionKind()); // FIXME: stable encoding in VisitCXXConstructExpr()
1162 Writer.AddSourceRange(E->getParenOrBraceRange(), Record); in VisitCXXConstructExpr()
1166 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) { in VisitCXXTemporaryObjectExpr() argument
1167 VisitCXXConstructExpr(E); in VisitCXXTemporaryObjectExpr()
1168 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitCXXTemporaryObjectExpr()
1172 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) { in VisitLambdaExpr() argument
1173 VisitExpr(E); in VisitLambdaExpr()
1174 Record.push_back(E->NumCaptures); in VisitLambdaExpr()
1176 if (E->HasArrayIndexVars) in VisitLambdaExpr()
1177 NumArrayIndexVars = E->getArrayIndexStarts()[E->NumCaptures]; in VisitLambdaExpr()
1179 Writer.AddSourceRange(E->IntroducerRange, Record); in VisitLambdaExpr()
1180 Record.push_back(E->CaptureDefault); // FIXME: stable encoding in VisitLambdaExpr()
1181 Writer.AddSourceLocation(E->CaptureDefaultLoc, Record); in VisitLambdaExpr()
1182 Record.push_back(E->ExplicitParams); in VisitLambdaExpr()
1183 Record.push_back(E->ExplicitResultType); in VisitLambdaExpr()
1184 Writer.AddSourceLocation(E->ClosingBrace, Record); in VisitLambdaExpr()
1187 for (LambdaExpr::capture_init_iterator C = E->capture_init_begin(), in VisitLambdaExpr()
1188 CEnd = E->capture_init_end(); in VisitLambdaExpr()
1195 Record.append(E->getArrayIndexStarts(), in VisitLambdaExpr()
1196 E->getArrayIndexStarts() + E->NumCaptures + 1); in VisitLambdaExpr()
1197 VarDecl **ArrayIndexVars = E->getArrayIndexVars(); in VisitLambdaExpr()
1205 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { in VisitCXXStdInitializerListExpr() argument
1206 VisitExpr(E); in VisitCXXStdInitializerListExpr()
1207 Writer.AddStmt(E->getSubExpr()); in VisitCXXStdInitializerListExpr()
1211 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) { in VisitCXXNamedCastExpr() argument
1212 VisitExplicitCastExpr(E); in VisitCXXNamedCastExpr()
1213 Writer.AddSourceRange(SourceRange(E->getOperatorLoc(), E->getRParenLoc()), in VisitCXXNamedCastExpr()
1215 Writer.AddSourceRange(E->getAngleBrackets(), Record); in VisitCXXNamedCastExpr()
1218 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) { in VisitCXXStaticCastExpr() argument
1219 VisitCXXNamedCastExpr(E); in VisitCXXStaticCastExpr()
1223 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) { in VisitCXXDynamicCastExpr() argument
1224 VisitCXXNamedCastExpr(E); in VisitCXXDynamicCastExpr()
1228 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) { in VisitCXXReinterpretCastExpr() argument
1229 VisitCXXNamedCastExpr(E); in VisitCXXReinterpretCastExpr()
1233 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) { in VisitCXXConstCastExpr() argument
1234 VisitCXXNamedCastExpr(E); in VisitCXXConstCastExpr()
1238 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) { in VisitCXXFunctionalCastExpr() argument
1239 VisitExplicitCastExpr(E); in VisitCXXFunctionalCastExpr()
1240 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitCXXFunctionalCastExpr()
1241 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitCXXFunctionalCastExpr()
1245 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) { in VisitUserDefinedLiteral() argument
1246 VisitCallExpr(E); in VisitUserDefinedLiteral()
1247 Writer.AddSourceLocation(E->UDSuffixLoc, Record); in VisitUserDefinedLiteral()
1251 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) { in VisitCXXBoolLiteralExpr() argument
1252 VisitExpr(E); in VisitCXXBoolLiteralExpr()
1253 Record.push_back(E->getValue()); in VisitCXXBoolLiteralExpr()
1254 Writer.AddSourceLocation(E->getLocation(), Record); in VisitCXXBoolLiteralExpr()
1258 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) { in VisitCXXNullPtrLiteralExpr() argument
1259 VisitExpr(E); in VisitCXXNullPtrLiteralExpr()
1260 Writer.AddSourceLocation(E->getLocation(), Record); in VisitCXXNullPtrLiteralExpr()
1264 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) { in VisitCXXTypeidExpr() argument
1265 VisitExpr(E); in VisitCXXTypeidExpr()
1266 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitCXXTypeidExpr()
1267 if (E->isTypeOperand()) { in VisitCXXTypeidExpr()
1268 Writer.AddTypeSourceInfo(E->getTypeOperandSourceInfo(), Record); in VisitCXXTypeidExpr()
1271 Writer.AddStmt(E->getExprOperand()); in VisitCXXTypeidExpr()
1276 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) { in VisitCXXThisExpr() argument
1277 VisitExpr(E); in VisitCXXThisExpr()
1278 Writer.AddSourceLocation(E->getLocation(), Record); in VisitCXXThisExpr()
1279 Record.push_back(E->isImplicit()); in VisitCXXThisExpr()
1283 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) { in VisitCXXThrowExpr() argument
1284 VisitExpr(E); in VisitCXXThrowExpr()
1285 Writer.AddSourceLocation(E->getThrowLoc(), Record); in VisitCXXThrowExpr()
1286 Writer.AddStmt(E->getSubExpr()); in VisitCXXThrowExpr()
1287 Record.push_back(E->isThrownVariableInScope()); in VisitCXXThrowExpr()
1291 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) { in VisitCXXDefaultArgExpr() argument
1292 VisitExpr(E); in VisitCXXDefaultArgExpr()
1294 bool HasOtherExprStored = E->Param.getInt(); in VisitCXXDefaultArgExpr()
1298 Writer.AddStmt(E->getExpr()); in VisitCXXDefaultArgExpr()
1299 Writer.AddDeclRef(E->getParam(), Record); in VisitCXXDefaultArgExpr()
1300 Writer.AddSourceLocation(E->getUsedLocation(), Record); in VisitCXXDefaultArgExpr()
1305 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) { in VisitCXXDefaultInitExpr() argument
1306 VisitExpr(E); in VisitCXXDefaultInitExpr()
1307 Writer.AddDeclRef(E->getField(), Record); in VisitCXXDefaultInitExpr()
1308 Writer.AddSourceLocation(E->getExprLoc(), Record); in VisitCXXDefaultInitExpr()
1312 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) { in VisitCXXBindTemporaryExpr() argument
1313 VisitExpr(E); in VisitCXXBindTemporaryExpr()
1314 Writer.AddCXXTemporary(E->getTemporary(), Record); in VisitCXXBindTemporaryExpr()
1315 Writer.AddStmt(E->getSubExpr()); in VisitCXXBindTemporaryExpr()
1319 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { in VisitCXXScalarValueInitExpr() argument
1320 VisitExpr(E); in VisitCXXScalarValueInitExpr()
1321 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitCXXScalarValueInitExpr()
1322 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitCXXScalarValueInitExpr()
1326 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) { in VisitCXXNewExpr() argument
1327 VisitExpr(E); in VisitCXXNewExpr()
1328 Record.push_back(E->isGlobalNew()); in VisitCXXNewExpr()
1329 Record.push_back(E->isArray()); in VisitCXXNewExpr()
1330 Record.push_back(E->doesUsualArrayDeleteWantSize()); in VisitCXXNewExpr()
1331 Record.push_back(E->getNumPlacementArgs()); in VisitCXXNewExpr()
1332 Record.push_back(E->StoredInitializationStyle); in VisitCXXNewExpr()
1333 Writer.AddDeclRef(E->getOperatorNew(), Record); in VisitCXXNewExpr()
1334 Writer.AddDeclRef(E->getOperatorDelete(), Record); in VisitCXXNewExpr()
1335 Writer.AddTypeSourceInfo(E->getAllocatedTypeSourceInfo(), Record); in VisitCXXNewExpr()
1336 Writer.AddSourceRange(E->getTypeIdParens(), Record); in VisitCXXNewExpr()
1337 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitCXXNewExpr()
1338 Writer.AddSourceRange(E->getDirectInitRange(), Record); in VisitCXXNewExpr()
1339 for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), e = E->raw_arg_end(); in VisitCXXNewExpr()
1346 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) { in VisitCXXDeleteExpr() argument
1347 VisitExpr(E); in VisitCXXDeleteExpr()
1348 Record.push_back(E->isGlobalDelete()); in VisitCXXDeleteExpr()
1349 Record.push_back(E->isArrayForm()); in VisitCXXDeleteExpr()
1350 Record.push_back(E->isArrayFormAsWritten()); in VisitCXXDeleteExpr()
1351 Record.push_back(E->doesUsualArrayDeleteWantSize()); in VisitCXXDeleteExpr()
1352 Writer.AddDeclRef(E->getOperatorDelete(), Record); in VisitCXXDeleteExpr()
1353 Writer.AddStmt(E->getArgument()); in VisitCXXDeleteExpr()
1354 Writer.AddSourceLocation(E->getSourceRange().getBegin(), Record); in VisitCXXDeleteExpr()
1359 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) { in VisitCXXPseudoDestructorExpr() argument
1360 VisitExpr(E); in VisitCXXPseudoDestructorExpr()
1362 Writer.AddStmt(E->getBase()); in VisitCXXPseudoDestructorExpr()
1363 Record.push_back(E->isArrow()); in VisitCXXPseudoDestructorExpr()
1364 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitCXXPseudoDestructorExpr()
1365 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitCXXPseudoDestructorExpr()
1366 Writer.AddTypeSourceInfo(E->getScopeTypeInfo(), Record); in VisitCXXPseudoDestructorExpr()
1367 Writer.AddSourceLocation(E->getColonColonLoc(), Record); in VisitCXXPseudoDestructorExpr()
1368 Writer.AddSourceLocation(E->getTildeLoc(), Record); in VisitCXXPseudoDestructorExpr()
1371 Writer.AddIdentifierRef(E->getDestroyedTypeIdentifier(), Record); in VisitCXXPseudoDestructorExpr()
1372 if (E->getDestroyedTypeIdentifier()) in VisitCXXPseudoDestructorExpr()
1373 Writer.AddSourceLocation(E->getDestroyedTypeLoc(), Record); in VisitCXXPseudoDestructorExpr()
1375 Writer.AddTypeSourceInfo(E->getDestroyedTypeInfo(), Record); in VisitCXXPseudoDestructorExpr()
1380 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) { in VisitExprWithCleanups() argument
1381 VisitExpr(E); in VisitExprWithCleanups()
1382 Record.push_back(E->getNumObjects()); in VisitExprWithCleanups()
1383 for (unsigned i = 0, e = E->getNumObjects(); i != e; ++i) in VisitExprWithCleanups()
1384 Writer.AddDeclRef(E->getObject(i), Record); in VisitExprWithCleanups()
1386 Writer.AddStmt(E->getSubExpr()); in VisitExprWithCleanups()
1391 ASTStmtWriter::VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E){ in VisitCXXDependentScopeMemberExpr() argument
1392 VisitExpr(E); in VisitCXXDependentScopeMemberExpr()
1397 Record.push_back(E->HasTemplateKWAndArgsInfo); in VisitCXXDependentScopeMemberExpr()
1398 if (E->HasTemplateKWAndArgsInfo) { in VisitCXXDependentScopeMemberExpr()
1399 const ASTTemplateKWAndArgsInfo &Args = *E->getTemplateKWAndArgsInfo(); in VisitCXXDependentScopeMemberExpr()
1404 if (!E->isImplicitAccess()) in VisitCXXDependentScopeMemberExpr()
1405 Writer.AddStmt(E->getBase()); in VisitCXXDependentScopeMemberExpr()
1408 Writer.AddTypeRef(E->getBaseType(), Record); in VisitCXXDependentScopeMemberExpr()
1409 Record.push_back(E->isArrow()); in VisitCXXDependentScopeMemberExpr()
1410 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitCXXDependentScopeMemberExpr()
1411 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitCXXDependentScopeMemberExpr()
1412 Writer.AddDeclRef(E->getFirstQualifierFoundInScope(), Record); in VisitCXXDependentScopeMemberExpr()
1413 Writer.AddDeclarationNameInfo(E->MemberNameInfo, Record); in VisitCXXDependentScopeMemberExpr()
1418 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) { in VisitDependentScopeDeclRefExpr() argument
1419 VisitExpr(E); in VisitDependentScopeDeclRefExpr()
1424 Record.push_back(E->HasTemplateKWAndArgsInfo); in VisitDependentScopeDeclRefExpr()
1425 if (E->HasTemplateKWAndArgsInfo) { in VisitDependentScopeDeclRefExpr()
1426 const ASTTemplateKWAndArgsInfo &Args = *E->getTemplateKWAndArgsInfo(); in VisitDependentScopeDeclRefExpr()
1431 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitDependentScopeDeclRefExpr()
1432 Writer.AddDeclarationNameInfo(E->NameInfo, Record); in VisitDependentScopeDeclRefExpr()
1437 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) { in VisitCXXUnresolvedConstructExpr() argument
1438 VisitExpr(E); in VisitCXXUnresolvedConstructExpr()
1439 Record.push_back(E->arg_size()); in VisitCXXUnresolvedConstructExpr()
1441 ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI) in VisitCXXUnresolvedConstructExpr()
1443 Writer.AddTypeSourceInfo(E->getTypeSourceInfo(), Record); in VisitCXXUnresolvedConstructExpr()
1444 Writer.AddSourceLocation(E->getLParenLoc(), Record); in VisitCXXUnresolvedConstructExpr()
1445 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitCXXUnresolvedConstructExpr()
1449 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) { in VisitOverloadExpr() argument
1450 VisitExpr(E); in VisitOverloadExpr()
1455 Record.push_back(E->HasTemplateKWAndArgsInfo); in VisitOverloadExpr()
1456 if (E->HasTemplateKWAndArgsInfo) { in VisitOverloadExpr()
1457 const ASTTemplateKWAndArgsInfo &Args = *E->getTemplateKWAndArgsInfo(); in VisitOverloadExpr()
1462 Record.push_back(E->getNumDecls()); in VisitOverloadExpr()
1464 OvI = E->decls_begin(), OvE = E->decls_end(); OvI != OvE; ++OvI) { in VisitOverloadExpr()
1469 Writer.AddDeclarationNameInfo(E->NameInfo, Record); in VisitOverloadExpr()
1470 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitOverloadExpr()
1473 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) { in VisitUnresolvedMemberExpr() argument
1474 VisitOverloadExpr(E); in VisitUnresolvedMemberExpr()
1475 Record.push_back(E->isArrow()); in VisitUnresolvedMemberExpr()
1476 Record.push_back(E->hasUnresolvedUsing()); in VisitUnresolvedMemberExpr()
1477 Writer.AddStmt(!E->isImplicitAccess() ? E->getBase() : nullptr); in VisitUnresolvedMemberExpr()
1478 Writer.AddTypeRef(E->getBaseType(), Record); in VisitUnresolvedMemberExpr()
1479 Writer.AddSourceLocation(E->getOperatorLoc(), Record); in VisitUnresolvedMemberExpr()
1483 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { in VisitUnresolvedLookupExpr() argument
1484 VisitOverloadExpr(E); in VisitUnresolvedLookupExpr()
1485 Record.push_back(E->requiresADL()); in VisitUnresolvedLookupExpr()
1486 Record.push_back(E->isOverloaded()); in VisitUnresolvedLookupExpr()
1487 Writer.AddDeclRef(E->getNamingClass(), Record); in VisitUnresolvedLookupExpr()
1491 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) { in VisitTypeTraitExpr() argument
1492 VisitExpr(E); in VisitTypeTraitExpr()
1493 Record.push_back(E->TypeTraitExprBits.NumArgs); in VisitTypeTraitExpr()
1494 Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding in VisitTypeTraitExpr()
1495 Record.push_back(E->TypeTraitExprBits.Value); in VisitTypeTraitExpr()
1496 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitTypeTraitExpr()
1497 for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) in VisitTypeTraitExpr()
1498 Writer.AddTypeSourceInfo(E->getArg(I), Record); in VisitTypeTraitExpr()
1502 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) { in VisitArrayTypeTraitExpr() argument
1503 VisitExpr(E); in VisitArrayTypeTraitExpr()
1504 Record.push_back(E->getTrait()); in VisitArrayTypeTraitExpr()
1505 Record.push_back(E->getValue()); in VisitArrayTypeTraitExpr()
1506 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitArrayTypeTraitExpr()
1507 Writer.AddTypeSourceInfo(E->getQueriedTypeSourceInfo(), Record); in VisitArrayTypeTraitExpr()
1511 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) { in VisitExpressionTraitExpr() argument
1512 VisitExpr(E); in VisitExpressionTraitExpr()
1513 Record.push_back(E->getTrait()); in VisitExpressionTraitExpr()
1514 Record.push_back(E->getValue()); in VisitExpressionTraitExpr()
1515 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitExpressionTraitExpr()
1516 Writer.AddStmt(E->getQueriedExpression()); in VisitExpressionTraitExpr()
1520 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) { in VisitCXXNoexceptExpr() argument
1521 VisitExpr(E); in VisitCXXNoexceptExpr()
1522 Record.push_back(E->getValue()); in VisitCXXNoexceptExpr()
1523 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitCXXNoexceptExpr()
1524 Writer.AddStmt(E->getOperand()); in VisitCXXNoexceptExpr()
1528 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) { in VisitPackExpansionExpr() argument
1529 VisitExpr(E); in VisitPackExpansionExpr()
1530 Writer.AddSourceLocation(E->getEllipsisLoc(), Record); in VisitPackExpansionExpr()
1531 Record.push_back(E->NumExpansions); in VisitPackExpansionExpr()
1532 Writer.AddStmt(E->getPattern()); in VisitPackExpansionExpr()
1536 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) { in VisitSizeOfPackExpr() argument
1537 VisitExpr(E); in VisitSizeOfPackExpr()
1538 Writer.AddSourceLocation(E->OperatorLoc, Record); in VisitSizeOfPackExpr()
1539 Writer.AddSourceLocation(E->PackLoc, Record); in VisitSizeOfPackExpr()
1540 Writer.AddSourceLocation(E->RParenLoc, Record); in VisitSizeOfPackExpr()
1541 Record.push_back(E->Length); in VisitSizeOfPackExpr()
1542 Writer.AddDeclRef(E->Pack, Record); in VisitSizeOfPackExpr()
1547 SubstNonTypeTemplateParmExpr *E) { in VisitSubstNonTypeTemplateParmExpr() argument
1548 VisitExpr(E); in VisitSubstNonTypeTemplateParmExpr()
1549 Writer.AddDeclRef(E->getParameter(), Record); in VisitSubstNonTypeTemplateParmExpr()
1550 Writer.AddSourceLocation(E->getNameLoc(), Record); in VisitSubstNonTypeTemplateParmExpr()
1551 Writer.AddStmt(E->getReplacement()); in VisitSubstNonTypeTemplateParmExpr()
1556 SubstNonTypeTemplateParmPackExpr *E) { in VisitSubstNonTypeTemplateParmPackExpr() argument
1557 VisitExpr(E); in VisitSubstNonTypeTemplateParmPackExpr()
1558 Writer.AddDeclRef(E->getParameterPack(), Record); in VisitSubstNonTypeTemplateParmPackExpr()
1559 Writer.AddTemplateArgument(E->getArgumentPack(), Record); in VisitSubstNonTypeTemplateParmPackExpr()
1560 Writer.AddSourceLocation(E->getParameterPackLocation(), Record); in VisitSubstNonTypeTemplateParmPackExpr()
1564 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) { in VisitFunctionParmPackExpr() argument
1565 VisitExpr(E); in VisitFunctionParmPackExpr()
1566 Record.push_back(E->getNumExpansions()); in VisitFunctionParmPackExpr()
1567 Writer.AddDeclRef(E->getParameterPack(), Record); in VisitFunctionParmPackExpr()
1568 Writer.AddSourceLocation(E->getParameterPackLocation(), Record); in VisitFunctionParmPackExpr()
1569 for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end(); in VisitFunctionParmPackExpr()
1575 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) { in VisitMaterializeTemporaryExpr() argument
1576 VisitExpr(E); in VisitMaterializeTemporaryExpr()
1577 Writer.AddStmt(E->getTemporary()); in VisitMaterializeTemporaryExpr()
1578 Writer.AddDeclRef(E->getExtendingDecl(), Record); in VisitMaterializeTemporaryExpr()
1579 Record.push_back(E->getManglingNumber()); in VisitMaterializeTemporaryExpr()
1583 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) { in VisitCXXFoldExpr() argument
1584 VisitExpr(E); in VisitCXXFoldExpr()
1585 Writer.AddSourceLocation(E->LParenLoc, Record); in VisitCXXFoldExpr()
1586 Writer.AddSourceLocation(E->EllipsisLoc, Record); in VisitCXXFoldExpr()
1587 Writer.AddSourceLocation(E->RParenLoc, Record); in VisitCXXFoldExpr()
1588 Writer.AddStmt(E->SubExprs[0]); in VisitCXXFoldExpr()
1589 Writer.AddStmt(E->SubExprs[1]); in VisitCXXFoldExpr()
1590 Record.push_back(E->Opcode); in VisitCXXFoldExpr()
1594 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) { in VisitOpaqueValueExpr() argument
1595 VisitExpr(E); in VisitOpaqueValueExpr()
1596 Writer.AddStmt(E->getSourceExpr()); in VisitOpaqueValueExpr()
1597 Writer.AddSourceLocation(E->getLocation(), Record); in VisitOpaqueValueExpr()
1601 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) { in VisitTypoExpr() argument
1602 VisitExpr(E); in VisitTypoExpr()
1611 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) { in VisitCUDAKernelCallExpr() argument
1612 VisitCallExpr(E); in VisitCUDAKernelCallExpr()
1613 Writer.AddStmt(E->getConfig()); in VisitCUDAKernelCallExpr()
1620 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) { in VisitAsTypeExpr() argument
1621 VisitExpr(E); in VisitAsTypeExpr()
1622 Writer.AddSourceLocation(E->getBuiltinLoc(), Record); in VisitAsTypeExpr()
1623 Writer.AddSourceLocation(E->getRParenLoc(), Record); in VisitAsTypeExpr()
1624 Writer.AddStmt(E->getSrcExpr()); in VisitAsTypeExpr()
1631 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) { in VisitMSPropertyRefExpr() argument
1632 VisitExpr(E); in VisitMSPropertyRefExpr()
1633 Record.push_back(E->isArrow()); in VisitMSPropertyRefExpr()
1634 Writer.AddStmt(E->getBaseExpr()); in VisitMSPropertyRefExpr()
1635 Writer.AddNestedNameSpecifierLoc(E->getQualifierLoc(), Record); in VisitMSPropertyRefExpr()
1636 Writer.AddSourceLocation(E->getMemberLoc(), Record); in VisitMSPropertyRefExpr()
1637 Writer.AddDeclRef(E->getPropertyDecl(), Record); in VisitMSPropertyRefExpr()
1641 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) { in VisitCXXUuidofExpr() argument
1642 VisitExpr(E); in VisitCXXUuidofExpr()
1643 Writer.AddSourceRange(E->getSourceRange(), Record); in VisitCXXUuidofExpr()
1644 if (E->isTypeOperand()) { in VisitCXXUuidofExpr()
1645 Writer.AddTypeSourceInfo(E->getTypeOperandSourceInfo(), Record); in VisitCXXUuidofExpr()
1648 Writer.AddStmt(E->getExprOperand()); in VisitCXXUuidofExpr()
1801 for (auto *E : C->private_copies()) in VisitOMPLastprivateClause() local
1802 Writer->Writer.AddStmt(E); in VisitOMPLastprivateClause()
1803 for (auto *E : C->source_exprs()) in VisitOMPLastprivateClause() local
1804 Writer->Writer.AddStmt(E); in VisitOMPLastprivateClause()
1805 for (auto *E : C->destination_exprs()) in VisitOMPLastprivateClause() local
1806 Writer->Writer.AddStmt(E); in VisitOMPLastprivateClause()
1807 for (auto *E : C->assignment_ops()) in VisitOMPLastprivateClause() local
1808 Writer->Writer.AddStmt(E); in VisitOMPLastprivateClause()
1826 for (auto *E : C->lhs_exprs()) in VisitOMPReductionClause() local
1827 Writer->Writer.AddStmt(E); in VisitOMPReductionClause()
1828 for (auto *E : C->rhs_exprs()) in VisitOMPReductionClause() local
1829 Writer->Writer.AddStmt(E); in VisitOMPReductionClause()
1830 for (auto *E : C->reduction_ops()) in VisitOMPReductionClause() local
1831 Writer->Writer.AddStmt(E); in VisitOMPReductionClause()
1868 for (auto *E : C->source_exprs()) in VisitOMPCopyinClause() local
1869 Writer->Writer.AddStmt(E); in VisitOMPCopyinClause()
1870 for (auto *E : C->destination_exprs()) in VisitOMPCopyinClause() local
1871 Writer->Writer.AddStmt(E); in VisitOMPCopyinClause()
1872 for (auto *E : C->assignment_ops()) in VisitOMPCopyinClause() local
1873 Writer->Writer.AddStmt(E); in VisitOMPCopyinClause()
1881 for (auto *E : C->source_exprs()) in VisitOMPCopyprivateClause() local
1882 Writer->Writer.AddStmt(E); in VisitOMPCopyprivateClause()
1883 for (auto *E : C->destination_exprs()) in VisitOMPCopyprivateClause() local
1884 Writer->Writer.AddStmt(E); in VisitOMPCopyprivateClause()
1885 for (auto *E : C->assignment_ops()) in VisitOMPCopyprivateClause() local
1886 Writer->Writer.AddStmt(E); in VisitOMPCopyprivateClause()
1899 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) { in VisitOMPExecutableDirective() argument
1900 Writer.AddSourceLocation(E->getLocStart(), Record); in VisitOMPExecutableDirective()
1901 Writer.AddSourceLocation(E->getLocEnd(), Record); in VisitOMPExecutableDirective()
1903 for (unsigned i = 0; i < E->getNumClauses(); ++i) { in VisitOMPExecutableDirective()
1904 ClauseWriter.writeClause(E->getClause(i)); in VisitOMPExecutableDirective()
1906 if (E->hasAssociatedStmt()) in VisitOMPExecutableDirective()
1907 Writer.AddStmt(E->getAssociatedStmt()); in VisitOMPExecutableDirective()