[PATCH] D79963: [llvm][test] Add COM: directives before colon-less non-CHECKs in comments. NFC

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 16:52:27 PDT 2020


jdenny added a comment.

In D79963#2038903 <https://reviews.llvm.org/D79963#2038903>, @jdenny wrote:

> IMHO, any comment style will become obvious once you're used to it, and I don't see the readability issue being raised here.  Of course, those issues are highly subjective.


I've been pondering this readability objection.  Putting the other issues (like obviousness) aside for a moment, would anyone find `COM:` easier to read in lowercase?  That would make it a little more distinct from the uppercase letter that begins a sentence in a comment, and it would make it more distinct from typical FileCheck/LIT directives.  For example, from `llvm/test/MC/RISCV/rv64b-aliases-valid.s`:

  # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-b < %s \
  # RUN:     | llvm-objdump -d -r --mattr=+experimental-b - \
  # RUN:     | FileCheck -check-prefixes=CHECK-S-OBJ %s
  
  # com: The following check prefixes are used in this test:
  # com: CHECK-S-OBJ            Match both the .s and objdumped object output with
  # com:                        aliases enabled
  # com: CHECK-S-OBJ-NOALIAS    Match both the .s and objdumped object output with
  # com:                        aliases disabled
  
  # CHECK-S-OBJ-NOALIAS: andi t0, t1, 255
  # CHECK-S-OBJ: zext.b t0, t1
  zext.b x5, x6

`com:` might not be the best choice because it occurs so often in, for example, git URLs.  However, if lowercase helps, we could consider `rem:` or something similar.


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

https://reviews.llvm.org/D79963





More information about the llvm-commits mailing list