From 65db5d4cb510d93a9ba1e55b4dbd1325eb41ee74 Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Mon, 10 Jun 2019 22:37:31 +0000 Subject: [analyzer][tests] Use normalize_plist in place of diff_plist (`cat` cases) Summary: The `%diff_plist` lit substitution invokes `diff` with a non-portable `-I` option. The intended effect can be achieved by normalizing the inputs to `diff` beforehand. Such normalization can be done with `grep -Ev`, which is also used by other tests. This patch applies the change (adjusted for review comments) described in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html mechanically to the cases where the output file is piped to `%diff_plist` via `cat`. The changes were applied via a script, except that `clang/test/Analysis/NewDelete-path-notes.cpp` and `clang/test/Analysis/plist-macros-with-expansion.cpp` were each adjusted for the line-continuation on the relevant `RUN` step. Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62950 llvm-svn: 362996 --- clang/test/Analysis/conditional-path-notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/Analysis/conditional-path-notes.c') diff --git a/clang/test/Analysis/conditional-path-notes.c b/clang/test/Analysis/conditional-path-notes.c index fb2dd9f2ca5..192814f1b20 100644 --- a/clang/test/Analysis/conditional-path-notes.c +++ b/clang/test/Analysis/conditional-path-notes.c @@ -1,6 +1,6 @@ // RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=text -verify // RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t -// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/conditional-path-notes.c.plist - +// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/conditional-path-notes.c.plist - void testCondOp(int *p) { int *x = p ? p : p; -- cgit v1.2.3