Skip to content

SageInterface::attachArbitraryText

Attach an arbitrary string to a located node. A workaround to insert irregular statements or vendor‐specific attributes.

Synopsis

Declared in <SageIII/sageInterface/sageInterface.h>

[[visibility]]
PreprocessingInfo*
attachArbitraryText(
    SgLocatedNode* target,
    std::string const& text,
    PreprocessingInfo::RelativePositionType position = PreprocessingInfo::before);

Return Value

For preprocessing information including source comments, include , if, define, etc

Parameters

Name

Description

target

This class represents the notion of an expression or statement which

position

MK: Enum type to store if the directive goes before or after the corresponding line of source code

Created with MrDocs