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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 02:08:39 PDT 2020


jhenderson added a comment.

In D79963#2057893 <https://reviews.llvm.org/D79963#2057893>, @jroelofs wrote:

> I'm warming up to the idea of using `##` as the way to silence the diagnostic, since it's less invasive than `COM:`. That makes a lot of sense in source languages where `#` is already the comment character, but what about elsewhere? Should we do `@ ##` in assembler, and `// ##` in C, for example?


I haven't used these other languages in tests much in the past, but I think in one or two cases, I've just duplicated the comment pattern (e.g. `@@` or `////`). I'm not so keen on the C++-style comments duplication (too many characters), but I followed that for consistency with what I've done with `##`. The problem with that approach of course is that you'd have to somehow figure out the pattern to treat as a comment for any given file, which doesn't seem particularly fun (especially when some files can have more than one variety - .s assembly I believe can be any of `;`, `//` or `#` at least, for example. An option would be to just allow all the patterns, if doubled, regardless of file type. There's probably not much risk of false negatives with that, but I don't know for sure.


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

https://reviews.llvm.org/D79963





More information about the llvm-commits mailing list