Skip to content

Commit 61c848d

Browse files
Reapply r362994 & co "[analyzer][tests] Add normalize_plist to replace diff_plist"
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:]]*$`. llvm-svn: 363069
1 parent be8d03a commit 61c848d

38 files changed

+44
-41
lines changed

clang/test/Analysis/MismatchedDeallocator-path-notes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=text -verify %s
22
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=plist %s -o %t.plist
3-
// RUN: tail -n +11 %t.plist | %diff_plist %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist -
3+
// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/copypaste/Inputs/expected-plists/MismatchedDeallocator-path-notes.cpp.plist -
44

55
void changePointee(int *p);
66
int *allocIntArray(unsigned c) {

clang/test/Analysis/NewDelete-path-notes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// RUN: -analyzer-checker=cplusplus.NewDelete,unix.Malloc \
1212
// RUN: -analyzer-config add-pop-up-notes=false \
1313
// RUN: -analyzer-output=plist %s -o %t.plist
14-
// RUN: cat %t.plist | %diff_plist \
14+
// RUN: %normalize_plist <%t.plist | diff -ub \
1515
// RUN: %S/Inputs/expected-plists/NewDelete-path-notes.cpp.plist -
1616

1717
void test() {

clang/test/Analysis/conditional-path-notes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=text -verify
22
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t
3-
// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/conditional-path-notes.c.plist -
3+
// RUN: %normalize_plist <%t | diff -ub %S/Inputs/expected-plists/conditional-path-notes.c.plist -
44

55
void testCondOp(int *p) {
66
int *x = p ? p : p;

clang/test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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
2-
// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist -
2+
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist -
33

44
void log();
55

clang/test/Analysis/copypaste/plist-diagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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
2-
// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics.cpp.plist -
2+
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/plist-diagnostics.cpp.plist -
33

44
void log();
55

clang/test/Analysis/cxx-for-range.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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
2-
// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/cxx-for-range.cpp.plist -
2+
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/cxx-for-range.cpp.plist -
33

44
extern void work();
55

clang/test/Analysis/diagnostics/deref-track-symbolic-region.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
22
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file %s -o %t.plist
3-
// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist -
3+
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist -
44

55
struct S {
66
int *x;

clang/test/Analysis/diagnostics/plist-diagnostics-include-check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -analyzer-output=plist-multi-file %s -o %t.plist
2-
// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist -
2+
// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/Inputs/expected-plists/plist-diagnostics-include-check.cpp.plist -
33

44
#include "Inputs/include/plist-diagnostics-include-check-macro.h"
55

clang/test/Analysis/diagnostics/plist-multi-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -o %t.plist -verify %s
2-
// RUN: tail -n +11 %t.plist | %diff_plist %S/Inputs/expected-plists/plist-multi-file.c.plist -
2+
// RUN: tail -n +11 %t.plist | %normalize_plist | diff -ub %S/Inputs/expected-plists/plist-multi-file.c.plist -
33

44
#include "plist-multi-file.h"
55

clang/test/Analysis/diagnostics/report-issues-within-main-file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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
2-
// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
2+
// RUN: %normalize_plist <%t.plist | diff -ub %S/Inputs/expected-plists/report-issues-within-main-file.cpp.plist -
33
#include "Inputs/include/report-issues-within-main-file.h"
44

55
void mainPlusHeader() {

0 commit comments

Comments
 (0)