[PATCH] D154101: [MC] Add three-state parseDirective as a replacement for ParseDirective

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 16:41:02 PDT 2023


barannikov88 marked an inline comment as done.
barannikov88 added inline comments.


================
Comment at: llvm/test/MC/MSP430/directive-byte-word-long-invalid.s:3
+
+# CHECK: [[@LINE+3]]:6: error: unknown token in expression
+# CHECK: [[@LINE+3]]:6: error: unknown token in expression
----------------
MaskRay wrote:
> `:[[#@LINE+3]]`
> 
> `[[@LINE]]` is deprecated FileCheck syntax. I add a `:` before the line number just in case `3` matches `13`, but I don't feel useful including the filename, so... Feel free to not adopt my leading `:` suggestion.
> `:[[#@LINE+3]]`
> 
> `[[@LINE]]` is deprecated FileCheck syntax. I add a `:` before the line number just in case `3` matches `13`, but I don't feel useful including the filename, so... Feel free to not adopt my leading `:` suggestion.

I didn't know that it is deprecated, thanks for the heads-up. I used the new syntax in new tests, but kept the legacy syntax in the CSKY test for consistency with existing checks.

About the extra colon, I think it is not worth the effort ;) The chances that it will match a different line seem fairly low.



================
Comment at: llvm/test/MC/MSP430/directive-byte-word-long-invalid.s:3
+
+# CHECK: [[@LINE+3]]:6: error: unknown token in expression
+# CHECK: [[@LINE+3]]:6: error: unknown token in expression
----------------
barannikov88 wrote:
> MaskRay wrote:
> > `:[[#@LINE+3]]`
> > 
> > `[[@LINE]]` is deprecated FileCheck syntax. I add a `:` before the line number just in case `3` matches `13`, but I don't feel useful including the filename, so... Feel free to not adopt my leading `:` suggestion.
> > `:[[#@LINE+3]]`
> > 
> > `[[@LINE]]` is deprecated FileCheck syntax. I add a `:` before the line number just in case `3` matches `13`, but I don't feel useful including the filename, so... Feel free to not adopt my leading `:` suggestion.
> 
> I didn't know that it is deprecated, thanks for the heads-up. I used the new syntax in new tests, but kept the legacy syntax in the CSKY test for consistency with existing checks.
> 
> About the extra colon, I think it is not worth the effort ;) The chances that it will match a different line seem fairly low.
> 
> `:[[#@LINE+3]]`
> 
> `[[@LINE]]` is deprecated FileCheck syntax. I add a `:` before the line number just in case `3` matches `13`, but I don't feel useful including the filename, so... Feel free to not adopt my leading `:` suggestion.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154101



More information about the llvm-commits mailing list