]> granicus.if.org Git - clang/commitdiff
Reapply r362994 & co "[analyzer][tests] Add normalize_plist to replace diff_plist"
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Tue, 11 Jun 2019 14:21:32 +0000 (14:21 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Tue, 11 Jun 2019 14:21:32 +0000 (14:21 +0000)
Following r363007, which reverted r362998, r362996, and r362994,
reapply with adjustments for the CRLF differences encountered with
Windows. Namely, the `-b` option of `diff` is employed, and the `grep`
patterns have `$` replaced with `[[:space:]]*$`.

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

38 files changed:
test/Analysis/MismatchedDeallocator-path-notes.cpp
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/plist-diagnostics-include-check.cpp
test/Analysis/diagnostics/plist-multi-file.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/lambda-notes.cpp
test/Analysis/lit.local.cfg
test/Analysis/malloc-plist.c
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
test/Analysis/unix-fns.c

index 5529d495be860ea3e9f4b5b58176beb49af90868..814ad3a21b0d1001cdf0102fa5de354e26ac82e1 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=text -verify %s
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=plist %s -o %t.plist
-// RUN: tail -n +11 %t.plist | %diff_plist %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist -
+// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist -
 
 void changePointee(int *p);
 int *allocIntArray(unsigned c) {
index d556947507efc2026bacfcc0f2e7444bd9436d00..e4093fd152f6c20b2afd3b7c1e7056e784f488c7 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 -ub \
 // RUN:   %S/Inputs/expected-plists/NewDelete-path-notes.cpp.plist -
 
 void test() {
index fb2dd9f2ca548fd2ba7ff9ea9ad410e5c24ac629..5ef81d81a0fd4dc41b82727b58189fada4859938 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 -ub %S/Inputs/expected-plists/conditional-path-notes.c.plist -
 
 void testCondOp(int *p) {
   int *x = p ? p : p;
index 301a30b1c151f5f744a826f90c2ecc89aadebbbe..d202859d9ae1020ddf65a1ba9f98210023654e10 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 -ub %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist -
 
 void log();
 
index c5ea2ae20e01ba528dece39227d2359e58730144..c499aba4f0c76781db79988406542f2f86a7207a 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 -ub %S/Inputs/expected-plists/plist-diagnostics.cpp.plist -
 
 void log();
 
index 4e5fb0ea7ff53509bd93eb721cdfc9486a289aaa..034007813e4e4c095248c880ef0885379d658be5 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 -ub %S/Inputs/expected-plists/cxx-for-range.cpp.plist -
 
 extern void work();
 
index 1a1190f934d0690bbebe1d6ee329e01ffb263681..597ad4fabbc4d71ed5a06a25cb7691d2bea1d95c 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 -ub %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist -
 
 struct S {
   int *x;
index 26beda5300d1ea90af8917fd2b7b1af4fd0923de..9e6c890eec252f9f2cd8123a346384938fa9a902 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -analyzer-output=plist-multi-file %s -o %t.plist
-// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist -
+// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist -
 
 #include "Inputs/include/plist-diagnostics-include-check-macro.h"
 
index f6ff8097ff0945c59737a1cd39d62dd5967cafe9..fc1d581562bd6c02371ca6259a07e53287a2b8fe 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -o %t.plist -verify %s
-// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-multi-file.c.plist -
+// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/Inputs/expected-plists/plist-multi-file.c.plist -
 
 #include "plist-multi-file.h"
 
index f166e311c538e06cd51b0229eb76360f58457406..5937affc42b1bebd4a38062447b45ab1f1113e6f 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 -ub %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
 #include "Inputs/include/report-issues-within-main-file.h"
 
 void mainPlusHeader() {
index d537f726f865ae0652c2bd299aae1f7f3c459e9e..aded5d37019b833cbedb5f33a3903f4ddd1344f3 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 -ub %S/Inputs/expected-plists/undef-value-caller.c.plist -
 
 #include "undef-value-callee.h"
 
index de128dafc4279045d7890da6bff504f43449d606..1c755157e1eb2b092960a2ca75f917aa57276206 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 -ub %S/Inputs/expected-plists/undef-value-param.c.plist -
 
 void foo_irrelevant(int c) {
     if (c)
index 5dfd9f8216b61dbc6f335fb69c97a8393c59335a..c0c37a74bd046dc8cdf3b1815baf0da6779c187a 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 -ub %S/Inputs/expected-plists/undef-value-param.m.plist -
 
 typedef signed char BOOL;
 @protocol NSObject  - (BOOL)isEqual:(id)object; @end
index 5a58850d06843f35f883cfcd6e04135fefab8c19..dda1bfb31e745d0fb43099d0da81745053677d1a 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 -ub %S/Inputs/expected-plists/edges-new.mm.plist -
 
 //===----------------------------------------------------------------------===//
 // Forward declarations (from headers).
index 1d6fa84a9c528626d9335db57e7fd07b2288ebef..7616a5d57dcce819a5df28aecc06837a26a11ff7 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 -ub %S/Inputs/expected-plists/generics.m.plist -
 
 #if !__has_feature(objc_generics)
 #  error Compiler does not support Objective-C generics?
index dbcca5c2f79991aadbd9caca753346859df6821f..b6221073e4fe617b45ec3fd3a54b94833b44e3d4 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 -ub %S/Inputs/expected-plists/inline-plist.c.plist -
 
 // <rdar://problem/10967815>
 void mmm(int y) {
index 94289a1e8dd90b8ae215f0648a192edc21aa2a9a..a20975a9afc706439a620b34a1463e2c9af834e0 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 -ub %S/Inputs/expected-plists/inline-unique-reports.c.plist -
 
 static inline bug(int *p) {
   *p = 0xDEADBEEF;
index 8dfd14dd34dd0e337115aaf789cda1cf21eb0d04..d4ac66da367430fb018da74e591ffdbcfc7fa068 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 -ub %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..57c4a21fe8a6559b6e8207938cf3b2d6ea5852bf 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 -ub %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist -
 
 typedef struct {
   int getValue();
index 253ff949dc51ea33dec750d03f7c1af79b2e2a27..25b5e5b557e4563bd119b1cd20f369266a64c797 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 -ub %S/Inputs/expected-plists/path-notes.c.plist -
 
 void zero(int **p) {
   *p = 0;
index ef56cc76f82cfa9935242a67e381a40f37b5f0c1..59726df37b9a3f05339eda8fb09d14929fa50652 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 -ub %S/Inputs/expected-plists/path-notes.cpp.plist -
 
 class Foo {
 public:
index d48a8919762523b137b55f44dbd40e9b00c8bde4..33e4357da24e8f283dfc845bc7a0d41c1cb8db78 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 -ub %S/Inputs/expected-plists/path-notes.m.plist -
 
 typedef struct dispatch_queue_s *dispatch_queue_t;
 typedef void (^dispatch_block_t)(void);
index e436068501cc8fb8f2ab83abff61082c59c8927f..2cb3abbba768bef2bfa8e25306abd48bb1aef7f1 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core.DivideZero -analyzer-config inline-lambdas=true -analyzer-output plist -verify %s -o %t
-// RUN: tail -n +11 %t | %diff_plist %S/Inputs/expected-plists/lambda-notes.cpp.plist -
+// RUN: tail -n +11 %t | %normalize_plist | diff -ub %S/Inputs/expected-plists/lambda-notes.cpp.plist -
 
 
 // Diagnostic inside a lambda
index 84f7569152c9f7e77135dc4865a731ca09ccba4d..bfe4589438c2bf7bcf27d15cbabbce54c8e91c26 100644 (file)
@@ -9,10 +9,13 @@ import analyzer_test
 config.test_format = analyzer_test.AnalyzerTest(
         config.test_format.execute_external, config.use_z3_solver)
 
-# Diff command used by Clang Analyzer tests (when comparing .plist files
+# Filtering command used by Clang Analyzer tests (when comparing .plist files
 # with reference output)
-config.substitutions.append(('%diff_plist',
-    'diff -u -w -I "<string>/" -I "<string>.:" -I "version"'))
+config.substitutions.append(('%normalize_plist',
+    "grep -Ev '%s|%s|%s'" %
+        ('^[[:space:]]*<string>.* version .*</string>[[:space:]]*$',
+         '^[[:space:]]*<string>/.*</string>[[:space:]]*$',
+         '^[[:space:]]*<string>.:.*</string>[[:space:]]*$')))
 
 # Diff command for testing SARIF output to reference output.
 config.substitutions.append(('%diff_sarif',
index 86a921db083653435be2207eb4d8ce498f1aa8ea..1beecc9076a17b65d0986d59e2a1a426e9eaa8fa 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: rm -f %t
 // RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,unix.Malloc -analyzer-output=plist -verify -o %t -analyzer-config eagerly-assume=false %s
-// RUN: tail -n +11 %t | %diff_plist %S/Inputs/expected-plists/malloc-plist.c.plist -
+// RUN: tail -n +11 %t | %normalize_plist | diff -ub %S/Inputs/expected-plists/malloc-plist.c.plist -
 
 typedef __typeof(sizeof(int)) size_t;
 void *malloc(size_t);
index 0da25117b0676981d1f9ab2995ce4dbd3b062b9b..c3d1a99fc9219bca7f80a24ad8e4b5c9f43f0ce7 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 -ub %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..3a8322075bbb27494c6c5a0db42833e68582664b 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 -ub %S/Inputs/expected-plists/model-file.cpp.plist -
 
 typedef int* intptr;
 
index 46ca4b3e7819a4207bd024e5a7fa86205c370326..837664aa397eba5381f5e413415e9ad75f7cf831 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 -ub %S/Inputs/expected-plists/null-deref-path-notes.m.plist -
 
 @interface Root {
 @public
index 850d18327ec75b2dd6cea4b9bcfb75c824312d45..39dbb8fd7222df83abb4402a5c69cabe721e4f03 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 -ub %S/Inputs/expected-plists/nullability-notes.m.plist -
 
 #include "Inputs/system-header-simulator-for-nullability.h"
 
index 30e4ffcadd9e26900c767f027a1ea874a2535a97..cab6618a4362a7fa62bbee6e01f3f37cc2479c4f 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 -ub %S/Inputs/expected-plists/objc-arc.m.plist -
 
 typedef signed char BOOL;
 typedef struct _NSZone NSZone;
index 484e43c5dd2c8118d45e5c8785e9d48a3b8201b6..c53b3e0fbf82cca6eaa801f5ef8306747c6e4172 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 -ub %S/Inputs/expected-plists/objc-radar17039661.m.plist -
 
 @class NSString;
 typedef long NSInteger;
index c062a4782c5898d713bc1c1c0793fb5a896f1dd9..e836c78b4bb3518ff445f791476a689b864cd8c3 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 -ub \
 //   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..94f8e514c8b39a2d382def0c83090f4147b4fb08 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 -ub %S/Inputs/expected-plists/plist-macros.cpp.plist -
 
 
 typedef __typeof(sizeof(int)) size_t;
index 525f738dc7b739b8fc202b9c14d96c5c03ec928b..f9d5bccefe3c9521ea4d88286868b323d444d967 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 -ub %S/Inputs/expected-plists/plist-output-alternate.m.plist -
 
 void test_null_init(void) {
   int *p = 0;
index 21602fc47224a668c2843d2bb12d10ef131693f5..32916333cbfa0c65af5634af37f20dbcdbf4c76d 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 -ub %S/Inputs/expected-plists/plist-output.m.plist -
 
 void test_null_init(void) {
   int *p = 0;
index 23171eda1cc3f78a0e6c5e6cfbe8b9335d4cf7c8..b6072bae6769a5346e7f65acb5485815cc3c5171 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 -ub %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..ad79d72d1aa10d8225bf0231a9d42c6ce4f40267 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 -ub %S/Inputs/expected-plists/retain-release.m.objcpp.plist -
+// RUN: %normalize_plist <%t.objc.plist | diff -ub %S/Inputs/expected-plists/retain-release.m.objc.plist -
 
 void clang_analyzer_eval(int);
 
index 96e5d1d44537d8c3edfafb19d39153bba615002b..c526f1b3e4fdb301050035c0e4f82ded5e9e760b 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,unix.API,osx.API,optin.portability %s -analyzer-store=region -analyzer-output=plist -analyzer-config faux-bodies=true  -fblocks -verify -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/unix-fns.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/unix-fns.c.plist -
 // RUN: mkdir -p %t.dir
 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.API,osx.API,optin.portability -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %t.dir %s
 // RUN: rm -fR %t.dir