]> granicus.if.org Git - clang/commitdiff
[analyzer][tests] Use normalize_plist in place of diff_plist (`cat` cases)
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Mon, 10 Jun 2019 22:37:31 +0000 (22:37 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Mon, 10 Jun 2019 22:37:31 +0000 (22:37 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362996 91177308-0d34-0410-b5e6-96231b3b80d8

31 files changed:
test/Analysis/NewDelete-path-notes.cpp
test/Analysis/conditional-path-notes.c
test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp
test/Analysis/copypaste/plist-diagnostics.cpp
test/Analysis/cxx-for-range.cpp
test/Analysis/diagnostics/deref-track-symbolic-region.c
test/Analysis/diagnostics/report-issues-within-main-file.cpp
test/Analysis/diagnostics/undef-value-caller.c
test/Analysis/diagnostics/undef-value-param.c
test/Analysis/diagnostics/undef-value-param.m
test/Analysis/edges-new.mm
test/Analysis/generics.m
test/Analysis/inline-plist.c
test/Analysis/inline-unique-reports.c
test/Analysis/inlining/eager-reclamation-path-notes.c
test/Analysis/inlining/eager-reclamation-path-notes.cpp
test/Analysis/inlining/path-notes.c
test/Analysis/inlining/path-notes.cpp
test/Analysis/inlining/path-notes.m
test/Analysis/method-call-path-notes.cpp
test/Analysis/model-file.cpp
test/Analysis/null-deref-path-notes.m
test/Analysis/nullability-notes.m
test/Analysis/objc-arc.m
test/Analysis/objc-radar17039661.m
test/Analysis/plist-macros-with-expansion.cpp
test/Analysis/plist-macros.cpp
test/Analysis/plist-output-alternate.m
test/Analysis/plist-output.m
test/Analysis/retain-release-path-notes.m
test/Analysis/retain-release.m

index d556947507efc2026bacfcc0f2e7444bd9436d00..0864ee10dbd99d3435430ea204e2ad233aca177e 100644 (file)
@@ -11,7 +11,7 @@
 // RUN:   -analyzer-checker=cplusplus.NewDelete,unix.Malloc \
 // RUN:   -analyzer-config add-pop-up-notes=false \
 // RUN:   -analyzer-output=plist %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist \
+// RUN: %normalize_plist <%t.plist | diff -u \
 // RUN:   %S/Inputs/expected-plists/NewDelete-path-notes.cpp.plist -
 
 void test() {
index fb2dd9f2ca548fd2ba7ff9ea9ad410e5c24ac629..192814f1b204f615240e87957f881c823d61dbfb 100644 (file)
@@ -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;
index 301a30b1c151f5f744a826f90c2ecc89aadebbbe..1ad0d41a3dae6da5029d3cb98f34b75137798792 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-output=plist -analyzer-config notes-as-events=true -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist -
 
 void log();
 
index c5ea2ae20e01ba528dece39227d2359e58730144..1472c008621958fa001d72fd715ee4ede7aadb7b 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-output=plist -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-diagnostics.cpp.plist -
 
 void log();
 
index 4e5fb0ea7ff53509bd93eb721cdfc9486a289aaa..0cbb9b420482236499b0c06a8dd6bbe81da3e0d7 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core -analyzer-output=plist-multi-file -o %t.plist -verify -analyzer-config eagerly-assume=false %s
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/cxx-for-range.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/cxx-for-range.cpp.plist -
 
 extern void work();
 
index 1a1190f934d0690bbebe1d6ee329e01ffb263681..e38d9058857ebf0fd0bc77b3fec57522d36615d1 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file  %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist -
 
 struct S {
   int *x;
index f166e311c538e06cd51b0229eb76360f58457406..ad50ab72fe4453115681a7687dc4546e3bcf38cc 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -analyzer-output=plist-multi-file -analyzer-config report-in-main-source-file=true %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
 #include "Inputs/include/report-issues-within-main-file.h"
 
 void mainPlusHeader() {
index d537f726f865ae0652c2bd299aae1f7f3c459e9e..8da3372398a3013193c3718f78afd6bc87840cd5 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist -o %t %s
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/undef-value-caller.c.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/undef-value-caller.c.plist -
 
 #include "undef-value-callee.h"
 
index de128dafc4279045d7890da6bff504f43449d606..b06802bf94c5b02fc8d930b2d03c343c84891370 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file  %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/undef-value-param.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/undef-value-param.c.plist -
 
 void foo_irrelevant(int c) {
     if (c)
index 5dfd9f8216b61dbc6f335fb69c97a8393c59335a..792ce5800150893c61284f3365a0b3597d75cd59 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx -analyzer-output=plist-multi-file %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/undef-value-param.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/undef-value-param.m.plist -
 
 typedef signed char BOOL;
 @protocol NSObject  - (BOOL)isEqual:(id)object; @end
index 5a58850d06843f35f883cfcd6e04135fefab8c19..50cbbfb27ff06c4f872cf9498d4764adf0fce698 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,deadcode.DeadStores,osx.cocoa.RetainCount,unix.Malloc,unix.MismatchedDeallocator -analyzer-output=plist -o %t -w %s
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/edges-new.mm.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/edges-new.mm.plist -
 
 //===----------------------------------------------------------------------===//
 // Forward declarations (from headers).
index 1d6fa84a9c528626d9335db57e7fd07b2288ebef..9c0bf3ea78b7660ab4bc9e2a442db7fa62b929d1 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/generics.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/generics.m.plist -
 
 #if !__has_feature(objc_generics)
 #  error Compiler does not support Objective-C generics?
index dbcca5c2f79991aadbd9caca753346859df6821f..8aedd47f12cc1bf53a0698c93e49dc5dedd5fe95 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference,core.DivideZero -fblocks -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify -analyzer-config eagerly-assume=false %s
 // RUN: %clang_analyze_cc1 -analyzer-config eagerly-assume=false %s -analyzer-checker=core.NullDereference,core.DivideZero -fblocks -analyzer-output=plist -analyzer-config suppress-null-return-paths=false -o %t
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/inline-plist.c.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/inline-plist.c.plist -
 
 // <rdar://problem/10967815>
 void mmm(int y) {
index 94289a1e8dd90b8ae215f0648a192edc21aa2a9a..8cc4abbb96d8c8db2c3b326768dad8347dca2a05 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t > /dev/null 2>&1
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/inline-unique-reports.c.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/inline-unique-reports.c.plist -
 
 static inline bug(int *p) {
   *p = 0xDEADBEEF;
index 8dfd14dd34dd0e337115aaf789cda1cf21eb0d04..02807621dde77ac035f77bc15e386a435a9d789b 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/eager-reclamation-path-notes.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/eager-reclamation-path-notes.c.plist -
 
 void use(int *ptr, int val) {
   *ptr = val; // expected-warning {{Dereference of null pointer (loaded from variable 'ptr')}}
index 7cbda91b65731b168a56f38a9d8bd397d08deb44..7f8530374da1a77fe4cd2fcc0c07a0d7fb56f106 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist -
 
 typedef struct {
   int getValue();
index 253ff949dc51ea33dec750d03f7c1af79b2e2a27..ebf0080760d577ecbed3182bf0689c8218ef3c17 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.c.plist -
 
 void zero(int **p) {
   *p = 0;
index ef56cc76f82cfa9935242a67e381a40f37b5f0c1..16ef42d81c3aff9dc96d1a98876be52ebdfcd3a3 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify -Wno-tautological-undefined-compare %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 %s -o %t.plist -Wno-tautological-undefined-compare
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.cpp.plist -
 
 class Foo {
 public:
index d48a8919762523b137b55f44dbd40e9b00c8bde4..b5e9dc610263a749daf1db3ca59655dd0c717651 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=text -analyzer-config suppress-null-return-paths=false -fblocks -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -fblocks %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.m.plist -
 
 typedef struct dispatch_queue_s *dispatch_queue_t;
 typedef void (^dispatch_block_t)(void);
index 0da25117b0676981d1f9ab2995ce4dbd3b062b9b..0e2ca00884a0917a38dd35dc761dec40e353d55f 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file  %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/method-call-path-notes.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/method-call-path-notes.cpp.plist -
 
 // Test warning about null or uninitialized pointer values used as instance member
 // calls.
index c5615e92714d8a99b9d3bb032987d6ee8fadd8cf..56c85939b1ccd99ab3a5a7fe18435a757653b37d 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config faux-bodies=true,model-path=%S/Inputs/Models -analyzer-output=plist-multi-file -verify %s -o %t
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/model-file.cpp.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/model-file.cpp.plist -
 
 typedef int* intptr;
 
index 46ca4b3e7819a4207bd024e5a7fa86205c370326..7dfa0ddc5ff6cab1b4dc9de60f1fd80cb45b8e4f 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=text -fblocks -verify -Wno-objc-root-class %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=plist-multi-file -fblocks -Wno-objc-root-class %s -o %t
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/null-deref-path-notes.m.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/null-deref-path-notes.m.plist -
 
 @interface Root {
 @public
index 850d18327ec75b2dd6cea4b9bcfb75c824312d45..9429fc075ce7851a25dc1935a5400bc3e86a7818 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-output=plist -o %t.plist %s
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/nullability-notes.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/nullability-notes.m.plist -
 
 #include "Inputs/system-header-simulator-for-nullability.h"
 
index 30e4ffcadd9e26900c767f027a1ea874a2535a97..0a893abda4e30f370f23ea862005b38bba38a89d 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.cocoa.RetainCount,deadcode -verify -fblocks -analyzer-opt-analyze-nested-blocks -fobjc-arc -analyzer-output=plist-multi-file -o %t.plist %s
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/objc-arc.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/objc-arc.m.plist -
 
 typedef signed char BOOL;
 typedef struct _NSZone NSZone;
index 484e43c5dd2c8118d45e5c8785e9d48a3b8201b6..d9b60b2e54429aa577be7319f51a47455547eb81 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -analyzer-output=plist-multi-file %s -o %t
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/objc-radar17039661.m.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/objc-radar17039661.m.plist -
 
 @class NSString;
 typedef long NSInteger;
index c062a4782c5898d713bc1c1c0793fb5a896f1dd9..45deff17a7a24282c43305489a80da1467a876ad 100644 (file)
@@ -5,7 +5,7 @@
 // RUN:   -analyzer-config expand-macros=true
 //
 // Check the actual plist output.
-//   RUN: cat %t.plist | %diff_plist \
+//   RUN: %normalize_plist <%t.plist | diff -u \
 //   RUN:   %S/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist -
 //
 // Check the macro expansions from the plist output here, to make the test more
index 3eb604e2edd5fe90da11385928d5957c65bc2365..9e51fdfbd777b31f551ca5be504171da56e918fb 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -analyzer-output=plist-multi-file %s -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-macros.cpp.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-macros.cpp.plist -
 
 
 typedef __typeof(sizeof(int)) size_t;
index 525f738dc7b739b8fc202b9c14d96c5c03ec928b..60653a9d6025b4842aea9154a0e225bdebd6cf21 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -o %t %s
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/plist-output-alternate.m.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/plist-output-alternate.m.plist -
 
 void test_null_init(void) {
   int *p = 0;
index 21602fc47224a668c2843d2bb12d10ef131693f5..b2e151a23bc8b9a591ec60d2ab9812c8c2e7ac04 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-config eagerly-assume=false %s -analyzer-checker=osx.cocoa.RetainCount,deadcode.DeadStores,core -analyzer-output=plist -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-output.m.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-output.m.plist -
 
 void test_null_init(void) {
   int *p = 0;
index 23171eda1cc3f78a0e6c5e6cfbe8b9335d4cf7c8..5a897a58451d03fc32365194406dc6dfdf3df326 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=plist-multi-file %s -o %t
-// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/retain-release-path-notes.m.plist -
+// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/retain-release-path-notes.m.plist -
 
 /***
 This file is for testing the path-sensitive notes for retain/release errors.
index a5f24af749674d7887869c11b6f7bc92d5e7dc01..0dd87b375c1a19dbfdfb8e1ef6121b11c7752fb0 100644 (file)
@@ -17,8 +17,8 @@
 // RUN:     -Wno-objc-root-class -x objective-c++ -std=gnu++98\
 // RUN:     -analyzer-config osx.cocoa.RetainCount:TrackNSCFStartParam=true\
 // RUN:     -DTRACK_START_PARAM
-// RUN: cat %t.objcpp.plist | %diff_plist %S/Inputs/expected-plists/retain-release.m.objcpp.plist -
-// RUN: cat %t.objc.plist | %diff_plist %S/Inputs/expected-plists/retain-release.m.objc.plist -
+// RUN: %normalize_plist <%t.objcpp.plist | diff -u %S/Inputs/expected-plists/retain-release.m.objcpp.plist -
+// RUN: %normalize_plist <%t.objc.plist | diff -u %S/Inputs/expected-plists/retain-release.m.objc.plist -
 
 void clang_analyzer_eval(int);