[PATCH] D104008: [ms] [llvm-ml] Warn on command-line redefinition
Eric Astor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 06:15:09 PDT 2021
epastor marked an inline comment as done.
epastor added inline comments.
================
Comment at: llvm/test/tools/llvm-ml/command_line_defines_errors.asm:1
+; RUN: not llvm-ml -filetype=s %s /Fo - /Dtest1=def /WX 2>&1 | FileCheck %s --implicit-check-not=error: --implicit-check-not=warning:
+
----------------
thakis wrote:
> epastor wrote:
> > I couldn't get lit to just detect the warning, for some reason. I'm open to suggestions!
> Hm, works for me:
>
> ```
> ; RUN: llvm-ml -filetype=s %s /Fo - /Dtest1=def 2>&1 | FileCheck %s --implicit-check-not=warning:
>
> .code
>
> ; CHECK: :[[# @LINE + 1]]:1: warning: redefining 'test1', already defined on the command line
> test1 textequ <redef>
>
> end
> ```
>
> ```
> % out/gn/bin/llvm-lit -s -vv llvm/test/tools/llvm-ml/command_line_defines_errors.asm
>
>
> Testing Time: 0.13s
> Passed: 1
> ```
... darn, I would've sworn I tried that, but apparently I kept putting it in the other file - forgetting that CHECK always requires lines to occur in order, and that the warning is emitted before any of the output lines I'm checking against.
Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104008/new/
https://reviews.llvm.org/D104008
More information about the llvm-commits
mailing list