From: Hubert Tong Date: Wed, 1 May 2019 15:53:56 +0000 (+0000) Subject: [analyzer][tests] Use diff_plist, correct order of arguments for missed cases; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e35d49b2898a69ac6457f39e2f6c1a0e26849e75;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359691 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/MismatchedDeallocator-path-notes.cpp b/test/Analysis/MismatchedDeallocator-path-notes.cpp index 8cbd401c5a..5529d495be 100644 --- a/test/Analysis/MismatchedDeallocator-path-notes.cpp +++ b/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 | diff -u -w -I "/" -I ".:" -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) { diff --git a/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp b/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp index dd86129e2f..26beda5300 100644 --- a/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp +++ b/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 | diff -u -w -I "/" -I ".:" -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" diff --git a/test/Analysis/diagnostics/plist-multi-file.c b/test/Analysis/diagnostics/plist-multi-file.c index 878f373aac..a70c9aa935 100644 --- a/test/Analysis/diagnostics/plist-multi-file.c +++ b/test/Analysis/diagnostics/plist-multi-file.c @@ -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 "/" -I ".:" -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" diff --git a/test/Analysis/lambda-notes.cpp b/test/Analysis/lambda-notes.cpp index c23ba76778..e436068501 100644 --- a/test/Analysis/lambda-notes.cpp +++ b/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 | diff -u -w -I "/" -I ".:" -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 diff --git a/test/Analysis/malloc-plist.c b/test/Analysis/malloc-plist.c index 3338a63c69..86a921db08 100644 --- a/test/Analysis/malloc-plist.c +++ b/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 | diff -u -w -I "/" -I ".:" -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);