Skip to content

Trigger rewriting to propagate itypes from one declaration to another of the same function #678

Open
@kyleheadley

Description

@kyleheadley

In this example, we'd like to save some work by having the itypes rewritten to the definition:

static int compare (int* a : itype(_Ptr<int>), int* b : itype(_Ptr<int>));

static int compare (int* a, int* b)
{
  a = 1;
  b = 1;
  return 1;
}

Internally, a and b are itypes in both prototypes, because clang merges them. The problem is that 3C avoids rewriting prototypes that don't change, and there's nothing to trigger the change. Make one of them safe, and you'll see that the other itype shows up as well.

It's possible that, because of clang's merge, 3C can't tell that there's a needed rewrite without reading the source during the rewrite phase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmark failureA bug causing a failure in our nightly benchmark testsrewriter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions