diff --git a/clang/test/Analysis/MismatchedDeallocator-path-notes.cpp b/clang/test/Analysis/MismatchedDeallocator-path-notes.cpp index 6138af3399e9f986541431de649dbd8742a62dc0..5529d495be860ea3e9f4b5b58176beb49af90868 100644 --- a/clang/test/Analysis/MismatchedDeallocator-path-notes.cpp +++ b/clang/test/Analysis/MismatchedDeallocator-path-notes.cpp @@ -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 | %normalize_plist | diff -u %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist - +// RUN: tail -n +11 %t.plist | %diff_plist %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist - void changePointee(int *p); int *allocIntArray(unsigned c) { diff --git a/clang/test/Analysis/NewDelete-path-notes.cpp b/clang/test/Analysis/NewDelete-path-notes.cpp index 0864ee10dbd99d3435430ea204e2ad233aca177e..d556947507efc2026bacfcc0f2e7444bd9436d00 100644 --- a/clang/test/Analysis/NewDelete-path-notes.cpp +++ b/clang/test/Analysis/NewDelete-path-notes.cpp @@ -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: %normalize_plist <%t.plist | diff -u \ +// RUN: cat %t.plist | %diff_plist \ // RUN: %S/Inputs/expected-plists/NewDelete-path-notes.cpp.plist - void test() { diff --git a/clang/test/Analysis/conditional-path-notes.c b/clang/test/Analysis/conditional-path-notes.c index 192814f1b204f615240e87957f881c823d61dbfb..fb2dd9f2ca548fd2ba7ff9ea9ad410e5c24ac629 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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/conditional-path-notes.c.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/conditional-path-notes.c.plist - void testCondOp(int *p) { int *x = p ? p : p; diff --git a/clang/test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp b/clang/test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp index 1ad0d41a3dae6da5029d3cb98f34b75137798792..301a30b1c151f5f744a826f90c2ecc89aadebbbe 100644 --- a/clang/test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp +++ b/clang/test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist - void log(); diff --git a/clang/test/Analysis/copypaste/plist-diagnostics.cpp b/clang/test/Analysis/copypaste/plist-diagnostics.cpp index 1472c008621958fa001d72fd715ee4ede7aadb7b..c5ea2ae20e01ba528dece39227d2359e58730144 100644 --- a/clang/test/Analysis/copypaste/plist-diagnostics.cpp +++ b/clang/test/Analysis/copypaste/plist-diagnostics.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-diagnostics.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics.cpp.plist - void log(); diff --git a/clang/test/Analysis/cxx-for-range.cpp b/clang/test/Analysis/cxx-for-range.cpp index 0cbb9b420482236499b0c06a8dd6bbe81da3e0d7..4e5fb0ea7ff53509bd93eb721cdfc9486a289aaa 100644 --- a/clang/test/Analysis/cxx-for-range.cpp +++ b/clang/test/Analysis/cxx-for-range.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/cxx-for-range.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/cxx-for-range.cpp.plist - extern void work(); diff --git a/clang/test/Analysis/diagnostics/deref-track-symbolic-region.c b/clang/test/Analysis/diagnostics/deref-track-symbolic-region.c index e38d9058857ebf0fd0bc77b3fec57522d36615d1..1a1190f934d0690bbebe1d6ee329e01ffb263681 100644 --- a/clang/test/Analysis/diagnostics/deref-track-symbolic-region.c +++ b/clang/test/Analysis/diagnostics/deref-track-symbolic-region.c @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist - struct S { int *x; diff --git a/clang/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp b/clang/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp index b91e4ad3e2d1b20523f2b33e426cd721d727d7be..26beda5300d1ea90af8917fd2b7b1af4fd0923de 100644 --- a/clang/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp +++ b/clang/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp @@ -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 | %normalize_plist | diff -u %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist - +// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist - #include "Inputs/include/plist-diagnostics-include-check-macro.h" diff --git a/clang/test/Analysis/diagnostics/plist-multi-file.c b/clang/test/Analysis/diagnostics/plist-multi-file.c index aa26536f0ac0efe69900ba3cf2757f66b251b2e2..f6ff8097ff0945c59737a1cd39d62dd5967cafe9 100644 --- a/clang/test/Analysis/diagnostics/plist-multi-file.c +++ b/clang/test/Analysis/diagnostics/plist-multi-file.c @@ -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 | %normalize_plist | diff -u %S/Inputs/expected-plists/plist-multi-file.c.plist - +// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-multi-file.c.plist - #include "plist-multi-file.h" diff --git a/clang/test/Analysis/diagnostics/report-issues-within-main-file.cpp b/clang/test/Analysis/diagnostics/report-issues-within-main-file.cpp index ad50ab72fe4453115681a7687dc4546e3bcf38cc..f166e311c538e06cd51b0229eb76360f58457406 100644 --- a/clang/test/Analysis/diagnostics/report-issues-within-main-file.cpp +++ b/clang/test/Analysis/diagnostics/report-issues-within-main-file.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist - #include "Inputs/include/report-issues-within-main-file.h" void mainPlusHeader() { diff --git a/clang/test/Analysis/diagnostics/undef-value-caller.c b/clang/test/Analysis/diagnostics/undef-value-caller.c index 8da3372398a3013193c3718f78afd6bc87840cd5..d537f726f865ae0652c2bd299aae1f7f3c459e9e 100644 --- a/clang/test/Analysis/diagnostics/undef-value-caller.c +++ b/clang/test/Analysis/diagnostics/undef-value-caller.c @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist -o %t %s -// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/undef-value-caller.c.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/undef-value-caller.c.plist - #include "undef-value-callee.h" diff --git a/clang/test/Analysis/diagnostics/undef-value-param.c b/clang/test/Analysis/diagnostics/undef-value-param.c index b06802bf94c5b02fc8d930b2d03c343c84891370..de128dafc4279045d7890da6bff504f43449d606 100644 --- a/clang/test/Analysis/diagnostics/undef-value-param.c +++ b/clang/test/Analysis/diagnostics/undef-value-param.c @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/undef-value-param.c.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/undef-value-param.c.plist - void foo_irrelevant(int c) { if (c) diff --git a/clang/test/Analysis/diagnostics/undef-value-param.m b/clang/test/Analysis/diagnostics/undef-value-param.m index 792ce5800150893c61284f3365a0b3597d75cd59..5dfd9f8216b61dbc6f335fb69c97a8393c59335a 100644 --- a/clang/test/Analysis/diagnostics/undef-value-param.m +++ b/clang/test/Analysis/diagnostics/undef-value-param.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/undef-value-param.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/undef-value-param.m.plist - typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; @end diff --git a/clang/test/Analysis/edges-new.mm b/clang/test/Analysis/edges-new.mm index 50cbbfb27ff06c4f872cf9498d4764adf0fce698..5a58850d06843f35f883cfcd6e04135fefab8c19 100644 --- a/clang/test/Analysis/edges-new.mm +++ b/clang/test/Analysis/edges-new.mm @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/edges-new.mm.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/edges-new.mm.plist - //===----------------------------------------------------------------------===// // Forward declarations (from headers). diff --git a/clang/test/Analysis/generics.m b/clang/test/Analysis/generics.m index 9c0bf3ea78b7660ab4bc9e2a442db7fa62b929d1..1d6fa84a9c528626d9335db57e7fd07b2288ebef 100644 --- a/clang/test/Analysis/generics.m +++ b/clang/test/Analysis/generics.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/generics.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/generics.m.plist - #if !__has_feature(objc_generics) # error Compiler does not support Objective-C generics? diff --git a/clang/test/Analysis/inline-plist.c b/clang/test/Analysis/inline-plist.c index 8aedd47f12cc1bf53a0698c93e49dc5dedd5fe95..dbcca5c2f79991aadbd9caca753346859df6821f 100644 --- a/clang/test/Analysis/inline-plist.c +++ b/clang/test/Analysis/inline-plist.c @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/inline-plist.c.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/inline-plist.c.plist - // void mmm(int y) { diff --git a/clang/test/Analysis/inline-unique-reports.c b/clang/test/Analysis/inline-unique-reports.c index 8cc4abbb96d8c8db2c3b326768dad8347dca2a05..94289a1e8dd90b8ae215f0648a192edc21aa2a9a 100644 --- a/clang/test/Analysis/inline-unique-reports.c +++ b/clang/test/Analysis/inline-unique-reports.c @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t > /dev/null 2>&1 -// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/inline-unique-reports.c.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/inline-unique-reports.c.plist - static inline bug(int *p) { *p = 0xDEADBEEF; diff --git a/clang/test/Analysis/inlining/eager-reclamation-path-notes.c b/clang/test/Analysis/inlining/eager-reclamation-path-notes.c index 02807621dde77ac035f77bc15e386a435a9d789b..8dfd14dd34dd0e337115aaf789cda1cf21eb0d04 100644 --- a/clang/test/Analysis/inlining/eager-reclamation-path-notes.c +++ b/clang/test/Analysis/inlining/eager-reclamation-path-notes.c @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/eager-reclamation-path-notes.c.plist - +// RUN: cat %t.plist | %diff_plist %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')}} diff --git a/clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp b/clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp index 7f8530374da1a77fe4cd2fcc0c07a0d7fb56f106..7cbda91b65731b168a56f38a9d8bd397d08deb44 100644 --- a/clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp +++ b/clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist - typedef struct { int getValue(); diff --git a/clang/test/Analysis/inlining/path-notes.c b/clang/test/Analysis/inlining/path-notes.c index ebf0080760d577ecbed3182bf0689c8218ef3c17..253ff949dc51ea33dec750d03f7c1af79b2e2a27 100644 --- a/clang/test/Analysis/inlining/path-notes.c +++ b/clang/test/Analysis/inlining/path-notes.c @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.c.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.c.plist - void zero(int **p) { *p = 0; diff --git a/clang/test/Analysis/inlining/path-notes.cpp b/clang/test/Analysis/inlining/path-notes.cpp index 16ef42d81c3aff9dc96d1a98876be52ebdfcd3a3..ef56cc76f82cfa9935242a67e381a40f37b5f0c1 100644 --- a/clang/test/Analysis/inlining/path-notes.cpp +++ b/clang/test/Analysis/inlining/path-notes.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.cpp.plist - class Foo { public: diff --git a/clang/test/Analysis/inlining/path-notes.m b/clang/test/Analysis/inlining/path-notes.m index b5e9dc610263a749daf1db3ca59655dd0c717651..d48a8919762523b137b55f44dbd40e9b00c8bde4 100644 --- a/clang/test/Analysis/inlining/path-notes.m +++ b/clang/test/Analysis/inlining/path-notes.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/path-notes.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/path-notes.m.plist - typedef struct dispatch_queue_s *dispatch_queue_t; typedef void (^dispatch_block_t)(void); diff --git a/clang/test/Analysis/lambda-notes.cpp b/clang/test/Analysis/lambda-notes.cpp index 0ae2d3efa280f08101fa0f31a1ad971e00441cb3..e436068501cc8fb8f2ab83abff61082c59c8927f 100644 --- a/clang/test/Analysis/lambda-notes.cpp +++ b/clang/test/Analysis/lambda-notes.cpp @@ -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 | %normalize_plist | diff -u %S/Inputs/expected-plists/lambda-notes.cpp.plist - +// RUN: tail -n +11 %t | %diff_plist %S/Inputs/expected-plists/lambda-notes.cpp.plist - // Diagnostic inside a lambda diff --git a/clang/test/Analysis/lit.local.cfg b/clang/test/Analysis/lit.local.cfg index 5c94b8b240d4eb4e45c2cac16eb803c37ead635c..84f7569152c9f7e77135dc4865a731ca09ccba4d 100644 --- a/clang/test/Analysis/lit.local.cfg +++ b/clang/test/Analysis/lit.local.cfg @@ -9,13 +9,10 @@ import analyzer_test config.test_format = analyzer_test.AnalyzerTest( config.test_format.execute_external, config.use_z3_solver) -# Filtering command used by Clang Analyzer tests (when comparing .plist files +# Diff command used by Clang Analyzer tests (when comparing .plist files # with reference output) -config.substitutions.append(('%normalize_plist', - "grep -Ev '%s|%s|%s'" % - ('^[[:space:]]*.* version .*$', - '^[[:space:]]*/.*$', - '^[[:space:]]*.:.*$'))) +config.substitutions.append(('%diff_plist', + 'diff -u -w -I "/" -I ".:" -I "version"')) # Diff command for testing SARIF output to reference output. config.substitutions.append(('%diff_sarif', diff --git a/clang/test/Analysis/malloc-plist.c b/clang/test/Analysis/malloc-plist.c index 89e496150b3fccaa1c69a2dadd71c37ae9954097..86a921db083653435be2207eb4d8ce498f1aa8ea 100644 --- a/clang/test/Analysis/malloc-plist.c +++ b/clang/test/Analysis/malloc-plist.c @@ -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 | %normalize_plist | diff -u %S/Inputs/expected-plists/malloc-plist.c.plist - +// RUN: tail -n +11 %t | %diff_plist %S/Inputs/expected-plists/malloc-plist.c.plist - typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); diff --git a/clang/test/Analysis/method-call-path-notes.cpp b/clang/test/Analysis/method-call-path-notes.cpp index 0e2ca00884a0917a38dd35dc761dec40e353d55f..0da25117b0676981d1f9ab2995ce4dbd3b062b9b 100644 --- a/clang/test/Analysis/method-call-path-notes.cpp +++ b/clang/test/Analysis/method-call-path-notes.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/method-call-path-notes.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/method-call-path-notes.cpp.plist - // Test warning about null or uninitialized pointer values used as instance member // calls. diff --git a/clang/test/Analysis/model-file.cpp b/clang/test/Analysis/model-file.cpp index 56c85939b1ccd99ab3a5a7fe18435a757653b37d..c5615e92714d8a99b9d3bb032987d6ee8fadd8cf 100644 --- a/clang/test/Analysis/model-file.cpp +++ b/clang/test/Analysis/model-file.cpp @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/model-file.cpp.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/model-file.cpp.plist - typedef int* intptr; diff --git a/clang/test/Analysis/null-deref-path-notes.m b/clang/test/Analysis/null-deref-path-notes.m index 7dfa0ddc5ff6cab1b4dc9de60f1fd80cb45b8e4f..46ca4b3e7819a4207bd024e5a7fa86205c370326 100644 --- a/clang/test/Analysis/null-deref-path-notes.m +++ b/clang/test/Analysis/null-deref-path-notes.m @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/null-deref-path-notes.m.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/null-deref-path-notes.m.plist - @interface Root { @public diff --git a/clang/test/Analysis/nullability-notes.m b/clang/test/Analysis/nullability-notes.m index 9429fc075ce7851a25dc1935a5400bc3e86a7818..850d18327ec75b2dd6cea4b9bcfb75c824312d45 100644 --- a/clang/test/Analysis/nullability-notes.m +++ b/clang/test/Analysis/nullability-notes.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/nullability-notes.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/nullability-notes.m.plist - #include "Inputs/system-header-simulator-for-nullability.h" diff --git a/clang/test/Analysis/objc-arc.m b/clang/test/Analysis/objc-arc.m index 0a893abda4e30f370f23ea862005b38bba38a89d..30e4ffcadd9e26900c767f027a1ea874a2535a97 100644 --- a/clang/test/Analysis/objc-arc.m +++ b/clang/test/Analysis/objc-arc.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/objc-arc.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/objc-arc.m.plist - typedef signed char BOOL; typedef struct _NSZone NSZone; diff --git a/clang/test/Analysis/objc-radar17039661.m b/clang/test/Analysis/objc-radar17039661.m index d9b60b2e54429aa577be7319f51a47455547eb81..484e43c5dd2c8118d45e5c8785e9d48a3b8201b6 100644 --- a/clang/test/Analysis/objc-radar17039661.m +++ b/clang/test/Analysis/objc-radar17039661.m @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/objc-radar17039661.m.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/objc-radar17039661.m.plist - @class NSString; typedef long NSInteger; diff --git a/clang/test/Analysis/plist-macros-with-expansion.cpp b/clang/test/Analysis/plist-macros-with-expansion.cpp index 45deff17a7a24282c43305489a80da1467a876ad..c062a4782c5898d713bc1c1c0793fb5a896f1dd9 100644 --- a/clang/test/Analysis/plist-macros-with-expansion.cpp +++ b/clang/test/Analysis/plist-macros-with-expansion.cpp @@ -5,7 +5,7 @@ // RUN: -analyzer-config expand-macros=true // // Check the actual plist output. -// RUN: %normalize_plist <%t.plist | diff -u \ +// RUN: cat %t.plist | %diff_plist \ // 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 diff --git a/clang/test/Analysis/plist-macros.cpp b/clang/test/Analysis/plist-macros.cpp index 9e51fdfbd777b31f551ca5be504171da56e918fb..3eb604e2edd5fe90da11385928d5957c65bc2365 100644 --- a/clang/test/Analysis/plist-macros.cpp +++ b/clang/test/Analysis/plist-macros.cpp @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-macros.cpp.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-macros.cpp.plist - typedef __typeof(sizeof(int)) size_t; diff --git a/clang/test/Analysis/plist-output-alternate.m b/clang/test/Analysis/plist-output-alternate.m index 60653a9d6025b4842aea9154a0e225bdebd6cf21..525f738dc7b739b8fc202b9c14d96c5c03ec928b 100644 --- a/clang/test/Analysis/plist-output-alternate.m +++ b/clang/test/Analysis/plist-output-alternate.m @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -o %t %s -// RUN: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/plist-output-alternate.m.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/plist-output-alternate.m.plist - void test_null_init(void) { int *p = 0; diff --git a/clang/test/Analysis/plist-output.m b/clang/test/Analysis/plist-output.m index b2e151a23bc8b9a591ec60d2ab9812c8c2e7ac04..21602fc47224a668c2843d2bb12d10ef131693f5 100644 --- a/clang/test/Analysis/plist-output.m +++ b/clang/test/Analysis/plist-output.m @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/plist-output.m.plist - +// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-output.m.plist - void test_null_init(void) { int *p = 0; diff --git a/clang/test/Analysis/retain-release-path-notes.m b/clang/test/Analysis/retain-release-path-notes.m index 5a897a58451d03fc32365194406dc6dfdf3df326..23171eda1cc3f78a0e6c5e6cfbe8b9335d4cf7c8 100644 --- a/clang/test/Analysis/retain-release-path-notes.m +++ b/clang/test/Analysis/retain-release-path-notes.m @@ -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: %normalize_plist <%t | diff -u %S/Inputs/expected-plists/retain-release-path-notes.m.plist - +// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/retain-release-path-notes.m.plist - /*** This file is for testing the path-sensitive notes for retain/release errors. diff --git a/clang/test/Analysis/retain-release.m b/clang/test/Analysis/retain-release.m index 0dd87b375c1a19dbfdfb8e1ef6121b11c7752fb0..a5f24af749674d7887869c11b6f7bc92d5e7dc01 100644 --- a/clang/test/Analysis/retain-release.m +++ b/clang/test/Analysis/retain-release.m @@ -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: %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 - +// 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 - void clang_analyzer_eval(int); diff --git a/clang/test/Analysis/unix-fns.c b/clang/test/Analysis/unix-fns.c index 2f59dc6458d595c8b9ae054889e162bacdd9d889..96e5d1d44537d8c3edfafb19d39153bba615002b 100644 --- a/clang/test/Analysis/unix-fns.c +++ b/clang/test/Analysis/unix-fns.c @@ -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: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/unix-fns.c.plist - +// RUN: cat %t.plist | %diff_plist %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