[PATCH] D65635: Sidestep false positive due to a matching git repository name

Roger Ferrer Ibanez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 23:52:31 PDT 2019

rogfer01 created this revision.
rogfer01 added reviewers: eli.friedman, ddunbar.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
rogfer01 edited reviewers, added: efriedma; removed: eli.friedman.

I have failures in this test because the `grep @b` gets confused by the `clang version` including a repository name like this

  !1 = !{!"clang version 10.0.0 (git at build-machine:llvm/llvm-monorepo.git fe958c0e8c89ec663c8e551936778e2cbb460154)"}

I considered something like `grep -w` but my understanding of the manpages was that that isn't super portable. So I think it is easier to make clang not to output that metadata using `-fno-ident`.

  rG LLVM Github Monorepo



Index: clang/test/CodeGen/constant-comparison.c
--- clang/test/CodeGen/constant-comparison.c
+++ clang/test/CodeGen/constant-comparison.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm %s -o - 2>&1 | not grep warning
-// RUN: %clang_cc1 -emit-llvm %s -o - | grep @b | count 1
+// RUN: %clang_cc1 -fno-ident -emit-llvm %s -o - | grep @b | count 1
 int a, b;
 int *c1 = 1 < 2 ? &a : &b;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65635.212975.patch
Type: text/x-patch
Size: 455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/f68f7acb/attachment.bin>

More information about the cfe-commits mailing list