Fixes:
https://github.com/llvm/llvm-project/issues/58731
https://github.com/llvm/llvm-project/issues/56678
Only handles this form which was reported: !DIR$ LOOP COUNT (n1[, n2]...)
Paths
| Differential D141976
[Flang] Fix parsing error on loop count compiler directive ClosedPublic Authored by mnadeem on Jan 17 2023, 4:35 PM.
Details Summary Fixes: Only handles this form which was reported: !DIR$ LOOP COUNT (n1[, n2]...)
Diff Detail Event Timelineklausler added inline comments.
This revision is now accepted and ready to land.Jan 17 2023, 4:41 PM mnadeem marked an inline comment as done. This revision was landed with ongoing or failed builds.Jan 17 2023, 7:16 PM Closed by commit rGc2d8974a8976: [Flang] Fix parsing error on loop count compiler directive (authored by mnadeem). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions @mnadeem Please update the documentation llvm-project/flang/docs/Directives.md to include dir$ loop count. Thank you! Comment Actions
This directive is parsed but ignored, should I still add it to Directives.md?
Revision Contents
Diff 489979 flang/include/flang/Parser/dump-parse-tree.h
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/Fortran-parsers.cpp
flang/lib/Parser/unparse.cpp
flang/test/Parser/compiler-directives.f90
|
Two minor comments: I used "ignore_tkr" for the IGNORE_TKR directive parser since it actually has an underscore in its name. LOOP COUNT does not, so "loopCount" would be a better name.
Second, be sure to run your modified code through clang-format 16.x before merging.