Author: hubert.reinterpretcast Date: Wed May 1 08:53:56 2019 New Revision: 359691
URL: http://llvm.org/viewvc/llvm-project?rev=359691&view=rev Log: [analyzer][tests] Use diff_plist, correct order of arguments for missed cases; NFC For various files under `clang/test/Analysis`, D52036 applied `%diff_plist` to replace `diff` invocations with certain options and D56340 swapped the order of the arguments so that the reference file comes first. The tests that used `tail` to filter the test output were not modified accordingly. This patch applies the corresponding update to those tests. Modified: cfe/trunk/test/Analysis/MismatchedDeallocator-path-notes.cpp cfe/trunk/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c cfe/trunk/test/Analysis/lambda-notes.cpp cfe/trunk/test/Analysis/malloc-plist.c Modified: cfe/trunk/test/Analysis/MismatchedDeallocator-path-notes.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/MismatchedDeallocator-path-notes.cpp?rev=359691&r1=359690&r2=359691&view=diff ============================================================================== --- cfe/trunk/test/Analysis/MismatchedDeallocator-path-notes.cpp (original) +++ cfe/trunk/test/Analysis/MismatchedDeallocator-path-notes.cpp Wed May 1 08:53:56 2019 @@ -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 -u -w -I "<string>/" -I "<string>.:" -I "version" - %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) { Modified: cfe/trunk/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp?rev=359691&r1=359690&r2=359691&view=diff ============================================================================== --- cfe/trunk/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp (original) +++ cfe/trunk/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp Wed May 1 08:53:56 2019 @@ -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 -u -w -I "<string>/" -I "<string>.:" -I "version" - %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" Modified: cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c?rev=359691&r1=359690&r2=359691&view=diff ============================================================================== --- cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c (original) +++ cfe/trunk/test/Analysis/diagnostics/plist-multi-file.c Wed May 1 08:53:56 2019 @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-html -o %t.plist -verify %s -// RUN: tail -n +11 %t.plist | diff -u -w -I "<string>/" -I "<string>.:" -I "version" --ignore-matching-lines=report - %S/Inputs/expected-plists/plist-multi-file.c.plist +// RUN: tail -n +11 %t.plist | %diff_plist --ignore-matching-lines=report %S/Inputs/expected-plists/plist-multi-file.c.plist - #include "plist-multi-file.h" Modified: cfe/trunk/test/Analysis/lambda-notes.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/lambda-notes.cpp?rev=359691&r1=359690&r2=359691&view=diff ============================================================================== --- cfe/trunk/test/Analysis/lambda-notes.cpp (original) +++ cfe/trunk/test/Analysis/lambda-notes.cpp Wed May 1 08:53:56 2019 @@ -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 -u -w -I "<string>/" -I "<string>.:" -I "version" - %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 Modified: cfe/trunk/test/Analysis/malloc-plist.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/malloc-plist.c?rev=359691&r1=359690&r2=359691&view=diff ============================================================================== --- cfe/trunk/test/Analysis/malloc-plist.c (original) +++ cfe/trunk/test/Analysis/malloc-plist.c Wed May 1 08:53:56 2019 @@ -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 -u -w -I "<string>/" -I "<string>.:" -I "version" - %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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits