[PATCH] D145871: TableGen: Introduce `!range` operator for half-opened interval

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 16:29:52 PDT 2023


chapuni added inline comments.


================
Comment at: llvm/docs/TableGen/ProgRef.rst:1780-1787
+``!range([``\ *a*\ ``,``] *b*\ ``)``
+    This operator produces half-open range sequence ``[a : b)`` as ``list<int>``.
+    *a* is ``0`` by default. ``!range(4)`` is equivalent to ``!range(0, 4)``.
+    Its result is `[0, 1, 2, 3]`.
+    The result is `[]<list<int>>` if *a* ``>=`` *b*.
+
+``!range([``\ *list*\ ``)``
----------------
Paul-C-Anagnostopoulos wrote:
> chapuni wrote:
> > @Paul-C-Anagnostopoulos Is it insufficient or improper?
> Say: The result is ...
> If *a* ``>=`` *b*, then the result is ...
How about them?

- Omit the sentence "Its result is...", since it is obvious.
- Revise the last sentence as your suggestion.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145871/new/

https://reviews.llvm.org/D145871



More information about the llvm-commits mailing list