Delete stale files.

This commit is contained in:
Roman Divacky 2009-10-15 16:31:19 +00:00
parent 98781354c3
commit a505eb93f4
23 changed files with 0 additions and 432 deletions

View File

@ -1,11 +0,0 @@
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic %s
// Once xfail_regionstore_wine_crash.c passes, move this test case
// into misc-ps.m.
void foo() {
long x = 0;
char *y = (char *) &x;
if (!*y)
return;
}

View File

@ -1,7 +0,0 @@
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s
void f() {
long x = 0;
char *y = (char*) &x;
char c = y[0] + y[1] + y[2]; // no-warning
}

View File

@ -1,47 +0,0 @@
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
typedef const struct __CFAllocator * CFAllocatorRef;
typedef struct __CFDictionary * CFMutableDictionaryRef;
typedef signed long CFIndex;
typedef CFIndex CFNumberType;
typedef const void * CFTypeRef;
typedef struct {} CFDictionaryKeyCallBacks, CFDictionaryValueCallBacks;
typedef const struct __CFNumber * CFNumberRef;
extern const CFAllocatorRef kCFAllocatorDefault;
extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks;
extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks;
enum { kCFNumberSInt32Type = 3 };
CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks);
void CFDictionaryAddValue(CFMutableDictionaryRef theDict, const void *key, const void *value);
void CFRelease(CFTypeRef cf);
CFTypeRef CFRetain(CFTypeRef cf);
extern CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr);
typedef const struct __CFArray * CFArrayRef;
typedef struct __CFArray * CFMutableArrayRef;
void CFArrayAppendValue(CFMutableArrayRef theArray, const void *value);
void f(CFMutableDictionaryRef y, void* key, void* val_key) {
CFMutableDictionaryRef x = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(y, key, x);
CFRelease(x); // the dictionary keeps a reference, so the object isn't deallocated yet
signed z = 1;
CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &z);
if (value) {
CFDictionaryAddValue(x, val_key, value); // no-warning
CFRelease(value);
CFDictionaryAddValue(y, val_key, value); // no-warning
}
}
// <rdar://problem/6560661>
// Same issue, except with "AppendValue" functions.
void f2(CFMutableArrayRef x) {
signed z = 1;
CFNumberRef value = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &z);
// CFArrayAppendValue keeps a reference to value.
CFArrayAppendValue(x, value);
CFRelease(value);
CFRetain(value);
CFRelease(value); // no-warning
}

View File

@ -1,7 +0,0 @@
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
void f() {
long x = 0;
char *y = (char*) &x;
char c = y[0] + y[1] + y[2]; // no-warning
}

View File

@ -1,11 +0,0 @@
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
// When this test passes we should put it in the misc-ps.m test file.
// This test fails now because RegionStoreManager::Retrieve() does correctly
// retrieve the first byte of 'x' when retrieving '*y'.
void foo() {
long x = 0;
char *y = (char *) &x;
if (!*y)
return;
}

View File

@ -1,13 +0,0 @@
// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
void f() {
auto a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in its own initializer}}
}
struct S { auto a; }; // expected-error{{'auto' not allowed in struct member}}
void f(auto a) // expected-error{{'auto' not allowed in function prototype}}
{
try { } catch (auto a) { } // expected-error{{'auto' not allowed in exception declaration}}
}
template <auto a = 10> class C { }; // expected-error{{'auto' not allowed in template parameter}}

View File

@ -1,4 +0,0 @@
// RUN: clang-cc -emit-llvm-bc -o - %s
// PR3869
int a(long long b) { goto *b; }

View File

@ -1,26 +0,0 @@
// RUN: clang-cc -triple i386-apple-darwin9 -mcpu=pentium4 -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1 &&
// RUN: clang-cc -triple i386-apple-darwin9 -mcpu=pentium4 -g -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1
#include <mmintrin.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int array[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
__m64 *p = (__m64 *)array;
__m64 accum = _mm_setzero_si64();
for (int i=0; i<8; ++i)
accum = _mm_add_pi32(p[i], accum);
__m64 accum2 = _mm_unpackhi_pi32(accum, accum);
accum = _mm_add_pi32(accum, accum2);
int result = _mm_cvtsi64_si32(accum);
_mm_empty();
printf("%d\n", result );
return 0;
}

View File

@ -1,18 +0,0 @@
// RUN: clang-cc -triple i386-apple-darwin9 -g -emit-llvm -o %t %s &&
// RUN: grep '@.str3 = internal constant \[8 x i8\] c"-\[A m0\]\\00"' %t &&
// RUN: grep '@.str4 = internal constant \[9 x i8\] c"\\01-\[A m0\]\\00"' %t &&
// RUN: grep '@llvm.dbg.subprogram = .* @.str3, .* @.str3, .* @.str4,' %t &&
// RUN: grep '@llvm.dbg.composite.* = .* i32 15, i64 0, i64 8, .* i32 16' %t &&
// RUN: true
@interface A @end
@implementation A // Line 15
-(void) m0 {}
@end

View File

@ -1,27 +0,0 @@
// RUN: clang-cc -triple x86_64-darwin-10 -fobjc-gc -emit-llvm -o %t %s &&
// RUN: grep objc_assign_strongCast %t | count 4 &&
// RUN: true
@interface A
@end
typedef struct s0 {
A *a[4];
} T;
T g0;
void f0(id x) {
g0.a[0] = x;
}
void f1(id x) {
((T*) &g0)->a[0] = x;
}
void f2(unsigned idx)
{
id *keys;
keys[idx] = 0;
}

View File

@ -1,17 +0,0 @@
// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
@interface A
@end
@implementation A
+(void) foo {
printf("__func__: %s\n", __func__);
printf("__FUNCTION__: %s\n", __FUNCTION__);
printf("__PRETTY_FUNCTION__: %s\n", __PRETTY_FUNCTION__);
return 0;
}
@end
int main() {
[A foo];
return 0;
}

View File

@ -1,19 +0,0 @@
// RUN: clang-cc %s -fsyntax-only -verify
// rdar://6587766
int fn1() __attribute__ ((warn_unused_result));
int fn2() __attribute__ ((pure));
int fn3() __attribute__ ((const));
int foo() {
if (fn1() < 0 || fn2(2,1) < 0 || fn3(2) < 0) // no warnings
return -1;
fn1(); // expected-warning {{expression result unused}}
fn2(92, 21); // expected-warning {{expression result unused}}
fn3(42); // expected-warning {{expression result unused}}
return 0;
}
int bar __attribute__ ((warn_unused_result)); // expected-warning {{warning: 'warn_unused_result' attribute only applies to function types}}

View File

@ -1,81 +0,0 @@
// RUN: clang-cc -ObjC -fsyntax-only %s -verify -fblocks
// FIXME: should compile
// Test for blocks with explicit return type specified.
typedef float * PF;
float gf;
@interface NSView
- (id) some_method_that_returns_id;
@end
NSView *some_object;
void some_func (NSView * (^) (id));
typedef struct dispatch_item_s *dispatch_item_t;
typedef void (^completion_block_t)(void);
typedef double (^myblock)(int);
double test(myblock I);
int main()
{
__block int x = 1;
__block int y = 2;
(void)^void *{ return 0; };
(void)^float(float y){ return y; };
(void)^double (float y, double d)
{
if (y)
return d;
else
return y;
};
const char * (^chb) (int flag, const char *arg, char *arg1) = ^ const char * (int flag, const char *arg, char *arg1) {
if (flag)
return 0;
if (flag == 1)
return arg;
else if (flag == 2)
return "";
return arg1;
};
(void)^PF { return &gf; };
some_func(^ NSView * (id whatever) { return [some_object some_method_that_returns_id]; });
double res = test(^(int z){x = y+z; return (double)z; });
}
void func()
{
completion_block_t X;
completion_block_t (^blockx)(dispatch_item_t) = ^completion_block_t (dispatch_item_t item) {
return X;
};
completion_block_t (^blocky)(dispatch_item_t) = ^(dispatch_item_t item) {
return X;
};
blockx = blocky;
}
// intent: block taking int returning block that takes char,int and returns int
int (^(^block)(double x))(char, short);
void foo() {
int one = 1;
block = ^(double x){ return ^(char c, short y) { return one + c + y; };}; // expected-error {{returning block that lives on the local stack}}
// or:
block = ^(double x){ return ^(char c, short y) { return one + (int)c + y; };}; // expected-error {{returning block that lives on the local stack}}
}

View File

@ -1,7 +0,0 @@
// RUN: clang-cc -mcpu=pentium4 -emit-pth -o %t %s &&
// RUN: clang-cc -mcpu=pentium4 -token-cache %t %s &&
// RUN: clang-cc -mcpu=pentium4 -token-cache %t %s -E %s -o /dev/null
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif

View File

@ -1,32 +0,0 @@
// RUN: clang-cc -fblocks -fsyntax-only -verify %s
int f1(int x) __attribute__((nonnull)); // expected-warning{{'nonnull' attribute applied to function with no pointer arguments}}
int f2(int *x) __attribute__ ((nonnull (1)));
int f3(int *x) __attribute__ ((nonnull (0))); // expected-error {{'nonnull' attribute parameter 1 is out of bounds}}
int f4(int *x, int *y) __attribute__ ((nonnull (1,2)));
int f5(int *x, int *y) __attribute__ ((nonnull (2,1)));
extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull));
extern void func3 (void (^block1)(), int, void (^block2)(), int)
__attribute__((nonnull(1,3)));
extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1)))
__attribute__((nonnull(2)));
void
foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)())
{
func1(cp1, cp2, i1);
func1(0, cp2, i1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func1(cp1, 0, i1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func1(cp1, cp2, 0);
func3(0, i2, cp3, i3); // expected-warning {{null passed to a callee which requires a non-null argument}}
func3(cp3, i2, 0, i3); // expected-warning {{null passed to a callee which requires a non-null argument}}
func4(0, cp1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func4(cp1, 0); // expected-warning {{null passed to a callee which requires a non-null argument}}
}

View File

@ -1,73 +0,0 @@
// RUN: clang-cc -fsyntax-only -verify %s
namespace N {
struct X { };
X operator+(X, X);
void f(X);
void g(X); // expected-note{{candidate function}}
void test_multiadd(X x) {
(void)(x + x);
}
}
namespace M {
struct Y : N::X { };
}
void f();
void test_operator_adl(N::X x, M::Y y) {
(void)(x + x);
(void)(y + y);
}
void test_func_adl(N::X x, M::Y y) {
f(x);
f(y);
(f)(x); // expected-error{{too many arguments to function call}}
::f(x); // expected-error{{too many arguments to function call}}
}
namespace N {
void test_multiadd2(X x) {
(void)(x + x);
}
}
void test_func_adl_only(N::X x) {
g(x);
}
namespace M {
int g(N::X); // expected-note{{candidate function}}
void test(N::X x) {
g(x); // expected-error{{call to 'g' is ambiguous; candidates are:}}
int i = (g)(x);
int g(N::X);
g(x); // okay; calls locally-declared function, no ADL
}
}
void test_operator_name_adl(N::X x) {
(void)operator+(x, x);
}
struct Z { };
int& f(Z);
namespace O {
char &f();
void test_global_scope_adl(Z z) {
{
int& ir = f(z);
}
}
}

View File

@ -1,5 +0,0 @@
// RUN: clang-cc -mcpu=pentium4 %s -fsyntax-only -print-stats
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif

View File

@ -1,5 +0,0 @@
// RUN: clang-cc -fsyntax-only -verify %s
// XFAIL
template<int N> void f(int (&array)[N]);
template<> void f<1>(int (&array)[1]) { }

View File

@ -1,7 +0,0 @@
// RUN: clang-cc -mcpu=pentium4 -emit-pth -o %t %s &&
// RUN: clang-cc -mcpu=pentium4 -token-cache %t %s &&
// RUN: clang-cc -mcpu=pentium4 -token-cache %t %s -E %s -o /dev/null
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif

View File

@ -1,11 +0,0 @@
// RUN: clang -fsyntax-only -Wunused -Xclang -verify %s
@interface foo
- (int)meth: (int)x: (int)y: (int)z ;
@end
@implementation foo
- (int) meth: (int)x:
(int)y: // expected-warning{{unused}}
(int) __attribute__((unused))z { return x; }
@end

View File

@ -1,4 +0,0 @@
// RUN: clang-cc -mcpu=pentium4 %s -print-stats
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif