[PATCH] D55940: Detect incorrect FileCheck variable CLI definition

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 03:12:49 PST 2018


thopre added a comment.

In D55940#1337957 <https://reviews.llvm.org/D55940#1337957>, @jdenny wrote:

> In D55940#1337906 <https://reviews.llvm.org/D55940#1337906>, @probinson wrote:
>
> > This will permit `-DVALUE=` (with no value) is that a supported usage?
>
>
> I think it should be.  You could have a string that sometimes appears and sometimes is excluded entirely.
>
> > It also permits `-D=10` which I daresay doesn't mean anything.
>
> Agreed.


I've just given it a try but there seems to be some sorcery involved in that case: G contains just 10 instead of =10. Any way I could prevent the parsing from eating a leading equal sign? If not, I could reword the error message to mention leading equal sign but we would fail to diagnose an issue when passing -D'=Expression: VAR-5=10' typed by error instead of -D'TXT=Expression: VAR-5=10'.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55940





More information about the llvm-commits mailing list