Skip to content

Handle 0...MACRO foreach range normalization in included files #3839

@azwolski

Description

@azwolski

PR #3816 adds a fix for cases like 0...MAXI, where Clang lexes the whole sequence as one preprocessing-number token and therefore does not expand MAXI as a macro. The current implementation only applies this fix to the main input file.

A pattern such as:

foreach (i = 0...MAXI) {
}

is normalized correctly when it appears in the main source file, but the same pattern fail when it appears in an included file

Test: https://github.com/ispc/ispc/blob/bcd89e210c59eae96fa615694146af789eb90032/tests/lit-tests/3809-include-limitation.ispc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions