]> granicus.if.org Git - clang/commitdiff
[analyzer][tests] Use diff_plist, correct order of arguments for missed cases; NFC
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Wed, 1 May 2019 15:53:56 +0000 (15:53 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Wed, 1 May 2019 15:53:56 +0000 (15:53 +0000)
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

test/Analysis/MismatchedDeallocator-path-notes.cpp
test/Analysis/diagnostics/plist-diagnostics-include-check.cpp
test/Analysis/diagnostics/plist-multi-file.c
test/Analysis/lambda-notes.cpp
test/Analysis/malloc-plist.c

index 8cbd401c5a08d8c5370a7da1b17f2fa0f54c848d..5529d495be860ea3e9f4b5b58176beb49af90868 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 -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) {
index dd86129e2fd2f1f9431e6c2e185529c31efbe0ea..26beda5300d1ea90af8917fd2b7b1af4fd0923de 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 -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"
 
index 878f373aaccfac69a9119740efd4f02e4c59ba82..a70c9aa93537f0e73b56ddbccee7e11297dce5fc 100644 (file)
@@ -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"
 
index c23ba76778794bf5dc72c40e175824dca1bc4818..e436068501cc8fb8f2ab83abff61082c59c8927f 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 -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
index 3338a63c69d147daf52b43fc4fc76d3728b25199..86a921db083653435be2207eb4d8ce498f1aa8ea 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 -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);