r367826 - Sidestep false positive due to a matching git repository name

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 03:09:07 PDT 2019


Author: rogfer01
Date: Mon Aug  5 03:09:06 2019
New Revision: 367826

URL: http://llvm.org/viewvc/llvm-project?rev=367826&view=rev
Log:
Sidestep false positive due to a matching git repository name

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.

Differential Revision: https://reviews.llvm.org/D65635

Modified:
    cfe/trunk/test/CodeGen/constant-comparison.c

Modified: cfe/trunk/test/CodeGen/constant-comparison.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/constant-comparison.c?rev=367826&r1=367825&r2=367826&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/constant-comparison.c (original)
+++ cfe/trunk/test/CodeGen/constant-comparison.c Mon Aug  5 03:09:06 2019
@@ -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;




More information about the cfe-commits mailing list