From fcebb8d5439c1abfc336e97fb3546163313a16ad Mon Sep 17 00:00:00 2001 From: "Matt McCutchen (Correct Computation)" Date: Wed, 30 Dec 2020 12:27:19 -0500 Subject: [PATCH] Remove obsolete tests that were incorrectly resurrected during the merge in 4c4eed3c94dff03eb6ab07ee745e2ca6ce4cbea4. complex_expressionBUG was renamed back to complex_expression in 782449de18e783440dc54978d6c90968a7061c8c, and the merge incorrectly kept both copies. The other 5 tests were deleted in 03f86aff2df5501c5f9433dc98ede47f18bf40bb. One other test (lowerboundBUG) was incorrectly resurrected during that merge after it was deleted in 0398f041b367a720e8292969a0e26122adf0ffd1, but it was later deleted again in addfe3733ec3924a1cb5e0dc2264ccfb70222fee. --- clang/test/3C/anonstruct.c | 15 ------- clang/test/3C/arrinlinestruct.c | 20 --------- clang/test/3C/complex_expressionBUG.c | 58 --------------------------- clang/test/3C/complexinlinestruct.c | 31 -------------- clang/test/3C/inlinestruct_difflocs.c | 19 --------- clang/test/3C/inlinestructinfunc.c | 14 ------- 6 files changed, 157 deletions(-) delete mode 100644 clang/test/3C/anonstruct.c delete mode 100644 clang/test/3C/arrinlinestruct.c delete mode 100644 clang/test/3C/complex_expressionBUG.c delete mode 100644 clang/test/3C/complexinlinestruct.c delete mode 100644 clang/test/3C/inlinestruct_difflocs.c delete mode 100644 clang/test/3C/inlinestructinfunc.c diff --git a/clang/test/3C/anonstruct.c b/clang/test/3C/anonstruct.c deleted file mode 100644 index 4686a2d05cb4..000000000000 --- a/clang/test/3C/anonstruct.c +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -struct { - int *data; -} *x; -//CHECK: _Ptr data; -//CHECK: } *x; - -/*ensure trivial conversion*/ -void foo(int *x) { - -} - diff --git a/clang/test/3C/arrinlinestruct.c b/clang/test/3C/arrinlinestruct.c deleted file mode 100644 index 344e949310cb..000000000000 --- a/clang/test/3C/arrinlinestruct.c +++ /dev/null @@ -1,20 +0,0 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -output-postfix=checkedNOALL %s -// RUN: %clang -c %S/arrinlinestruct.checkedNOALL.c -// RUN: rm %S/arrinlinestruct.checkedNOALL.c - -struct alpha { - int *data; -}; -//CHECK: _Ptr data; -struct alpha *al[4]; -//CHECK_ALL: _Ptr al _Checked[4] = {((void *)0)}; -//CHECK_NOALL: struct alpha *al[4]; - -/*be should be made wild, whereas a should be converted*/ -struct { - int *a; -} *be[4]; -//CHECK: _Ptr a; -//CHECK: } *be[4]; diff --git a/clang/test/3C/complex_expressionBUG.c b/clang/test/3C/complex_expressionBUG.c deleted file mode 100644 index a503a01ecced..000000000000 --- a/clang/test/3C/complex_expressionBUG.c +++ /dev/null @@ -1,58 +0,0 @@ -// Tests for 3C. -// -// Tests 3c tool for complex expressions -// The following test is supposed to fail with the current tool. -// XFAIL: * -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -#include - -int * func(int *a, int *b) { - // This is a checked pointer - return *a?(2+0):b; -} -//CHECK_ALL: int * func(_Ptr a, int *b) { -//CHECK_NOALL: int * func(int *a : itype(_Ptr), int *b) { - -int main() { - int *arr; - int *c; - int *b; - b = (c = func(arr+3, 2+2)) ? 0: 2; - return 0; -} -//CHECK_ALL: _Array_ptr arr = ((void *)0); -//CHECK: int *c; -//CHECK-NEXT: int *b; - -int * bar(int *x) { x = (int*)5; return x; } -int *foo(int *y, int *w) { - int *z = 0; - z = (w = bar(w), y); - return z; -} -//CHECK: int * bar(int *x) { x = (int*)5; return x; } -//CHECK_ALL: _Array_ptr foo(_Array_ptr y, int *w) { -//CHECK_ALL: _Array_ptr z = 0; -//CHECK_NOALL: int *foo(_Ptr y, int *w) : itype(_Ptr) { -//CHECK_NOALL: _Ptr z = 0; - -void baz(int *p) { - int *q = 0 ? p : foo(0,0); - q++; -} -//CHECK_ALL: void baz(_Array_ptr p) { -//CHECK_NOALL: void baz(int *p) { -//CHECK_ALL: _Array_ptr q = 0 ? p : foo(0,0); -//CHECK_NOALL: int *q = 0 ? p : foo(0,0); - -void test() { - int *a = (int*) 0; - int **b = (int**) 0; /* <-- causes compilation failure due to issue 160*/ - - *b = (0, a); -} -//CHECK: _Ptr a = (int*) 0; -//CHECK: _Ptr<_Ptr> b = (int**) 0; diff --git a/clang/test/3C/complexinlinestruct.c b/clang/test/3C/complexinlinestruct.c deleted file mode 100644 index 22c6ef1d4e39..000000000000 --- a/clang/test/3C/complexinlinestruct.c +++ /dev/null @@ -1,31 +0,0 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -/* a, b, c below all stay as WILD pointers; d can be a _Ptr<...>*/ - - /* one decl; x rewrites to _Ptr */ -struct foo { int *x; } *a; -//CHECK: struct foo { _Ptr x; } *a; - -struct baz { int *z; }; -struct baz *d; -//CHECK: struct baz { _Ptr z; }; -//CHECK: _Ptr d = ((void *)0); - -/* two decls, not one; y stays as int * */ -struct bad { int* y; } *b, *c; -//CHECK: struct bad { int* y; } *b, *c; - - /* two decls, y should be converted */ -struct bar { int* y; } *e, *f; -//CHECK: struct bar { _Ptr y; } *e, *f; - - -void foo(void) { - a->x = (void*)0; - b->y = (void*)0; - d->z = (void*)0; - c->y = (int *)5; // forces it to WILD -} - diff --git a/clang/test/3C/inlinestruct_difflocs.c b/clang/test/3C/inlinestruct_difflocs.c deleted file mode 100644 index e22ea633bc51..000000000000 --- a/clang/test/3C/inlinestruct_difflocs.c +++ /dev/null @@ -1,19 +0,0 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -int valuable; - -static struct foo -{ - const char* name; - int* p_valuable; -} -array[] = -{ - { "mystery", &valuable } -}; - -//CHECK_ALL: _Ptr name; -//CHECK_NOALL: const char* name; -//CHECK: _Ptr p_valuable; diff --git a/clang/test/3C/inlinestructinfunc.c b/clang/test/3C/inlinestructinfunc.c deleted file mode 100644 index 4036c7ba4458..000000000000 --- a/clang/test/3C/inlinestructinfunc.c +++ /dev/null @@ -1,14 +0,0 @@ -// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -void foo(int *x) { - struct bar { int *x; } *y = 0; -} -//CHECK: struct bar { _Ptr x; } *y = 0; - -void baz(int *x) { - struct bar { char *x; } *w = 0; -} -//CHECK: struct bar { _Ptr x; } *w = 0; -