Handle 0...MACRO foreach range normalization in included files
Open
Frontend / Parser
- Dominant language
- C++
- Stars
- 3k
- Forks
- 352
- PR merge metrics
- No merged PRs in 30d
Description
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:
```ispc
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
Contributor guide
Assessment
This issue has not been assessed yet.