Skip to content

sg::assert_sage_type

asserts that n has type SageNode

Synopsis

Declared in <SageIII/sageInterface/sageGeneric.h>

template<class SageNode>
SageNode*
assert_sage_type(
    SgNode* n,
    char const* f = 0,
    size_t ln = 0);

Description

the ROSE assert in the following example holds b/c assert_sage_type aborts if the input node is not a SgStatement

SgStatement* stmt = assert_sage_type<SgStatement>(expr.get_parent());
ROSE_ASSERT(stmt);

@{

Parameters

Name

Description

n

This class represents the base class for all IR nodes within Sage III.

Created with MrDocs