ROSE 0.11.145.192
sageGeneric.h
Go to the documentation of this file.
1#ifndef _SAGEGENERIC_H
2
3#define _SAGEGENERIC_H 1
4
11
12// note: the comments are right aligned to support code-blocks doxygen 1.3.X :)
13
14#include <Cxx_GrammarVisitorSupport.h>
15#include <type_traits>
16
17#if !defined(NDEBUG)
18#include <typeinfo>
19#include <sstream>
20#endif /* NDEBUG */
21
22#define WITH_BINARY_NODES 0
23#define WITH_UNTYPED_NODES 0
24
25// #include "Cxx_Grammar.h"
26
27// DQ (10/5/2014): We can't include this here.
28// #include "rose.h"
29
30#define SG_UNEXPECTED_NODE(X) (sg::unexpected_node(X, __FILE__, __LINE__))
31#define SG_DEREF(X) (sg::deref(X, __FILE__, __LINE__))
32#define SG_ASSERT_TYPE(SAGENODE, N) (sg::assert_sage_type<SAGENODE>(N, __FILE__, __LINE__))
33#define SG_ERROR_IF(COND, MSG) (sg::report_error_if(COND, MSG, __FILE__, __LINE__))
34
35
37namespace sg
38{
39 //
40 // non sage specific utilities
41
44 template <class T>
45 static inline
46 void unused(const T&) {}
47
49 template <class T1, class T2>
50 struct ConstLike
51 {
52 typedef T2 type;
53 };
54
55 template <class T1, class T2>
56 struct ConstLike<const T1, T2>
57 {
58 typedef const T2 type;
59 };
60
61 //
62 // error reporting
63
65 template <class T, class E>
66 static inline
67 T conv(const E& el)
68 {
69 T res;
70#if !defined(NDEBUG)
71 std::stringstream s;
72
73 s << el;
74 s >> res;
75#endif /* NDEBUG */
76 return res;
77 }
78
79 // \note implemented in SageInterfaceAda.h
80 // \{
81 [[noreturn]]
82 void report_error(std::string desc, const char* file = nullptr, size_t ln = 0);
83
84 [[noreturn]]
85 void unexpected_node(const SgNode& n, const char* file = nullptr, size_t ln = 0);
87
88
89 static inline
90 void report_error_if(bool iserror, const std::string& desc, const char* file = nullptr, size_t ln = 0)
91 {
92 if (!iserror) return;
93
94 report_error(desc, file, ln);
95 }
96
98 template <class T>
99 T& deref(T* ptr, const char* file = 0, size_t ln = 0)
100 {
101 report_error_if(!ptr, "assertion failed: null dereference ", file, ln);
102 return *ptr;
103 }
104
105 template <bool conv>
106 struct ConditionalEnable : std::true_type // enable
107 {};
108
109 template <>
110 struct ConditionalEnable<false> // disable
111 {};
112
113 template <class U, class T>
114 struct EnableConversion : ConditionalEnable<!std::is_same<U,T>::value && std::is_convertible<U,T>::value>
115 {};
116
118 template <class T>
119 struct NotNull
120 {
124 // not explicit to enable auto-conversion
126 : ptr(p)
127 {
128 SG_ERROR_IF(ptr == nullptr, "failed null pointer check.");
129 }
130
131 NotNull(const NotNull&) = default;
132 NotNull& operator=(const NotNull&) = default;
133 ~NotNull() = default;
134
139 template <class U, bool = EnableConversion<U*,T*>::value>
141 : ptr(nn.pointer())
142 {}
143
145 T& operator*() const { return *ptr; }
146
148 T* operator->() const { return ptr; }
149
151 operator T*() const { return ptr; }
152
154 T* pointer() const { return ptr; }
155
156 private:
157 T* ptr; // must be initialized in ctors
158
159 // no default construction
160 NotNull() = delete;
161
162 // NEITHER delete NOR define move ctor/assignment,
163 // to make the compiler use the copy-versions.
164 // NotNull(NotNull&&) = delete;
165 // NotNull& operator(NotNull&&) = delete;
166 };
167
168 template <class T, class U, bool = EnableConversion<U*,T*>::value || EnableConversion<T*,U*>::value>
169 bool operator<(NotNull<T> lhs, NotNull<U> rhs)
170 {
171 return lhs.pointer() < rhs.pointer();
172 }
173
184 template <class _ReturnType>
186 {
187 typedef _ReturnType ReturnType;
189
191 : res()
192 {}
193
194 explicit
195 DispatchHandler(const ReturnType& defaultval)
196 : res(defaultval)
197 {}
198
199 operator ReturnType() const { return res; }
200
201 protected:
202 ReturnType res;
203 };
204
205
206 //
207 // Sage query functions
208
210 template <class SageNode>
211 static inline
212 SageNode& assume_sage_type(SgNode& n)
213 {
214 return static_cast<SageNode&>(n);
215 }
216
219 template <class SageNode>
220 static inline
221 const SageNode& assume_sage_type(const SgNode& n)
222 {
223 return static_cast<const SageNode&>(n);
224 }
225
226#define GEN_VISIT(X) \
227 void visit(X * n) { rv.handle(*n); }
228
229 template <class RoseVisitor>
231 {
232 // rvalue ctor
233 VisitDispatcher(RoseVisitor&& rosevisitor, std::false_type)
234 : rv(std::move(rosevisitor))
235 {}
236
237 // lvalue ctor
238 VisitDispatcher(const RoseVisitor& rosevisitor, std::true_type)
239 : rv(rosevisitor)
240 {}
241
242 GEN_VISIT(SgAccessModifier)
244 GEN_VISIT(SgAbsOp)
245 GEN_VISIT(SgAdaAccessType)
246 GEN_VISIT(SgAdaAcceptStmt)
247 GEN_VISIT(SgAdaComponentClause)
248 GEN_VISIT(SgAdaDelayStmt)
249 GEN_VISIT(SgAdaEntryDecl)
250 GEN_VISIT(SgAdaExitStmt)
251 GEN_VISIT(SgAdaDiscreteType)
252 GEN_VISIT(SgAdaFloatVal)
253 GEN_VISIT(SgAdaFormalType)
254 GEN_VISIT(SgAdaFormalTypeDecl)
256 GEN_VISIT(SgAdaGenericDecl)
257 GEN_VISIT(SgAdaGenericInstanceDecl)
258 GEN_VISIT(SgAdaGenericDefn)
259 GEN_VISIT(SgAdaIndexConstraint)
260 GEN_VISIT(SgAdaAttributeClause)
261 GEN_VISIT(SgAdaLoopStmt)
262 GEN_VISIT(SgAdaModularType)
263 GEN_VISIT(SgAdaPackageBody)
264 GEN_VISIT(SgAdaPackageBodyDecl)
265 GEN_VISIT(SgAdaPackageSpec)
266 GEN_VISIT(SgAdaPackageSpecDecl)
267 GEN_VISIT(SgAdaPackageSymbol)
268 GEN_VISIT(SgAdaRangeConstraint)
271 GEN_VISIT(SgAdaRenamingDecl)
272 GEN_VISIT(SgAdaSelectStmt)
274 GEN_VISIT(SgAdaSubtype)
275 GEN_VISIT(SgAdaDerivedType)
276 GEN_VISIT(SgAdaAttributeExp)
277 GEN_VISIT(SgAdaTaskBody)
278 GEN_VISIT(SgAdaTaskBodyDecl)
279 GEN_VISIT(SgAdaTaskSpec)
280 GEN_VISIT(SgAdaTaskSpecDecl)
281 GEN_VISIT(SgAdaTaskSymbol)
282 GEN_VISIT(SgAdaRenamingSymbol)
283 GEN_VISIT(SgAdaTaskRefExp)
284 GEN_VISIT(SgAdaRenamingRefExp)
285 GEN_VISIT(SgAdaTaskType)
286 GEN_VISIT(SgAdaTaskTypeDecl)
287 GEN_VISIT(SgAdaTerminateStmt)
288 GEN_VISIT(SgAdaTypeConstraint)
289 GEN_VISIT(SgAddOp)
290 GEN_VISIT(SgAddressOfOp)
291 GEN_VISIT(SgAggregateInitializer)
292 GEN_VISIT(SgAliasSymbol)
293 GEN_VISIT(SgAllocateStatement)
294 GEN_VISIT(SgAndAssignOp)
295 GEN_VISIT(SgAndOp)
296 GEN_VISIT(SgArithmeticIfStatement)
297 GEN_VISIT(SgArrayType)
298 GEN_VISIT(SgArrowExp)
299 GEN_VISIT(SgArrowStarOp)
300 GEN_VISIT(SgAssertStmt)
301 GEN_VISIT(SgAssignInitializer)
302 GEN_VISIT(SgAssignOp)
303 GEN_VISIT(SgAssignStatement)
304 GEN_VISIT(SgAssignedGotoStatement)
305 GEN_VISIT(SgAssociateStatement)
306 GEN_VISIT(SgAsteriskShapeExp)
307 GEN_VISIT(SgAtOp)
308 GEN_VISIT(SgAttribute)
310 GEN_VISIT(SgAutoType)
311 GEN_VISIT(SgAwaitExpression)
312 GEN_VISIT(SgBackspaceStatement)
313 GEN_VISIT(SgBaseClass)
314 GEN_VISIT(SgExpBaseClass)
315 GEN_VISIT(SgBaseClassModifier)
316 GEN_VISIT(SgBasicBlock)
317 GEN_VISIT(SgBidirectionalGraph)
318 GEN_VISIT(SgBinaryOp)
319 GEN_VISIT(SgBitAndOp)
320 GEN_VISIT(SgBitAttribute)
321 GEN_VISIT(SgBitComplementOp)
322 GEN_VISIT(SgBitEqvOp)
323 GEN_VISIT(SgBitOrOp)
324 GEN_VISIT(SgBitXorOp)
325 GEN_VISIT(SgBlockDataStatement)
326 GEN_VISIT(SgBoolValExp)
327 GEN_VISIT(SgBreakStmt)
328 GEN_VISIT(SgBracedInitializer)
330 GEN_VISIT(SgCaseOptionStmt)
331 GEN_VISIT(SgCastExp)
332 GEN_VISIT(SgCatchOptionStmt)
333 GEN_VISIT(SgCatchStatementSeq)
334 GEN_VISIT(SgCharVal)
335 GEN_VISIT(SgChar16Val)
336 GEN_VISIT(SgChar32Val)
337 GEN_VISIT(SgChooseExpression)
338 GEN_VISIT(SgClassDecl_attr)
339 GEN_VISIT(SgClassDeclaration)
340 GEN_VISIT(SgClassDefinition)
341 GEN_VISIT(SgClassNameRefExp)
342 GEN_VISIT(SgClassSymbol)
343 GEN_VISIT(SgClassType)
345 GEN_VISIT(SgClinkageEndStatement)
346 GEN_VISIT(SgClinkageStartStatement)
347 GEN_VISIT(SgCloseStatement)
348 GEN_VISIT(SgColonShapeExp)
349 GEN_VISIT(SgCommaOpExp)
350 GEN_VISIT(SgCommonBlock)
351 GEN_VISIT(SgCommonBlockObject)
352 GEN_VISIT(SgCommonSymbol)
353 GEN_VISIT(SgComplexVal)
354 GEN_VISIT(SgComprehension)
355 GEN_VISIT(SgCompoundAssignOp)
356 GEN_VISIT(SgCompoundInitializer)
357 GEN_VISIT(SgCompoundLiteralExp)
358 GEN_VISIT(SgComputedGotoStatement)
359 GEN_VISIT(SgConcatenationOp)
360 GEN_VISIT(SgConditionalExp)
361 GEN_VISIT(SgConjugateOp)
362 GEN_VISIT(SgConstVolatileModifier)
363 GEN_VISIT(SgConstructorInitializer)
364 GEN_VISIT(SgContainsStatement)
365 GEN_VISIT(SgContinueStmt)
366 GEN_VISIT(SgCtorInitializerList)
367 GEN_VISIT(SgDataStatementGroup)
368 GEN_VISIT(SgDataStatementObject)
369 GEN_VISIT(SgDataStatementValue)
371 GEN_VISIT(SgDeallocateStatement)
372 GEN_VISIT(SgDeclarationModifier)
373 GEN_VISIT(SgDeclarationScope)
374 GEN_VISIT(SgDeclarationStatement)
375 GEN_VISIT(SgDeclType)
376 GEN_VISIT(SgDefaultOptionStmt)
377 GEN_VISIT(SgDefaultSymbol)
379 GEN_VISIT(SgDeleteExp)
380 GEN_VISIT(SgDerivedTypeStatement)
381 GEN_VISIT(SgDesignatedInitializer)
383 GEN_VISIT(SgDictionaryExp)
384 GEN_VISIT(SgDimensionObject)
385 GEN_VISIT(SgDirectory)
386 GEN_VISIT(SgDirectoryList)
387 GEN_VISIT(SgDivAssignOp)
388 GEN_VISIT(SgDivideOp)
389 GEN_VISIT(SgDoWhileStmt)
390 GEN_VISIT(SgDotExp)
391 GEN_VISIT(SgDotStarOp)
392 GEN_VISIT(SgDoubleVal)
393 GEN_VISIT(SgElaboratedTypeModifier)
394 GEN_VISIT(SgElementwiseOp)
395 GEN_VISIT(SgElementwiseAddOp)
396 GEN_VISIT(SgElementwiseDivideOp)
398 GEN_VISIT(SgElementwiseMultiplyOp)
399 GEN_VISIT(SgElementwisePowerOp)
400 GEN_VISIT(SgElementwiseSubtractOp)
401 GEN_VISIT(SgElseDirectiveStatement)
402 GEN_VISIT(SgElseWhereStatement)
404 GEN_VISIT(SgEmptyDeclaration)
406 GEN_VISIT(SgEndfileStatement)
408 GEN_VISIT(SgEntryStatement)
409 GEN_VISIT(SgEnumDeclaration)
410 GEN_VISIT(SgEnumFieldSymbol)
411 GEN_VISIT(SgEnumSymbol)
412 GEN_VISIT(SgEnumType)
413 GEN_VISIT(SgEnumVal)
414 GEN_VISIT(SgEqualityOp)
415 GEN_VISIT(SgEquivalenceStatement)
417 GEN_VISIT(SgExecStatement)
418 GEN_VISIT(SgExponentiationOp)
419 GEN_VISIT(SgExponentiationAssignOp)
420 GEN_VISIT(SgExprListExp)
421 GEN_VISIT(SgExprStatement)
422 GEN_VISIT(SgExpression)
423 GEN_VISIT(SgExpressionRoot)
424 GEN_VISIT(SgFile)
425 GEN_VISIT(SgFileList)
426 GEN_VISIT(SgFloatVal)
427 GEN_VISIT(SgFloat128Val)
428 GEN_VISIT(SgFloat80Val)
429 GEN_VISIT(SgFoldExpression)
430 GEN_VISIT(SgFlushStatement)
431 GEN_VISIT(SgForAllStatement)
432 GEN_VISIT(SgForInitStatement)
433 GEN_VISIT(SgForStatement)
434 GEN_VISIT(SgFormatItem)
435 GEN_VISIT(SgFormatItemList)
436 GEN_VISIT(SgFormatStatement)
437 GEN_VISIT(SgFortranDo)
438 GEN_VISIT(SgFortranIncludeLine)
439 GEN_VISIT(SgFortranNonblockedDo)
440 GEN_VISIT(SgFuncDecl_attr)
441 GEN_VISIT(SgFunctionCallExp)
442 GEN_VISIT(SgFunctionDeclaration)
443 GEN_VISIT(SgFunctionDefinition)
444 GEN_VISIT(SgFunctionParameterScope)
445 GEN_VISIT(SgFunctionModifier)
446 GEN_VISIT(SgFunctionParameterList)
449 GEN_VISIT(SgFunctionRefExp)
450 GEN_VISIT(SgFunctionSymbol)
451 GEN_VISIT(SgFunctionType)
452 GEN_VISIT(SgFunctionTypeSymbol)
453 GEN_VISIT(SgFunctionTypeTable)
454 GEN_VISIT(SgTypeTable)
455 GEN_VISIT(SgGlobal)
456 GEN_VISIT(SgGotoStatement)
457 GEN_VISIT(SgGraph)
458 GEN_VISIT(SgGraphEdge)
459 GEN_VISIT(SgGraphEdgeList)
460 GEN_VISIT(SgGraphNode)
461 GEN_VISIT(SgGraphNodeList)
462 GEN_VISIT(SgGreaterOrEqualOp)
463 GEN_VISIT(SgGreaterThanOp)
464 GEN_VISIT(SgIOItemExpression)
465 GEN_VISIT(SgIOStatement)
467 GEN_VISIT(SgIfDirectiveStatement)
468 GEN_VISIT(SgIfStmt)
471 GEN_VISIT(SgImageControlStatement)
472 GEN_VISIT(SgImagPartOp)
473 GEN_VISIT(SgImplicitStatement)
474 GEN_VISIT(SgImpliedDo)
475 GEN_VISIT(SgImportStatement)
476 GEN_VISIT(SgIncidenceDirectedGraph)
479 GEN_VISIT(SgIncludeFile)
481 GEN_VISIT(SgInitializedName)
482 GEN_VISIT(SgInitializer)
483 GEN_VISIT(SgInquireStatement)
485 GEN_VISIT(SgIntVal)
486 GEN_VISIT(SgIntegerDivideOp)
487 GEN_VISIT(SgIntegerDivideAssignOp)
488 GEN_VISIT(SgInterfaceBody)
489 GEN_VISIT(SgHeaderFileBody)
490 GEN_VISIT(SgHeaderFileReport)
491 GEN_VISIT(SgInterfaceStatement)
492 GEN_VISIT(SgInterfaceSymbol)
493 GEN_VISIT(SgIntrinsicSymbol)
494 GEN_VISIT(SgIsOp)
495 GEN_VISIT(SgIsNotOp)
496 GEN_VISIT(SgIorAssignOp)
497 GEN_VISIT(SgJovialBitType)
498 GEN_VISIT(SgJovialBitVal)
499 GEN_VISIT(SgJovialTableType)
500 GEN_VISIT(SgJovialCompoolStatement)
501 GEN_VISIT(SgJovialForThenStatement)
505 GEN_VISIT(SgJovialTablePresetExp)
506 GEN_VISIT(SgJovialTableStatement)
507 GEN_VISIT(SgKeyDatumPair)
508 GEN_VISIT(SgCudaKernelExecConfig)
509 GEN_VISIT(SgCudaKernelCallExp)
510 GEN_VISIT(SgLabelRefExp)
511 GEN_VISIT(SgLabelStatement)
512 GEN_VISIT(SgJavaLabelStatement)
513 GEN_VISIT(SgLabelSymbol)
514 GEN_VISIT(SgJavaLabelSymbol)
515 GEN_VISIT(SgLambdaCapture)
516 GEN_VISIT(SgLambdaCaptureList)
517 GEN_VISIT(SgLambdaExp)
518 GEN_VISIT(SgLambdaRefExp)
519 GEN_VISIT(SgLeftDivideOp)
520 GEN_VISIT(SgLessOrEqualOp)
521 GEN_VISIT(SgLessThanOp)
522 GEN_VISIT(SgLineDirectiveStatement)
524 GEN_VISIT(SgLinkageModifier)
525 GEN_VISIT(SgListComprehension)
526 GEN_VISIT(SgListExp)
527 GEN_VISIT(SgLocatedNode)
528 GEN_VISIT(SgLocatedNodeSupport)
529 GEN_VISIT(SgLongDoubleVal)
530 GEN_VISIT(SgLongIntVal)
531 GEN_VISIT(SgLongLongIntVal)
532 GEN_VISIT(SgLshiftAssignOp)
533 GEN_VISIT(SgLshiftOp)
534 GEN_VISIT(SgMagicColonExp)
535 GEN_VISIT(SgMatrixExp)
536 GEN_VISIT(SgMatrixTransposeOp)
537 GEN_VISIT(SgMatlabForStatement)
539 GEN_VISIT(SgMemberFunctionRefExp)
540 GEN_VISIT(SgMemberFunctionSymbol)
541 GEN_VISIT(SgMemberFunctionType)
542 GEN_VISIT(SgMembershipOp)
544 GEN_VISIT(SgMinusAssignOp)
545 GEN_VISIT(SgMinusMinusOp)
546 GEN_VISIT(SgMinusOp)
547 GEN_VISIT(SgModAssignOp)
548 GEN_VISIT(SgModOp)
549 GEN_VISIT(SgModifier)
550 GEN_VISIT(SgModifierNodes)
551 GEN_VISIT(SgModifierType)
552 GEN_VISIT(SgModuleStatement)
553 GEN_VISIT(SgModuleSymbol)
554 GEN_VISIT(SgMultAssignOp)
555 GEN_VISIT(SgMultiplyOp)
556 GEN_VISIT(SgName)
557 GEN_VISIT(SgNameGroup)
558 GEN_VISIT(SgNamedType)
559 GEN_VISIT(SgNamelistStatement)
563 GEN_VISIT(SgNamespaceSymbol)
564 GEN_VISIT(SgNaryOp)
565 GEN_VISIT(SgNaryBooleanOp)
566 GEN_VISIT(SgNaryComparisonOp)
567 GEN_VISIT(SgNewExp)
568 GEN_VISIT(SgNode)
569 GEN_VISIT(SgNoexceptOp)
570 GEN_VISIT(SgNotEqualOp)
571 GEN_VISIT(SgNotOp)
572 GEN_VISIT(SgNonMembershipOp)
573 GEN_VISIT(SgNonrealDecl)
574 GEN_VISIT(SgNonrealRefExp)
575 GEN_VISIT(SgNonrealSymbol)
576 GEN_VISIT(SgNonrealType)
577 GEN_VISIT(SgNonrealBaseClass)
578 GEN_VISIT(SgNullExpression)
579 GEN_VISIT(SgNullptrValExp)
580 GEN_VISIT(SgNullStatement)
581 GEN_VISIT(SgNullifyStatement)
582 GEN_VISIT(SgOmpAtomicStatement)
583 GEN_VISIT(SgOmpBarrierStatement)
584 GEN_VISIT(SgOmpCriticalStatement)
585 GEN_VISIT(SgOmpClauseBodyStatement)
586 GEN_VISIT(SgOmpBodyStatement)
587 GEN_VISIT(SgOmpDoStatement)
588 GEN_VISIT(SgOmpFlushStatement)
590 GEN_VISIT(SgOmpForStatement)
591 GEN_VISIT(SgOmpForSimdStatement)
592 GEN_VISIT(SgOmpMasterStatement)
593 GEN_VISIT(SgOmpOrderedStatement)
594 GEN_VISIT(SgOmpParallelStatement)
595 GEN_VISIT(SgOmpSectionStatement)
596 GEN_VISIT(SgOmpSectionsStatement)
597 GEN_VISIT(SgOmpSingleStatement)
598 GEN_VISIT(SgOmpTaskStatement)
599 GEN_VISIT(SgOmpTaskwaitStatement)
601 GEN_VISIT(SgOmpWorkshareStatement)
602 GEN_VISIT(SgOmpTargetStatement)
603 GEN_VISIT(SgOmpTargetDataStatement)
604 GEN_VISIT(SgOmpSimdStatement)
605 GEN_VISIT(SgOmpClause)
606 GEN_VISIT(SgOmpBeginClause)
607 GEN_VISIT(SgOmpCollapseClause)
608 GEN_VISIT(SgOmpCopyinClause)
609 GEN_VISIT(SgOmpCopyprivateClause)
610 GEN_VISIT(SgOmpDefaultClause)
611 GEN_VISIT(SgOmpEndClause)
612 GEN_VISIT(SgOmpExpressionClause)
613 GEN_VISIT(SgOmpFirstprivateClause)
614 GEN_VISIT(SgOmpIfClause)
615 GEN_VISIT(SgOmpFinalClause)
616 GEN_VISIT(SgOmpPriorityClause)
617 GEN_VISIT(SgOmpDeviceClause)
618 GEN_VISIT(SgOmpLastprivateClause)
619 GEN_VISIT(SgOmpNowaitClause)
620 GEN_VISIT(SgOmpNumThreadsClause)
621 GEN_VISIT(SgOmpOrderedClause)
622 GEN_VISIT(SgOmpPrivateClause)
623 GEN_VISIT(SgOmpReductionClause)
624 GEN_VISIT(SgOmpScheduleClause)
625 GEN_VISIT(SgOmpSharedClause)
626 GEN_VISIT(SgOmpUntiedClause)
627 GEN_VISIT(SgOmpMergeableClause)
628 GEN_VISIT(SgOmpVariablesClause)
629 GEN_VISIT(SgOmpMapClause)
630 GEN_VISIT(SgOmpSafelenClause)
631 GEN_VISIT(SgOmpSimdlenClause)
632 GEN_VISIT(SgOmpLinearClause)
633 GEN_VISIT(SgOmpUniformClause)
634 GEN_VISIT(SgOmpAlignedClause)
635 GEN_VISIT(SgOmpProcBindClause)
636 GEN_VISIT(SgOmpAtomicClause)
637 GEN_VISIT(SgOmpInbranchClause)
638 GEN_VISIT(SgOmpNotinbranchClause)
639 GEN_VISIT(SgOmpDependClause)
641 GEN_VISIT(SgOpenStatement)
642 GEN_VISIT(SgOptions)
643 GEN_VISIT(SgOrOp)
644 GEN_VISIT(SgParameterStatement)
646 GEN_VISIT(SgPartialFunctionType)
647 GEN_VISIT(SgPassStatement)
648 GEN_VISIT(SgPlusAssignOp)
649 GEN_VISIT(SgPlusPlusOp)
650 GEN_VISIT(SgPntrArrRefExp)
651 GEN_VISIT(SgPointerAssignOp)
652 GEN_VISIT(SgPointerDerefExp)
653 GEN_VISIT(SgPointerMemberType)
654 GEN_VISIT(SgPointerType)
655 GEN_VISIT(SgPowerOp)
656 GEN_VISIT(SgPragma)
657 GEN_VISIT(SgPragmaDeclaration)
658 GEN_VISIT(SgPrintStatement)
660 GEN_VISIT(SgProgramHeaderStatement)
661 GEN_VISIT(SgProject)
662 GEN_VISIT(SgPseudoDestructorRefExp)
663 GEN_VISIT(SgPythonGlobalStmt)
664 GEN_VISIT(SgPythonPrintStmt)
665 GEN_VISIT(SgQualifiedName)
666 GEN_VISIT(SgQualifiedNameType)
667 GEN_VISIT(SgRangeExp)
668 GEN_VISIT(SgRangeBasedForStatement)
669 GEN_VISIT(SgReadStatement)
670 GEN_VISIT(SgRealPartOp)
671 GEN_VISIT(SgRefExp)
672 GEN_VISIT(SgReferenceType)
673 GEN_VISIT(SgRemOp)
674 GEN_VISIT(SgRenamePair)
675 GEN_VISIT(SgRenameSymbol)
676 GEN_VISIT(SgReplicationOp)
677 GEN_VISIT(SgReturnStmt)
678 GEN_VISIT(SgRewindStatement)
679 GEN_VISIT(SgRshiftAssignOp)
680 GEN_VISIT(SgRshiftOp)
681 GEN_VISIT(SgRvalueReferenceType)
683 GEN_VISIT(SgJavaUnsignedRshiftOp)
684 GEN_VISIT(SgScopeOp)
685 GEN_VISIT(SgScopeStatement)
686 GEN_VISIT(SgSequenceStatement)
687 GEN_VISIT(SgSetComprehension)
688 GEN_VISIT(SgShortVal)
689 GEN_VISIT(SgSizeOfOp)
690 GEN_VISIT(SgAlignOfOp)
691 GEN_VISIT(SgJavaInstanceOfOp)
692 GEN_VISIT(SgSourceFile)
693 GEN_VISIT(SgSpaceshipOp)
694 GEN_VISIT(SgSpawnStmt)
695 GEN_VISIT(SgSyncAllStatement)
696 GEN_VISIT(SgSyncImagesStatement)
697 GEN_VISIT(SgSyncMemoryStatement)
698 GEN_VISIT(SgSyncTeamStatement)
699 GEN_VISIT(SgLockStatement)
700 GEN_VISIT(SgUnlockStatement)
701 GEN_VISIT(SgJavaThrowStatement)
702 GEN_VISIT(SgJavaForEachStatement)
704 GEN_VISIT(SgJavaParameterizedType)
705 GEN_VISIT(SgJavaWildcardType)
708 GEN_VISIT(SgStatement)
711 GEN_VISIT(SgStatementExpression)
713 GEN_VISIT(SgStorageModifier)
714 GEN_VISIT(SgStringConversion)
716 GEN_VISIT(SgStringVal)
717 GEN_VISIT(SgStructureModifier)
718 GEN_VISIT(SgSubscriptExpression)
719 GEN_VISIT(SgSubtractOp)
720 GEN_VISIT(SgSupport)
721 GEN_VISIT(SgSwitchStatement)
722 GEN_VISIT(SgSymbol)
723 GEN_VISIT(SgSymbolTable)
724 GEN_VISIT(SgTemplateArgument)
725 GEN_VISIT(SgTemplateArgumentList)
726 GEN_VISIT(SgTemplateDeclaration)
728 GEN_VISIT(SgTemplateClassSymbol)
730 GEN_VISIT(SgTemplateFunctionRefExp)
731 GEN_VISIT(SgTemplateFunctionSymbol)
736 GEN_VISIT(SgTemplateTypedefSymbol)
738 GEN_VISIT(SgTemplateVariableSymbol)
747 GEN_VISIT(SgTemplateParameter)
748 GEN_VISIT(SgTemplateParameterVal)
749 GEN_VISIT(SgTemplateParameterList)
750 GEN_VISIT(SgTemplateSymbol)
751 GEN_VISIT(SgTemplateType)
752 GEN_VISIT(SgThisExp)
754 GEN_VISIT(SgSuperExp)
755 GEN_VISIT(SgThrowOp)
756 GEN_VISIT(SgToken)
757 GEN_VISIT(SgTryStmt)
758 GEN_VISIT(SgTupleExp)
759 GEN_VISIT(SgType)
760 GEN_VISIT(SgTypeBool)
761 GEN_VISIT(SgTypeChar)
762 GEN_VISIT(SgTypeChar16)
763 GEN_VISIT(SgTypeChar32)
764 GEN_VISIT(SgTypeComplex)
765 GEN_VISIT(SgTypeDefault)
766 GEN_VISIT(SgTypeExpression)
767 GEN_VISIT(SgTypeLabel)
768 GEN_VISIT(SgTypeDouble)
769 GEN_VISIT(SgTypeEllipse)
770 GEN_VISIT(SgTypeFixed)
771 GEN_VISIT(SgTypeFloat)
772 GEN_VISIT(SgTypeFloat128)
773 GEN_VISIT(SgTypeFloat80)
774 GEN_VISIT(SgTypeGlobalVoid)
775 GEN_VISIT(SgTypeIdOp)
776 GEN_VISIT(SgTypeImaginary)
777 GEN_VISIT(SgTypeInt)
778 GEN_VISIT(SgTypeLong)
779 GEN_VISIT(SgTypeLongDouble)
780 GEN_VISIT(SgTypeLongLong)
781 GEN_VISIT(SgTypeModifier)
782 GEN_VISIT(SgTypeMatrix)
783 GEN_VISIT(SgTypeTuple)
784 GEN_VISIT(SgTypeNullptr)
785 GEN_VISIT(SgTypeOfType)
786 GEN_VISIT(SgTypeShort)
788 GEN_VISIT(SgTypeSignedChar)
789 GEN_VISIT(SgTypeSignedInt)
790 GEN_VISIT(SgTypeSignedLong)
791 GEN_VISIT(SgTypeSignedLongLong)
792 GEN_VISIT(SgTypeSignedShort)
793 GEN_VISIT(SgTypeString)
794 GEN_VISIT(SgTypeUnknown)
796 GEN_VISIT(SgTypeUnsignedChar)
797 GEN_VISIT(SgTypeUnsignedInt)
798 GEN_VISIT(SgTypeUnsignedLong)
799 GEN_VISIT(SgTypeUnsignedLongLong)
800 GEN_VISIT(SgTypeUnsignedShort)
801 GEN_VISIT(SgTypeVoid)
802 GEN_VISIT(SgTypeWchar)
803 GEN_VISIT(SgTypedefDeclaration)
804 GEN_VISIT(SgTypedefSeq)
805 GEN_VISIT(SgTypedefSymbol)
806 GEN_VISIT(SgTypedefType)
807 GEN_VISIT(SgUPC_AccessModifier)
808 GEN_VISIT(SgUnaryAddOp)
809 GEN_VISIT(SgUnaryOp)
811 GEN_VISIT(SgUndirectedGraphEdge)
813 GEN_VISIT(SgUnknownFile)
814 GEN_VISIT(SgUnparse_Info)
815 GEN_VISIT(SgUnsignedCharVal)
816 GEN_VISIT(SgUnsignedIntVal)
817 GEN_VISIT(SgUnsignedLongLongIntVal)
818 GEN_VISIT(SgUnsignedLongVal)
819 GEN_VISIT(SgUnsignedShortVal)
820 GEN_VISIT(SgUpcBarrierStatement)
823 GEN_VISIT(SgUpcFenceStatement)
824 GEN_VISIT(SgUpcForAllStatement)
826 GEN_VISIT(SgUpcMythread)
827 GEN_VISIT(SgUpcNotifyStatement)
828 GEN_VISIT(SgUpcThreads)
829 GEN_VISIT(SgUpcWaitStatement)
830 GEN_VISIT(SgUseStatement)
831 GEN_VISIT(SgUserDefinedBinaryOp)
832 GEN_VISIT(SgUserDefinedUnaryOp)
835 GEN_VISIT(SgValueExp)
836 GEN_VISIT(SgVarArgCopyOp)
837 GEN_VISIT(SgVarArgEndOp)
838 GEN_VISIT(SgVarArgOp)
840 GEN_VISIT(SgVarArgStartOp)
841 GEN_VISIT(SgVarRefExp)
842 GEN_VISIT(SgVariableDeclaration)
843 GEN_VISIT(SgVariableDefinition)
844 GEN_VISIT(SgVariableSymbol)
845 GEN_VISIT(SgVariantExpression)
846 GEN_VISIT(SgVariantStatement)
847 GEN_VISIT(SgVoidVal)
848 GEN_VISIT(SgWaitStatement)
850 GEN_VISIT(SgWithStatement)
851 GEN_VISIT(SgWcharVal)
852 GEN_VISIT(SgWhereStatement)
853 GEN_VISIT(SgWhileStmt)
854 GEN_VISIT(SgWriteStatement)
855 GEN_VISIT(SgXorAssignOp)
856 GEN_VISIT(SgYieldExpression)
857 GEN_VISIT(Sg_File_Info)
858 GEN_VISIT(SgTypeCAFTeam)
859 GEN_VISIT(SgCAFWithTeamStatement)
860 GEN_VISIT(SgCAFCoExpression)
861 GEN_VISIT(SgCallExpression)
862 GEN_VISIT(SgTypeCrayPointer)
863 GEN_VISIT(SgJavaImportStatement)
864 GEN_VISIT(SgJavaPackageDeclaration)
865 GEN_VISIT(SgJavaPackageStatement)
868 GEN_VISIT(SgJavaMemberValuePair)
869 GEN_VISIT(SgJavaAnnotation)
870 GEN_VISIT(SgJavaMarkerAnnotation)
872 GEN_VISIT(SgJavaNormalAnnotation)
873 GEN_VISIT(SgJavaTypeExpression)
874 GEN_VISIT(SgJavaQualifiedType)
875 GEN_VISIT(SgClassExp)
876 GEN_VISIT(SgJavaUnionType)
877 GEN_VISIT(SgJavaParameterType)
878 GEN_VISIT(SgAsyncStmt)
879 GEN_VISIT(SgFinishStmt)
880 GEN_VISIT(SgAtStmt)
881 GEN_VISIT(SgAtomicStmt)
882// GEN_VISIT(SgClassPropertyList)
883 GEN_VISIT(SgWhenStmt)
884 GEN_VISIT(SgAtExp)
885 GEN_VISIT(SgFinishExp)
886 GEN_VISIT(SgHereExp)
887 GEN_VISIT(SgDotDotExp)
888 GEN_VISIT(SgAdaOthersExp)
889 GEN_VISIT(SgAdaUnitRefExp)
891 GEN_VISIT(SgAdaDiscriminatedType)
893 GEN_VISIT(SgAdaGenericSymbol)
894
895 GEN_VISIT(SgAdaProtectedBody)
896 GEN_VISIT(SgAdaProtectedBodyDecl)
897 GEN_VISIT(SgAdaProtectedSpec)
898 GEN_VISIT(SgAdaProtectedSpecDecl)
899 GEN_VISIT(SgAdaProtectedSymbol)
900 GEN_VISIT(SgAdaProtectedRefExp)
901 GEN_VISIT(SgAdaProtectedType)
902 GEN_VISIT(SgAdaProtectedTypeDecl)
903 GEN_VISIT(SgAdaDigitsConstraint)
904 GEN_VISIT(SgAdaAncestorInitializer)
905 GEN_VISIT(SgAdaDeltaConstraint)
906 GEN_VISIT(SgAdaSubroutineType)
908 GEN_VISIT(SgAdaFormalPackageDecl)
909 GEN_VISIT(SgAdaFormalPackageSymbol)
910 GEN_VISIT(SgAdaNullConstraint)
911 GEN_VISIT(SgAdaUnscopedBlock)
912 GEN_VISIT(SgAdaVariantDecl)
913 GEN_VISIT(SgAdaVariantWhenStmt)
914 GEN_VISIT(SgJovialLabelDeclaration)
915
916 GEN_VISIT(SgRangeType)
917
918#if WITH_BINARY_NODES
919 GEN_VISIT(SgAsmAarch64AtOperand)
920 GEN_VISIT(SgAsmAarch64BarrierOperand)
921 GEN_VISIT(SgAsmAarch64CImmediateOperand)
922 GEN_VISIT(SgAsmAarch64Instruction)
923 GEN_VISIT(SgAsmAarch64PrefetchOperand)
924 GEN_VISIT(SgAsmAarch64SysMoveOperand)
925 GEN_VISIT(SgAsmBasicString)
926 GEN_VISIT(SgAsmBinaryAdd)
927 GEN_VISIT(SgAsmBinaryAddPostupdate)
928 GEN_VISIT(SgAsmBinaryAddPreupdate)
929 GEN_VISIT(SgAsmBinaryAsr)
930 GEN_VISIT(SgAsmBinaryDivide)
931 GEN_VISIT(SgAsmBinaryExpression)
932 GEN_VISIT(SgAsmBinaryLsl)
933 GEN_VISIT(SgAsmBinaryLsr)
934 GEN_VISIT(SgAsmBinaryMod)
935 GEN_VISIT(SgAsmBinaryMsl)
936 GEN_VISIT(SgAsmBinaryMultiply)
937 GEN_VISIT(SgAsmBinaryRor)
938 GEN_VISIT(SgAsmBinarySubtract)
939 GEN_VISIT(SgAsmBinarySubtractPostupdate)
940 GEN_VISIT(SgAsmBinarySubtractPreupdate)
941 GEN_VISIT(SgAsmBlock)
942 GEN_VISIT(SgAsmCoffStrtab)
943 GEN_VISIT(SgAsmCoffSymbol)
944 GEN_VISIT(SgAsmCoffSymbolList)
945 GEN_VISIT(SgAsmCoffSymbolTable)
946 GEN_VISIT(SgAsmCommonSubExpression)
948 GEN_VISIT(SgAsmConstantExpression)
949 GEN_VISIT(SgAsmDOSExtendedHeader)
950 GEN_VISIT(SgAsmDOSFileHeader)
955 GEN_VISIT(SgAsmDwarfArrayType)
956 GEN_VISIT(SgAsmDwarfBaseType)
957 GEN_VISIT(SgAsmDwarfCatchBlock)
958 GEN_VISIT(SgAsmDwarfClassTemplate)
959 GEN_VISIT(SgAsmDwarfClassType)
960 GEN_VISIT(SgAsmDwarfCommonBlock)
964 GEN_VISIT(SgAsmDwarfCondition)
965 GEN_VISIT(SgAsmDwarfConstType)
966 GEN_VISIT(SgAsmDwarfConstant)
967 GEN_VISIT(SgAsmDwarfConstruct)
968 GEN_VISIT(SgAsmDwarfConstructList)
969 GEN_VISIT(SgAsmDwarfDwarfProcedure)
970 GEN_VISIT(SgAsmDwarfEntryPoint)
972 GEN_VISIT(SgAsmDwarfEnumerator)
973 GEN_VISIT(SgAsmDwarfFileType)
975 GEN_VISIT(SgAsmDwarfFormatLabel)
976 GEN_VISIT(SgAsmDwarfFriend)
979 GEN_VISIT(SgAsmDwarfImportedModule)
980 GEN_VISIT(SgAsmDwarfImportedUnit)
981 GEN_VISIT(SgAsmDwarfInformation)
982 GEN_VISIT(SgAsmDwarfInheritance)
984 GEN_VISIT(SgAsmDwarfInterfaceType)
985 GEN_VISIT(SgAsmDwarfLabel)
986 GEN_VISIT(SgAsmDwarfLexicalBlock)
987 GEN_VISIT(SgAsmDwarfLine)
988 GEN_VISIT(SgAsmDwarfLineList)
989 GEN_VISIT(SgAsmDwarfMacro)
990 GEN_VISIT(SgAsmDwarfMacroList)
991 GEN_VISIT(SgAsmDwarfMember)
992 GEN_VISIT(SgAsmDwarfModule)
993 GEN_VISIT(SgAsmDwarfMutableType)
994 GEN_VISIT(SgAsmDwarfNamelist)
995 GEN_VISIT(SgAsmDwarfNamelistItem)
996 GEN_VISIT(SgAsmDwarfNamespace)
997 GEN_VISIT(SgAsmDwarfPackedType)
998 GEN_VISIT(SgAsmDwarfPartialUnit)
999 GEN_VISIT(SgAsmDwarfPointerType)
1000 GEN_VISIT(SgAsmDwarfPtrToMemberType)
1001 GEN_VISIT(SgAsmDwarfReferenceType)
1002 GEN_VISIT(SgAsmDwarfRestrictType)
1003 GEN_VISIT(SgAsmDwarfSetType)
1004 GEN_VISIT(SgAsmDwarfSharedType)
1005 GEN_VISIT(SgAsmDwarfStringType)
1006 GEN_VISIT(SgAsmDwarfStructureType)
1007 GEN_VISIT(SgAsmDwarfSubprogram)
1008 GEN_VISIT(SgAsmDwarfSubrangeType)
1009 GEN_VISIT(SgAsmDwarfSubroutineType)
1012 GEN_VISIT(SgAsmDwarfThrownType)
1013 GEN_VISIT(SgAsmDwarfTryBlock)
1014 GEN_VISIT(SgAsmDwarfTypedef)
1015 GEN_VISIT(SgAsmDwarfUnionType)
1018 GEN_VISIT(SgAsmDwarfUnspecifiedType)
1019 GEN_VISIT(SgAsmDwarfUpcRelaxedType)
1020 GEN_VISIT(SgAsmDwarfUpcSharedType)
1021 GEN_VISIT(SgAsmDwarfUpcStrictType)
1022 GEN_VISIT(SgAsmDwarfVariable)
1023 GEN_VISIT(SgAsmDwarfVariant)
1024 GEN_VISIT(SgAsmDwarfVariantPart)
1025 GEN_VISIT(SgAsmDwarfVolatileType)
1026 GEN_VISIT(SgAsmDwarfWithStmt)
1027 GEN_VISIT(SgAsmElfDynamicEntry)
1028 GEN_VISIT(SgAsmElfDynamicEntryList)
1029 GEN_VISIT(SgAsmElfDynamicSection)
1030 GEN_VISIT(SgAsmElfEHFrameEntryCI)
1032 GEN_VISIT(SgAsmElfEHFrameEntryFD)
1034 GEN_VISIT(SgAsmElfEHFrameSection)
1035 GEN_VISIT(SgAsmElfFileHeader)
1036 GEN_VISIT(SgAsmElfNoteEntry)
1037 GEN_VISIT(SgAsmElfNoteEntryList)
1038 GEN_VISIT(SgAsmElfNoteSection)
1039 GEN_VISIT(SgAsmElfRelocEntry)
1040 GEN_VISIT(SgAsmElfRelocEntryList)
1041 GEN_VISIT(SgAsmElfRelocSection)
1042 GEN_VISIT(SgAsmElfSection)
1043 GEN_VISIT(SgAsmElfSectionTable)
1044 GEN_VISIT(SgAsmElfSectionTableEntry)
1045 GEN_VISIT(SgAsmElfSegmentTable)
1046 GEN_VISIT(SgAsmElfSegmentTableEntry)
1048 GEN_VISIT(SgAsmElfStringSection)
1049 GEN_VISIT(SgAsmElfStrtab)
1050 GEN_VISIT(SgAsmElfSymbol)
1051 GEN_VISIT(SgAsmElfSymbolList)
1052 GEN_VISIT(SgAsmElfSymbolSection)
1053 GEN_VISIT(SgAsmElfSymverDefinedAux)
1058 GEN_VISIT(SgAsmElfSymverEntry)
1059 GEN_VISIT(SgAsmElfSymverEntryList)
1060 GEN_VISIT(SgAsmElfSymverNeededAux)
1062 GEN_VISIT(SgAsmElfSymverNeededEntry)
1065 GEN_VISIT(SgAsmElfSymverSection)
1066 GEN_VISIT(SgAsmExecutableFileFormat)
1067 GEN_VISIT(SgAsmExprListExp)
1068 GEN_VISIT(SgAsmExpression)
1070 GEN_VISIT(SgAsmFloatType)
1071 GEN_VISIT(SgAsmFloatValueExpression)
1072 GEN_VISIT(SgAsmFunction)
1073 GEN_VISIT(SgAsmGenericDLL)
1074 GEN_VISIT(SgAsmGenericDLLList)
1075 GEN_VISIT(SgAsmGenericFile)
1076 GEN_VISIT(SgAsmGenericFileList)
1077 GEN_VISIT(SgAsmGenericFormat)
1078 GEN_VISIT(SgAsmGenericHeader)
1079 GEN_VISIT(SgAsmGenericHeaderList)
1080 GEN_VISIT(SgAsmGenericSection)
1081 GEN_VISIT(SgAsmGenericSectionList)
1082 GEN_VISIT(SgAsmGenericString)
1083 GEN_VISIT(SgAsmGenericStrtab)
1084 GEN_VISIT(SgAsmGenericSymbol)
1085 GEN_VISIT(SgAsmGenericSymbolList)
1087 GEN_VISIT(SgAsmInstruction)
1089 GEN_VISIT(SgAsmIntegerType)
1090 GEN_VISIT(SgAsmInterpretation)
1091 GEN_VISIT(SgAsmInterpretationList)
1092 GEN_VISIT(SgAsmLEEntryPoint)
1093 GEN_VISIT(SgAsmLEEntryTable)
1094 GEN_VISIT(SgAsmLEFileHeader)
1095 GEN_VISIT(SgAsmLENameTable)
1096 GEN_VISIT(SgAsmLEPageTable)
1097 GEN_VISIT(SgAsmLEPageTableEntry)
1098 GEN_VISIT(SgAsmLERelocTable)
1099 GEN_VISIT(SgAsmLESection)
1100 GEN_VISIT(SgAsmLESectionTable)
1101 GEN_VISIT(SgAsmLESectionTableEntry)
1102 GEN_VISIT(SgAsmM68kInstruction)
1104 GEN_VISIT(SgAsmMipsInstruction)
1105 GEN_VISIT(SgAsmNEEntryPoint)
1106 GEN_VISIT(SgAsmNEEntryTable)
1107 GEN_VISIT(SgAsmNEFileHeader)
1108 GEN_VISIT(SgAsmNEModuleTable)
1109 GEN_VISIT(SgAsmNENameTable)
1110 GEN_VISIT(SgAsmNERelocEntry)
1111 GEN_VISIT(SgAsmNERelocTable)
1112 GEN_VISIT(SgAsmNESection)
1113 GEN_VISIT(SgAsmNESectionTable)
1114 GEN_VISIT(SgAsmNESectionTableEntry)
1115 GEN_VISIT(SgAsmNEStringTable)
1116 GEN_VISIT(SgAsmNode)
1117 GEN_VISIT(SgAsmOp)
1118 GEN_VISIT(SgAsmOperandList)
1119 GEN_VISIT(SgAsmPEExportDirectory)
1120 GEN_VISIT(SgAsmPEExportEntry)
1121 GEN_VISIT(SgAsmPEExportEntryList)
1122 GEN_VISIT(SgAsmPEExportSection)
1123 GEN_VISIT(SgAsmPEFileHeader)
1124 GEN_VISIT(SgAsmPEImportDirectory)
1126 GEN_VISIT(SgAsmPEImportItem)
1127 GEN_VISIT(SgAsmPEImportItemList)
1128 GEN_VISIT(SgAsmPEImportSection)
1129 GEN_VISIT(SgAsmPERVASizePair)
1130 GEN_VISIT(SgAsmPERVASizePairList)
1131 GEN_VISIT(SgAsmPESection)
1132 GEN_VISIT(SgAsmPESectionTable)
1133 GEN_VISIT(SgAsmPESectionTableEntry)
1134 GEN_VISIT(SgAsmPEStringSection)
1135 GEN_VISIT(SgAsmPointerType)
1136 GEN_VISIT(SgAsmPowerpcInstruction)
1137 GEN_VISIT(SgAsmRegisterNames)
1139 GEN_VISIT(SgAsmRiscOperation)
1140 GEN_VISIT(SgAsmScalarType)
1141 GEN_VISIT(SgAsmStatement)
1142 GEN_VISIT(SgAsmStaticData)
1143 GEN_VISIT(SgAsmStmt)
1144 GEN_VISIT(SgAsmStoredString)
1145 GEN_VISIT(SgAsmStringStorage)
1146 GEN_VISIT(SgAsmType)
1147 GEN_VISIT(SgAsmUnaryExpression)
1148 GEN_VISIT(SgAsmUnaryMinus)
1149 GEN_VISIT(SgAsmUnaryPlus)
1150 GEN_VISIT(SgAsmUnaryRrx)
1151 GEN_VISIT(SgAsmUnarySignedExtend)
1152 GEN_VISIT(SgAsmUnaryUnsignedExtend)
1153 GEN_VISIT(SgAsmUnaryTruncate)
1154 GEN_VISIT(SgAsmValueExpression)
1155 GEN_VISIT(SgAsmVectorType)
1156 GEN_VISIT(SgAsmVoidType)
1157 GEN_VISIT(SgAsmX86Instruction)
1158 GEN_VISIT(SgAsmBinaryAddressSymbol)
1159 GEN_VISIT(SgAsmBinaryDataSymbol)
1160 GEN_VISIT(SgAsmNullInstruction)
1161
1162 GEN_VISIT(SgAsmJvmModuleMainClass)
1163 GEN_VISIT(SgAsmInstructionList)
1164 GEN_VISIT(SgAsmCilNode)
1165 GEN_VISIT(SgAsmCilAssembly)
1166 GEN_VISIT(SgAsmCilAssemblyOS)
1167 GEN_VISIT(SgAsmCilAssemblyProcessor)
1168 GEN_VISIT(SgAsmCilAssemblyRef)
1169 GEN_VISIT(SgAsmCilAssemblyRefOS)
1171 GEN_VISIT(SgAsmCilClassLayout)
1172 GEN_VISIT(SgAsmCilConstant)
1173 GEN_VISIT(SgAsmCilCustomAttribute)
1174 GEN_VISIT(SgAsmCilDeclSecurity)
1175 GEN_VISIT(SgAsmCilEvent)
1176 GEN_VISIT(SgAsmCilEventMap)
1177 GEN_VISIT(SgAsmCilExportedType)
1178 GEN_VISIT(SgAsmCilField)
1179 GEN_VISIT(SgAsmCilFieldLayout)
1180 GEN_VISIT(SgAsmCilFieldMarshal)
1181 GEN_VISIT(SgAsmCilFieldRVA)
1182 GEN_VISIT(SgAsmCilFile)
1183 GEN_VISIT(SgAsmCilGenericParam)
1185 GEN_VISIT(SgAsmCilImplMap)
1186 GEN_VISIT(SgAsmCilInterfaceImpl)
1187 GEN_VISIT(SgAsmCilManifestResource)
1188 GEN_VISIT(SgAsmCilMemberRef)
1189 GEN_VISIT(SgAsmCilMethodDef)
1190 GEN_VISIT(SgAsmCilMethodImpl)
1191 GEN_VISIT(SgAsmCilMethodSemantics)
1192 GEN_VISIT(SgAsmCilMethodSpec)
1193 GEN_VISIT(SgAsmCilModule)
1194 GEN_VISIT(SgAsmCilModuleRef)
1195 GEN_VISIT(SgAsmCilNestedClass)
1196 GEN_VISIT(SgAsmCilParam)
1197 GEN_VISIT(SgAsmCilProperty)
1198 GEN_VISIT(SgAsmCilPropertyMap)
1199 GEN_VISIT(SgAsmCilStandAloneSig)
1200 GEN_VISIT(SgAsmCilTypeDef)
1201 GEN_VISIT(SgAsmCilTypeRef)
1202 GEN_VISIT(SgAsmCilTypeSpec)
1203 GEN_VISIT(SgAdaParameterList)
1204 GEN_VISIT(SgAsmCilMetadata)
1205 GEN_VISIT(SgAsmCilMetadataRoot)
1206 GEN_VISIT(SgAsmCilDataStream)
1207 GEN_VISIT(SgAsmCilMetadataHeap)
1208 GEN_VISIT(SgAsmCilUint8Heap)
1209 GEN_VISIT(SgAsmCilUint32Heap)
1210 GEN_VISIT(SgAsmCliHeader)
1211
1216 GEN_VISIT(SgAsmUserInstruction)
1217 GEN_VISIT(SgAsmJvmMethodParameters)
1219 GEN_VISIT(SgAsmVoidType)
1220 GEN_VISIT(SgAsmPointerType)
1221
1222 // incomplete
1223#endif /* WITH_BINARY_NODES */
1224
1225/*
1226 GEN_VISIT(SgBinaryComposite)
1227 GEN_VISIT(SgComprehensionList)
1228 *
1229 GEN_VISIT(SgDirectedGraph)
1230 GEN_VISIT(SgDirectedGraphEdge)
1231 GEN_VISIT(SgDirectedGraphNode)
1232
1233 GEN_VISIT(SgUnknownMemberFunctionType)
1234*/
1235
1236 RoseVisitor rv;
1237 };
1238
1239#undef GEN_VISIT
1240
1241 template <class RoseVisitor>
1242 inline
1243 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1244 _dispatch(RoseVisitor&& rv, SgNode* n)
1245 {
1246 using RoseVisitorNoref = typename std::remove_reference<RoseVisitor>::type;
1247 using RoseHandler = typename std::remove_const<RoseVisitorNoref>::type;
1248
1249 ASSERT_not_null(n);
1250
1251 VisitDispatcher<RoseHandler> vis( std::forward<RoseVisitor>(rv),
1252 std::is_lvalue_reference<RoseVisitor>()
1253 );
1254
1255 n->accept(vis);
1256 return std::move(vis).rv;
1257 }
1258
1259
1315#if 0
1326#endif
1327
1328 template <class RoseVisitor>
1329 inline
1330 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1331 dispatch(RoseVisitor&& rv, SgNode* n)
1332 {
1333 //~ return std::move(rv);
1334 return _dispatch(std::forward<RoseVisitor>(rv), n);
1335 }
1336
1337 template <class RoseVisitor>
1338 inline
1339 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1340 dispatch(RoseVisitor&& rv, const SgNode* n)
1341 {
1342 //~ return std::move(rv);
1343 return _dispatch(std::forward<RoseVisitor>(rv), const_cast<SgNode*>(n));
1344 }
1345
1355 template <class SageNode>
1357 {
1358 void handle(SageNode&) {}
1359 };
1360
1368 template <class AncestorNode, class QualSgNode>
1369 struct AncestorTypeFinder : DefaultHandler<const SgProject>
1370 {
1372 typedef std::pair<AncestorNode*, QualSgNode*> Pair;
1373
1374 Pair res;
1375
1377 : Base(), res(nullptr, nullptr)
1378 {}
1379
1380 // handling of const SgProject is outsourced to DefaultHandler
1381 // thus, AncestorNode = const SgProject does not cause conflicts
1382 using Base::handle;
1383
1384 void handle(QualSgNode& n) { res.second = n.get_parent(); }
1385 void handle(AncestorNode& n) { res.first = &n; }
1386
1387 operator Pair() const { return res; }
1388 };
1389
1392 template <class AncestorNode, class QualSgNode>
1393 AncestorNode* _ancestor(QualSgNode& n)
1394 {
1395 using AncestorFinder = AncestorTypeFinder<AncestorNode, QualSgNode>;
1396
1397 typename AncestorFinder::Pair res(nullptr, n.get_parent());
1398
1399 while (res.second != nullptr)
1400 {
1401 res = (typename AncestorFinder::Pair) sg::dispatch(AncestorFinder(), res.second);
1402 }
1403
1404 return res.first;
1405 }
1406
1418 template <class AncestorNode>
1419 AncestorNode* ancestor(SgNode* n)
1420 {
1421 if (n == nullptr) return nullptr;
1422
1423 return _ancestor<AncestorNode>(*n);
1424 }
1425
1427 template <class AncestorNode>
1428 const AncestorNode* ancestor(const SgNode* n)
1429 {
1430 if (n == nullptr) return nullptr;
1431
1432 return _ancestor<const AncestorNode>(*n);
1433 }
1434
1436 template <class AncestorNode>
1437 AncestorNode& ancestor(SgNode& n)
1438 {
1439 AncestorNode* res = _ancestor<AncestorNode>(n);
1440
1441 ROSE_ASSERT(res);
1442 return *res;
1443 }
1444
1446 template <class AncestorNode>
1447 const AncestorNode& ancestor(const SgNode& n)
1448 {
1449 const AncestorNode* res = _ancestor<const AncestorNode>(n);
1450
1451 ROSE_ASSERT(res);
1452 return *res;
1453 }
1454
1455
1456 namespace
1457 {
1459 template <class SageNode>
1460 struct TypeRecoveryHandler
1461 {
1462 typedef typename ConstLike<SageNode, SgNode>::type SgBaseNode;
1463
1464 TypeRecoveryHandler(const char* f = 0, size_t ln = 0)
1465 : res(nullptr), loc(f), loc_ln(ln)
1466 {}
1467
1468 TypeRecoveryHandler(TypeRecoveryHandler&&) = default;
1469 TypeRecoveryHandler& operator=(TypeRecoveryHandler&&) = default;
1470
1471 operator SageNode* ()&& { return res; }
1472
1473 void handle(SgBaseNode& n) { unexpected_node(n, loc, loc_ln); }
1474 void handle(SageNode& n) { res = &n; }
1475
1476 private:
1477 SageNode* res;
1478 const char* loc;
1479 size_t loc_ln;
1480
1481 TypeRecoveryHandler() = delete;
1482 TypeRecoveryHandler(const TypeRecoveryHandler&) = delete;
1483 TypeRecoveryHandler& operator=(const TypeRecoveryHandler&) = delete;
1484 };
1485 }
1486
1487
1496 template <class SageNode>
1497 SageNode* assert_sage_type(SgNode* n, const char* f = 0, size_t ln = 0)
1498 {
1499 return sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), n);
1500 }
1501
1502 template <class SageNode>
1503 const SageNode* assert_sage_type(const SgNode* n, const char* f = 0, size_t ln = 0)
1504 {
1505 return sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), n);
1506 }
1507
1508 template <class SageNode>
1509 SageNode& assert_sage_type(SgNode& n, const char* f = 0, size_t ln = 0)
1510 {
1511 return *sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), &n);
1512 }
1513
1514 template <class SageNode>
1515 const SageNode& assert_sage_type(const SgNode& n, const char* f = 0, size_t ln = 0)
1516 {
1517 return *sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), &n);
1518 }
1520
1521 template <class SageNode>
1522 struct TypeRecovery : DispatchHandler<SageNode*>
1523 {
1524 void handle(SgNode&) { /* res = nullptr; */ }
1525 void handle(SageNode& n) { this->res = &n; }
1526 };
1527
1529 template <class SageNode>
1530 auto ancestor_path(const SgNode& n) -> SageNode*
1531 {
1533 }
1534
1536 template <class SageNode, class... SageNodes>
1537 auto ancestor_path(const SgNode& n) -> decltype(ancestor_path<SageNodes...>(n))
1538 {
1539 if (SageNode* parent = ancestor_path<SageNode>(n))
1540 return ancestor_path<SageNodes...>(*parent);
1541
1542 return nullptr;
1543 }
1544
1545
1548
1549 // base case
1550 template <class SageNode>
1551 auto ancestorPath(const SgNode& n) -> SageNode*
1552 {
1554 }
1555
1556 // general case
1557 template <class SageNode, class... SageNodes>
1558 auto ancestorPath(const SgNode& n) -> decltype(ancestorPath<SageNodes...>(n))
1559 {
1560 if (SageNode* parent = ancestorPath<SageNode>(n))
1561 return ancestorPath<SageNodes...>(*parent);
1562
1563 return nullptr;
1564 }
1566
1567
1570 static inline
1571 void swap_parent(SgNode* lhs, SgNode* rhs)
1572 {
1573 SgNode* tmp = lhs->get_parent();
1574
1575 lhs->set_parent(rhs->get_parent());
1576 rhs->set_parent(tmp);
1577 }
1578
1582 static inline
1583 void swap_parent(void*, void*) {}
1584
1592 template <class SageNode, class SageChild>
1593 void swap_child(SageNode& lhs, SageNode& rhs, SageChild* (SageNode::*getter) () const, void (SageNode::*setter) (SageChild*))
1594 {
1595 SageChild* lhs_child = (lhs.*getter)();
1596 SageChild* rhs_child = (rhs.*getter)();
1597 ROSE_ASSERT(lhs_child && rhs_child);
1598
1599 (lhs.*setter)(rhs_child);
1600 (rhs.*setter)(lhs_child);
1601
1602 swap_parent(lhs_child, rhs_child);
1603 }
1604
1605 template <class GVisitor>
1607 {
1608 explicit
1609 DispatchHelper(GVisitor gv)
1610 : gvisitor(std::move(gv))
1611 {}
1612
1613 void operator()(SgNode* n)
1614 {
1615 if (n != nullptr) gvisitor = sg::dispatch(std::move(gvisitor), n);
1616 }
1617
1618 operator GVisitor()&& { return std::move(gvisitor); }
1619
1620 GVisitor gvisitor;
1621 };
1622
1623
1624 template <class GVisitor>
1625 static inline
1627 dispatchHelper(GVisitor gv)
1628 {
1629 return DispatchHelper<GVisitor>(std::move(gv));
1630 }
1631
1633 {
1634 SgNodePtrList operator()(SgNode& n) const
1635 {
1637 }
1638 };
1639
1640 template <class GVisitor, class SuccessorGenerator = DefaultTraversalSuccessors>
1641 static inline
1642 GVisitor traverseChildren( GVisitor gv, SgNode& n, SuccessorGenerator gen = {} )
1643 {
1644 SgNodePtrList const successors = gen(n);
1645
1646 return std::for_each( successors.begin(), successors.end(),
1647 dispatchHelper(std::move(gv))
1648 );
1649 }
1650
1651 template <class GVisitor>
1652 static inline
1653 GVisitor traverseChildren(GVisitor gv, SgNode* n)
1654 {
1655 return traverseChildren(gv, sg::deref(n));
1656 }
1657
1658 template <class SageParent, class SageChild>
1659 void linkParentChild(SageParent& parent, SageChild& child, void (SageParent::*setter)(SageChild*))
1660 {
1661 (parent.*setter)(&child);
1662 child.set_parent(&parent);
1663 }
1664
1668 template <class SageNode>
1669 typename SageNode::base_node_type&
1670 asBaseType(SageNode& n) { return n; }
1671
1672 template <class SageNode>
1673 const typename SageNode::base_node_type&
1674 asBaseType(const SageNode& n) { return n; }
1675
1676 template <class SageNode>
1677 typename SageNode::base_node_type*
1678 asBaseType(SageNode* n) { return n; }
1679
1680 template <class SageNode>
1681 const typename SageNode::base_node_type*
1682 asBaseType(const SageNode* n) { return n; }
1684}
1685#endif /* _SAGEGENERIC_H */
1686
1687
1688#if OBSOLETE_CODE
1689
1690
1693 template <class SageNode>
1694 struct TraversalFunction
1695 {
1696 typedef void (*TransformHandlerFn)(SageNode*);
1697
1698 explicit
1699 TraversalFunction(TransformHandlerFn fun)
1700 : fn(fun)
1701 {}
1702
1703 void handle(SgNode&) { /* ignore */ }
1704 void handle(SageNode& n) { fn(&n); }
1705
1706 TransformHandlerFn fn;
1707 };
1708
1711 template <class SageNode>
1712 static inline
1713 TraversalFunction<SageNode>
1714 createTraversalFunction(void (* fn)(SageNode*))
1715 {
1716 return TraversalFunction<SageNode>(fn);
1717 }
1718
1719 //
1720 // function type extractor
1721 // see https://stackoverflow.com/questions/28033251/can-you-extract-types-from-template-parameter-function-signature
1722
1723
1724 template <class GVisitor>
1725 struct TraversalClass : AstSimpleProcessing
1726 {
1727 explicit
1728 TraversalClass(GVisitor gv)
1729 : gvisitor(gv)
1730 //~ : gvisitor(std::move(gv))
1731 {}
1732
1733 void visit(SgNode* n)
1734 {
1735 gvisitor = sg::dispatch(gvisitor, n);
1736 }
1737
1738 // GVisitor&& visitor() { return std::move(gvisitor); }
1739 GVisitor visitor() { return gvisitor; }
1740
1741 GVisitor gvisitor;
1742 };
1743
1744
1745
1752 template <class F>
1753 static inline
1754 F
1755 forAllNodes(F fn, SgNode* root, AstSimpleProcessing::Order order = postorder)
1756 {
1757 ROSE_ASSERT(root);
1758
1759 TraversalClass<F> tt(fn);
1760 //~ TraversalClass<F> tt(std::move(fn));
1761
1762 tt.traverse(root, order);
1763 return tt.visitor();
1764 }
1765
1766 template <class SageNode>
1767 static inline
1768 void
1769 forAllNodes(void (*fn)(SageNode*), SgNode* root, AstSimpleProcessing::Order order = postorder)
1770 {
1771 forAllNodes(createTraversalFunction(fn), root, order);
1772 }
1773
1774#if !defined(NDEBUG)
1775 static inline
1776 std::string nodeType(const SgNode& n)
1777 {
1778 return typeid(n).name();
1779 }
1780
1781 static inline
1782 std::string nodeType(const SgNode* n)
1783 {
1784 if (n == nullptr) return "<null>";
1785
1786 return nodeType(*n);
1787 }
1788#endif /* !NDEBUG */
1789
1790#endif /* OBSOLETE_CODE */
Class for traversing the AST.
virtual void visit(SgNode *astNode)=0
this method is called at every traversed node.
String associated with a binary file.
Expression that adds two operands.
Expression that performs an arithmetic, sign-bit preserving right shift.
Expression that divides the first operand by the second.
Base class for binary expressions.
Expression that performs a logical left shift operation.
Expression that performs a logical, sign-bit non-preserving right shift.
Expression that returns the remainder when dividing the first operand by the second.
Expression that performs a logical left shift operation filling low-order bits with one.
Expression that multiplies two operands.
Expression that performs a right rotate.
Expression that subtracts the second operand from the first.
Instruction basic block.
CIL AssemblyOS node (II.22.3).
CIL AssemblyProcessor node (II.22.4).
CIL AssemblyRefOS node (II.22.6).
CIL AssemblyRefProcessor node (II.22.7).
CIL AssemblyRef node (II.22.5).
CIL Assembly node (II.22.2).
CIL ClassLayout node (II.22.8).
CIL Constant node (II.22.9).
CIL CustomAttribute node (II.22.10).
Base class for CIL branch of binary analysis IR nodes.
CIL DeclSecurity node (II.22.11).
CIL EventMap node (II.22.12).
CIL Event node (II.22.13).
CIL ExportedType node (II.22.14).
CIL FieldLayout node (II.22.16).
CIL FieldMarshal node (II.22.17).
CIL FieldRVA node (II.22.18).
CIL Field node (II.22.15).
CIL File node (II.22.19).
CIL GenericParamConstraint node (II.22.21).
CIL GenericParam node (II.22.20).
CIL ImplMap node (II.22.22).
CIL InterfaceImpl node (II.22.23).
CIL ManifestResource node (II.22.24).
CIL MemberRef node (II.22.25).
CIL SgAsmCilMetadataHeap node.
CIL SgAsmCilMetadataRoot.
Base class for CIL branch of binary analysis IR nodes.
CIL MethodDef node (II.22.26).
CIL MethodImpl node (II.22.27).
CIL MethodSemantics node (II.22.28).
CIL MethodSpec node (II.22.29).
CIL ModuleRef node (II.22.31).
CIL Module node (II.22.30).
CIL NestedClass node (II.22.32).
Base class for CIL branch of binary analysis IR nodes.
CIL Param node (II.22.33).
CIL PropertyMap node (II.22.35).
CIL Property node (II.22.34).
CIL StandAloneSig node (II.22.36).
CIL TypeDef node (II.22.37).
CIL TypeRef node (II.22.38).
CIL TypeSpec node (II.22.39).
Base class for CIL branch of binary analysis IR nodes.
Base class for CIL branch of binary analysis IR nodes.
CIL Managed Code section.
COFF symbol string table.
List of COFF symbols.
Base class for constants.
Represents the file header for DOS executables.
Expression representing a machine register.
List of dynamic linking section entries.
One entry from the dynamic linking table.
ELF section containing dynamic linking information.
List of ELF EH frame CI entries.
ELF error handling frame entry, common information entry.
List of ELF error handling frame descriptor entries.
ELF error handling frame entry frame description entry.
Represents an ELF EH frame section.
Represents the file header of an ELF binary container.
Node to hold list of ELF note entries.
One entry of an ELF notes table.
List of ELF relocation entries.
One entry of an ELF relocation table.
Represents an ELF relocation section.
Represents one entry in an ELF section table.
Represents an ELF section table.
Base class for ELF file sections.
Represents one entry of a segment table.
Represents an ELF segment table.
ELF string table section.
ELF string table.
ELF file section containing symbols.
Represents a single ELF symbol.
List of symbol version aux entries.
Auxiliary data for an ELF Symbol Version.
List of entries for the ELF symbol version definition table.
One entry from an ELF symbol version definition table.
The GNU symbol version definitions.
List of entries from a symbol version table.
Entry in an ELF symbol version table.
Hods a list of symbol version aux entries.
Auxiliary info for needed symbol version.
List of symbol version needed entries.
One entry of the ELF symbol version needed table.
GNU symbol version requirements table.
The ELF symbol version table.
Base class for many binary analysis nodes.
List of expression nodes.
Base class for expressions.
Floating point types.
Represents a synthesized function.
List of pointers to other nodes.
Base class for dynamically linked library information.
List of AST file node pointers.
Base class for binary files.
Basic information about an executable container.
List of generic file headers.
Base class for container file headers.
List of pointers to file sections.
Contiguous region of a file.
Base class for strings related to binary specimens.
Base class for string tables.
Node to hold a list of symbol node pointers.
Registers accessed indirectly.
List of SgAsmInstruction nodes.
Base class for machine instructions.
Base class for integer values.
Represents an interpretation of a binary container.
JVM LocalVariableEntry.
JVM LocalVariableTable attribute.
JVM LocalVariableTypeEntry.
JVM LocalVariableTypeTable attribute.
JVM MethodParametersEntry.
JVM MethodParameters attribute.
JVM ModuleMainClass attribute.
Reference to memory locations.
Represents one MIPS machine instruction.
Base class for all binary analysis IR nodes.
List of operands for an instruction.
List of pointers to other AST nodes.
Export file section.
Windows PE file header.
A list of PE Import Directories.
One import directory per library.
A list of imported items.
A single imported object.
Portable Executable Import Section.
List of SgAsmPERVASizePair AST nodes.
Base class for PE sections.
Represents one PowerPC machine instruction.
An ordered list of registers.
Base class for references to a machine register.
Static representation of instruction semantics.
Base class for scalar types.
Base class for statement-like subclasses.
Represents static data in an executable.
This class represents the concept of a C Assembler statement.
Strings stored in an ELF or PE container.
Strings stored in an ELF or PE container.
Declaration-like nodes that encapsulate multiple instructions.
Base class for synthesized declarations.
Base class for binary types.
Base class for unary expressions.
Expression represting negation.
Expression representing a (no-op) unary plus operation.
Expression representing sign extending.
Expression representing truncation.
Expression representing unsigned extending.
Instructions defined at runtime.
Base class for values.
Base class for vector types.
A type that doesn't represent any data.
Represents one Intel x86 machine instruction.
This class represents the rhs of a variable declaration which includes an optional assignment (e....
This class represents the concept of a block (not a basic block from control flow analysis).
This class represents the notion of a binary operator. It is derived from a SgExpression because oper...
This class represents a boolean value (expression value).
This class represents the notion of a break statement (typically used in a switch statment).
This class represents the concept of a generic call expression.
This class represents the concept of a C and C++ case option (used within a switch statement).
This class represents a cast of one type to another.
This class represents the concept of a catch within a try-catch construct used in C++ exception handl...
This class represents the concept of a C++ sequence of catch statements.
This class represents the concept of a class declaration statement. It includes the concept of an ins...
This class represents the concept of a class definition in C++.
This class represents the concept of a C++ expression built from a class name.
This class represents the concept of a class name within the compiler.
This class represents the concept of a C style extern "C" declaration. But such information (linkage)...
This class represents the concept of a C trinary conditional expression (e.g. "test ?...
This class represents the call of a class constructor to initialize a variable. For example "Foo foo;...
This class represents the concept of a C or C++ continue statement.
This class represents the concept of a contructor initializer list (used in constructor (member funct...
This class represents modifiers for SgDeclaration (declaration statements).
This class represents the concept of a declaration statement.
This class represents the concept of a C or C++ default case within a switch statement.
This class represents the concept of a C++ call to the delete operator.
This class represents a directory within a projects file structure of files and directories.
This class represents the concept of a do-while statement.
This class represents the notion of an value (expression value).
This class represents the concept of an enum declaration.
This class represents the concept of the dynamic execution of a string, file, or code object....
This class represents the concept of a C and C++ expression list.
This class represents the concept of a C or C++ statement which contains a expression.
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes,...
This class represents a source file for a project (which may contian many source files and or directo...
This class represents the notion of an value (expression value).
This class represents the variable declaration or variable initialization withn a for loop.
This class represents the concept of a for loop.
This class represents the concept of a C++ function call (which is an expression).
This class represents the concept of a function declaration statement.
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope,...
This class represents the concept of a declaration list.
This class represents the function being called and must be assembled in the SgFunctionCall with the ...
This class represents the concept of a name and a type. It may be renamed in the future to SgTypeSymb...
This class represents the function type table (stores all function types so that they can be shared i...
This class represents a type for all functions.
This class represents the concept of a namespace definition.
This class represents the concept of a C or C++ goto statement.
This class represents the concept of an "if" construct.
This class represents the notion of a declared variable.
This class represents the notion of an initializer for a variable declaration or expression in a func...
This class represents the physical disequality (often called pointer disequality) operator for langua...
This class represents the physical equality (often called pointer equality) operator for languages th...
This class represents the concept of a C or C++ label statement.
This class represents a lambda expression.
This class represents a list display.
This class represents the notion of an expression or statement which has a position within the source...
This class represents the notion of an value (expression value).
This class represents the concept of a member function declaration statement.
This class represents the member function being called and must be assembled in the SgFunctionCall wi...
This class represents the numeric negation of a value. Not to be confused with SgSubtractOp.
This class is not used in ROSE, but is intended to represent a list of SgModifierTypes (similar to th...
This class represents the base class of a number of IR nodes define modifiers within the C++ grammar.
This class represents strings within the IR nodes.
This class represents the concept of a C++ namespace alias declaration statement.
This class represents the concept of a C++ namespace declaration.
This class represents the concept of a namespace definition.
This class represents the concept of a namespace name within the compiler.
This class represents the notion of an n-ary boolean operation. This node is intended for use with Py...
This class represents the notion of an n-ary comparison operation. This node is intended for use with...
This class represents the notion of an n-ary operator. This node is intended for use with Python.
This class represents the concept of a C++ call to the new operator.
This class represents the base class for all IR nodes within Sage III.
SgNode * get_parent() const
Access function for parent node.
void set_parent(SgNode *parent)
All nodes in the AST contain a reference to a parent node.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
This class represents an object used to initialize the unparsing.
This class represents a Fortran pointer assignment. It is not some weird compound assignment operator...
This class represents the concept of a C Assembler statement (untested).
This class represents a source project, with a list of SgFile objects and global information about th...
This class represents the concept of a 'global' stmt in Python.
This class represents a OLD concept of the structure require for qualified names when they were in th...
This class represents a OLD concept of the structure require for qualified names when they were in th...
This class represents the "&" operator (applied to any lvalue).
This class represents the concept of a C Assembler statement (untested).
This class was part of CC++ support from a long time ago.
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope,...
This class represents the "sizeof()" operator (applied to any type).
This class is part of the older CC++ concept. It is not a part of C or C++ (this IR node is not used ...
This class represents the GNU extension "statement expression" (thus is non-standard C and C++).
This class represents the notion of a statement.
This class is intended to be a wrapper around SgStatements, allowing them to exist in scopes that onl...
This class represents modifiers specific to storage.
This class represents the conversion of an arbitrary expression to a string. This node is intended fo...
This class represents the base class of a numbr of IR nodes that don't otherwise fit into the existin...
This class represents the concept of a switch.
This class represents the symbol tables used in both SgScopeStatement and the SgFunctionTypeSymbolTab...
This class represents the concept of a name within the compiler.
This class represents template argument within the use of a template to build an instantiation.
This class represents the concept of a template declaration.
This class represents the concept of an instantiated class template.
This class represents the concept of a class definition in C++.
This class represents the concept of a C++ template instantiation directive.
This class represents the concept of an instantiation of function template.
This class represents the concept of an instantiation of member function template or a member functio...
This class represents the "this" operator (can be applied to any member data).
This class represents the C++ throw expression (handled as a unary operator).
This class represents the concept of try statement within the try-catch support for exception handlin...
This class represents a tuple display.
This class represents a C99 complex type.
This class represents a default type used for some IR nodes (see below).
This class represents a C99 complex type.
This class represents a string type used for SgStringVal IR node.
This class represents the base class for all types.
This class represents the notion of a typedef declaration.
This class represents a list of associated typedefs for the SgType IR nodes which reference this list...
This class represents the notion of a unary operator. It is derived from a SgExpression because opera...
This class represents the concept of a C++ using declaration.
This class represents the concept of a C++ using directive.
This class represents the notion of an value (expression value).
This class represents the variable refernece in expressions.
This class represents the concept of a C or C++ variable declaration.
This class represents the definition (initialization) of a variable.
This class represents the concept of a variable name within the compiler (a shared container for the ...
This class represents the concept of a do-while statement.
This class represents the location of the code associated with the IR node in the original source cod...
This namespace contains template functions that operate on the ROSE AST.
Definition sageGeneric.h:38
AncestorNode * _ancestor(QualSgNode &n)
implements the ancestor search
void swap_child(SageNode &lhs, SageNode &rhs, SageChild *(SageNode::*getter)() const, void(SageNode::*setter)(SageChild *))
swaps children (of equal kind) between two ancestor nodes of the same type
auto ancestor_path(const SgNode &n) -> SageNode *
std::remove_const< typenamestd::remove_reference< RoseVisitor >::type >::type dispatch(RoseVisitor &&rv, SgNode *n)
uncovers the type of SgNode and passes it to an function "handle" in RoseVisitor.
SageNode * assert_sage_type(SgNode *n, const char *f=0, size_t ln=0)
asserts that n has type SageNode
T & deref(T *ptr, const char *file=0, size_t ln=0)
dereferences an object (= checked dereference in debug mode)
Definition sageGeneric.h:99
AncestorNode * ancestor(SgNode *n)
finds an ancestor node with a given type
auto ancestorPath(const SgNode &n) -> SageNode *
returns the last parent in an ancestor path
SageNode::base_node_type & asBaseType(SageNode &n)
returns the same node n upcasted to its base type
helper class for _ancestor
projects the constness of T1 on T2
Definition sageGeneric.h:51
struct DefaultHandler
struct DispatchHandler
experimental class for returning non-null pointers
NotNull(NotNull< U > nn)
converting ctor for derived types and non-const versions of T
T * operator->() const
arrow operator returns pointer to object
T * pointer() const
explicit conversion operator
NotNull(T *p)
standard constructor testing that p is not nullptr
T & operator*() const
dereference operator returns reference to object