Home | History | Annotate | Download | only in AST

Lines Matching refs:Node

124     /// Dump a child of the current node.
144 // children of this node. For instance:
228 void dumpBareDeclRef(const Decl *Node);
229 void dumpDeclRef(const Decl *Node, const char *Label = nullptr);
497 void VisitStmt(const Stmt *Node);
498 void VisitDeclStmt(const DeclStmt *Node);
499 void VisitAttributedStmt(const AttributedStmt *Node);
500 void VisitLabelStmt(const LabelStmt *Node);
501 void VisitGotoStmt(const GotoStmt *Node);
502 void VisitCXXCatchStmt(const CXXCatchStmt *Node);
503 void VisitCapturedStmt(const CapturedStmt *Node);
506 void VisitOMPExecutableDirective(const OMPExecutableDirective *Node);
509 void VisitExpr(const Expr *Node);
510 void VisitCastExpr(const CastExpr *Node);
511 void VisitDeclRefExpr(const DeclRefExpr *Node);
512 void VisitPredefinedExpr(const PredefinedExpr *Node);
513 void VisitCharacterLiteral(const CharacterLiteral *Node);
514 void VisitIntegerLiteral(const IntegerLiteral *Node);
515 void VisitFloatingLiteral(const FloatingLiteral *Node);
518 void VisitUnaryOperator(const UnaryOperator *Node);
519 void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node);
520 void VisitMemberExpr(const MemberExpr *Node);
521 void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node);
522 void VisitBinaryOperator(const BinaryOperator *Node);
523 void VisitCompoundAssignOperator(const CompoundAssignOperator *Node);
524 void VisitAddrLabelExpr(const AddrLabelExpr *Node);
525 void VisitBlockExpr(const BlockExpr *Node);
526 void VisitOpaqueValueExpr(const OpaqueValueExpr *Node);
529 void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node);
530 void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node);
531 void VisitCXXThisExpr(const CXXThisExpr *Node);
532 void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node);
533 void VisitCXXConstructExpr(const CXXConstructExpr *Node);
534 void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node);
535 void VisitCXXNewExpr(const CXXNewExpr *Node);
536 void VisitCXXDeleteExpr(const CXXDeleteExpr *Node);
537 void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node);
538 void VisitExprWithCleanups(const ExprWithCleanups *Node);
539 void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node);
541 void VisitLambdaExpr(const LambdaExpr *Node) {
542 VisitExpr(Node);
543 dumpDecl(Node->getLambdaClass());
545 void VisitSizeOfPackExpr(const SizeOfPackExpr *Node);
548 void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node);
549 void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node);
550 void VisitObjCMessageExpr(const ObjCMessageExpr *Node);
551 void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node);
552 void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node);
553 void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node);
554 void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node);
555 void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
556 void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
557 void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
1767 void ASTDumper::VisitStmt(const Stmt *Node) {
1770 OS << Node->getStmtClassName();
1772 dumpPointer(Node);
1773 dumpSourceRange(Node->getSourceRange());
1776 void ASTDumper::VisitDeclStmt(const DeclStmt *Node) {
1777 VisitStmt(Node);
1778 for (DeclStmt::const_decl_iterator I = Node->decl_begin(),
1779 E = Node->decl_end();
1784 void ASTDumper::VisitAttributedStmt(const AttributedStmt *Node) {
1785 VisitStmt(Node);
1786 for (ArrayRef<const Attr *>::iterator I = Node->getAttrs().begin(),
1787 E = Node->getAttrs().end();
1792 void ASTDumper::VisitLabelStmt(const LabelStmt *Node) {
1793 VisitStmt(Node);
1794 OS << " '" << Node->getName() << "'";
1797 void ASTDumper::VisitGotoStmt(const GotoStmt *Node) {
1798 VisitStmt(Node);
1799 OS << " '" << Node->getLabel()->getName() << "'";
1800 dumpPointer(Node->getLabel());
1803 void ASTDumper::VisitCXXCatchStmt(const CXXCatchStmt *Node) {
1804 VisitStmt(Node);
1805 dumpDecl(Node->getExceptionDecl());
1808 void ASTDumper::VisitCapturedStmt(const CapturedStmt *Node) {
1809 VisitStmt(Node);
1810 dumpDecl(Node->getCapturedDecl());
1818 const OMPExecutableDirective *Node) {
1819 VisitStmt(Node);
1820 for (auto *C : Node->clauses()) {
1847 void ASTDumper::VisitExpr(const Expr *Node) {
1848 VisitStmt(Node);
1849 dumpType(Node->getType());
1853 switch (Node->getValueKind()) {
1867 switch (Node->getObjectKind()) {
1886 static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) {
1887 if (Node->path_empty())
1892 for (CastExpr::path_const_iterator I = Node->path_begin(),
1893 E = Node->path_end();
1911 void ASTDumper::VisitCastExpr(const CastExpr *Node) {
1912 VisitExpr(Node);
1916 OS << Node->getCastKindName();
1918 dumpBasePath(OS, Node);
1922 void ASTDumper::VisitDeclRefExpr(const DeclRefExpr *Node) {
1923 VisitExpr(Node);
1926 dumpBareDeclRef(Node->getDecl());
1927 if (Node->getDecl() != Node->getFoundDecl()) {
1929 dumpBareDeclRef(Node->getFoundDecl());
1934 void ASTDumper::VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node) {
1935 VisitExpr(Node);
1937 if (!Node->requiresADL())
1939 OS << "ADL) = '" << Node->getName() << '\'';
1942 I = Node->decls_begin(), E = Node->decls_end();
1949 void ASTDumper::VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node) {
1950 VisitExpr(Node);
1954 OS << " " << Node->getDecl()->getDeclKindName() << "Decl";
1956 OS << "='" << *Node->getDecl() << "'";
1957 dumpPointer(Node->getDecl());
1958 if (Node->isFreeIvar())
1962 void ASTDumper::VisitPredefinedExpr(const PredefinedExpr *Node) {
1963 VisitExpr(Node);
1964 OS << " " << PredefinedExpr::getIdentTypeName(Node->getIdentType());
1967 void ASTDumper::VisitCharacterLiteral(const CharacterLiteral *Node) {
1968 VisitExpr(Node);
1970 OS << " " << Node->getValue();
1973 void ASTDumper::VisitIntegerLiteral(const IntegerLiteral *Node) {
1974 VisitExpr(Node);
1976 bool isSigned = Node->getType()->isSignedIntegerType();
1978 OS << " " << Node->getValue().toString(10, isSigned);
1981 void ASTDumper::VisitFloatingLiteral(const FloatingLiteral *Node) {
1982 VisitExpr(Node);
1984 OS << " " << Node->getValueAsApproximateDouble();
2008 void ASTDumper::VisitUnaryOperator(const UnaryOperator *Node) {
2009 VisitExpr(Node);
2010 OS << " " << (Node->isPostfix() ? "postfix" : "prefix")
2011 << " '" << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
2015 const UnaryExprOrTypeTraitExpr *Node) {
2016 VisitExpr(Node);
2017 switch(Node->getKind()) {
2031 if (Node->isArgumentType())
2032 dumpType(Node->getArgumentType());
2035 void ASTDumper::VisitMemberExpr(const MemberExpr *Node) {
2036 VisitExpr(Node);
2037 OS << " " << (Node->isArrow() ? "->" : ".") << *Node->getMemberDecl();
2038 dumpPointer(Node->getMemberDecl());
2041 void ASTDumper::VisitExtVectorElementExpr(const ExtVectorElementExpr *Node) {
2042 VisitExpr(Node);
2043 OS << " " << Node->getAccessor().getNameStart();
2046 void ASTDumper::VisitBinaryOperator(const BinaryOperator *Node) {
2047 VisitExpr(Node);
2048 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
2052 const CompoundAssignOperator *Node) {
2053 VisitExpr(Node);
2054 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode())
2056 dumpBareType(Node->getComputationLHSType());
2058 dumpBareType(Node->getComputationResultType());
2061 void ASTDumper::VisitBlockExpr(const BlockExpr *Node) {
2062 VisitExpr(Node);
2063 dumpDecl(Node->getBlockDecl());
2066 void ASTDumper::VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
2067 VisitExpr(Node);
2069 if (Expr *Source = Node->getSourceExpr())
2075 void ASTDumper::VisitAddrLabelExpr(const AddrLabelExpr *Node) {
2076 VisitExpr(Node);
2077 OS << " " << Node->getLabel()->getName();
2078 dumpPointer(Node->getLabel());
2085 void ASTDumper::VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node) {
2086 VisitExpr(Node);
2087 OS << " " << Node->getCastName()
2088 << "<" << Node->getTypeAsWritten().getAsString() << ">"
2089 << " <" << Node->getCastKindName();
2090 dumpBasePath(OS, Node);
2094 void ASTDumper::VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node) {
2095 VisitExpr(Node);
2096 OS << " " << (Node->getValue() ? "true" : "false");
2099 void ASTDumper::VisitCXXThisExpr(const CXXThisExpr *Node) {
2100 VisitExpr(Node);
2104 void ASTDumper::VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node) {
2105 VisitExpr(Node);
2106 OS << " functional cast to " << Node->getTypeAsWritten().getAsString()
2107 << " <" << Node->getCastKindName() << ">";
2110 void ASTDumper::VisitCXXConstructExpr(const CXXConstructExpr *Node) {
2111 VisitExpr(Node);
2112 CXXConstructorDecl *Ctor = Node->getConstructor();
2114 if (Node->isElidable())
2116 if (Node->requiresZeroInitialization())
2120 void ASTDumper::VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node) {
2121 VisitExpr(Node);
2123 dumpCXXTemporary(Node->getTemporary());
2126 Node) {
2127 VisitExpr(Node);
2128 if (Node->isGlobalNew())
2130 if (Node->isArray())
2132 if (Node->getOperatorNew()) {
2134 dumpBareDeclRef(Node->getOperatorNew());
2140 void ASTDumper::VisitCXXDeleteExpr(const CXXDeleteExpr *Node) {
2141 VisitExpr(Node);
2142 if (Node->isGlobalDelete())
2144 if (Node->isArrayForm())
2146 if (Node->getOperatorDelete()) {
2148 dumpBareDeclRef(Node->getOperatorDelete());
2153 ASTDumper::VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node) {
2154 VisitExpr(Node);
2155 if (const ValueDecl *VD = Node->getExtendingDecl()) {
2161 void ASTDumper::VisitExprWithCleanups(const ExprWithCleanups *Node) {
2162 VisitExpr(Node);
2163 for (unsigned i = 0, e = Node->getNumObjects(); i != e; ++i)
2164 dumpDeclRef(Node->getObject(i), "cleanup");
2173 void ASTDumper::VisitSizeOfPackExpr(const SizeOfPackExpr *Node) {
2174 VisitExpr(Node);
2175 dumpPointer(Node->getPack());
2176 dumpName(Node->getPack());
2177 if (Node->isPartiallySubstituted())
2178 for (const auto &A : Node->getPartialArguments())
2187 void ASTDumper::VisitObjCMessageExpr(const ObjCMessageExpr *Node) {
2188 VisitExpr(Node);
2190 Node->getSelector().print(OS);
2191 switch (Node->getReceiverKind()) {
2197 dumpBareType(Node->getClassReceiver());
2210 void ASTDumper::VisitObjCBoxedExpr(const ObjCBoxedExpr *Node) {
2211 VisitExpr(Node);
2212 if (auto *BoxingMethod = Node->getBoxingMethod()) {
2218 void ASTDumper::VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
2219 VisitStmt(Node);
2220 if (const VarDecl *CatchParam = Node->getCatchParamDecl())
2226 void ASTDumper::VisitObjCEncodeExpr(const ObjCEncodeExpr *Node) {
2227 VisitExpr(Node);
2228 dumpType(Node->getEncodedType());
2231 void ASTDumper::VisitObjCSelectorExpr(const ObjCSelectorExpr *Node) {
2232 VisitExpr(Node);
2235 Node->getSelector().print(OS);
2238 void ASTDumper::VisitObjCProtocolExpr(const ObjCProtocolExpr *Node) {
2239 VisitExpr(Node);
2241 OS << ' ' << *Node->getProtocol();
2244 void ASTDumper::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node) {
2245 VisitExpr(Node);
2246 if (Node->isImplicitProperty()) {
2248 if (Node->getImplicitPropertyGetter())
2249 Node->getImplicitPropertyGetter()->getSelector().print(OS);
2254 if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter())
2260 OS << " Kind=PropertyRef Property=\"" << *Node->getExplicitProperty() <<'"';
2263 if (Node->isSuperReceiver())
2267 if (Node->isMessagingGetter() && Node->isMessagingSetter())
2269 else if (Node->isMessagingGetter())
2271 else if (Node->isMessagingSetter())
2275 void ASTDumper::VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node) {
2276 VisitExpr(Node);
2277 if (Node->isArraySubscriptRefExpr())
2281 if (Node->getAtIndexMethodDecl())
2282 Node->getAtIndexMethodDecl()->getSelector().print(OS);
2286 if (Node->isArraySubscriptRefExpr())
2290 if (Node->setAtIndexMethodDecl())
2291 Node->setAtIndexMethodDecl()->getSelector().print(OS);
2296 void ASTDumper::VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node) {
2297 VisitExpr(Node);
2298 OS << " " << (Node->getValue() ? "__objc_yes" : "__objc_no");