Skip to content

Bug with FastFoldingSetNode / FoldingSetNodeID::Add #9871

@RealLitb

Description

@RealLitb
mannequin
Bugzilla Link 9499
Resolution FIXED
Resolved on Apr 26, 2011 12:20
Version trunk
OS Linux
Attachments Proposed fix
CC @lattner

Extended Description

There's a problem with interaction of those two functions. FoldingSetNodeID::Add is supposed to add data to a folding set node ID. However, when we add folding set node that derives from FastFoldingSetNode, its profile function will overwrite anything that has been added previously to the folding set node ID:

// FoldingSetNodeID::Add
template
inline void Add(const T& x) { FoldingSetTrait::Profile(x, *this); }

// FastFoldingSetNode::Profile
void Profile(FoldingSetNodeID& ID) const { ID = FastID; }

I think that FoldingSetNodeID::Add should let the Profile function add stuff to a temporary folding set node id and then append all collected data to "*this".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions