diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
commit | 71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (patch) | |
tree | 59c928209f8007777dd96568b026bdfe200691de /test | |
parent | ac616af773f5062edaaf1a0bb5610b49a22ac41f (diff) | |
download | FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.zip FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.tar.gz |
Update clang to r100520.
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/inline4.c | 14 | ||||
-rw-r--r-- | test/CodeGen/asm.c | 12 | ||||
-rw-r--r-- | test/CodeGen/builtin-memfns.c | 12 | ||||
-rw-r--r-- | test/CodeGenCXX/eh.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/new.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/value-init.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenObjC/property-dbg.m | 17 | ||||
-rw-r--r-- | test/Index/complete-enums.c | 15 | ||||
-rw-r--r-- | test/Index/complete-macros.c | 11 | ||||
-rw-r--r-- | test/Makefile | 2 | ||||
-rw-r--r-- | test/Parser/cxx-decl.cpp | 10 |
11 files changed, 90 insertions, 9 deletions
diff --git a/test/Analysis/inline4.c b/test/Analysis/inline4.c new file mode 100644 index 0000000..dd2379f --- /dev/null +++ b/test/Analysis/inline4.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f -verify %s + +int g(int a) { + return a; +} + +int f(int a) { + // Do not remove block-level expression bindings of caller when analyzing + // in the callee. + if (1 && g(a)) // The binding of '1 && g(a)' which is an UndefinedVal + // carries important information. + return 1; + return 0; +} diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c index bf1c806..ace0db9 100644 --- a/test/CodeGen/asm.c +++ b/test/CodeGen/asm.c @@ -135,3 +135,15 @@ int t18(unsigned data) { // CHECK-NEXT: extractvalue // CHECK-NEXT: extractvalue } + + +// PR6780 +int t19(unsigned data) { + int a, b; + + asm("x{abc|def|ghi}z" :"=r"(a): "r"(data)); + return a + b; + // CHECK: t19(i32 + // CHECK: = call {{.*}}asm "x$(abc$|def$|ghi$)z" +} + diff --git a/test/CodeGen/builtin-memfns.c b/test/CodeGen/builtin-memfns.c index a7b716b..e8c407f 100644 --- a/test/CodeGen/builtin-memfns.c +++ b/test/CodeGen/builtin-memfns.c @@ -1,9 +1,11 @@ -// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s -// RUN: grep '@llvm.memset.i32' %t -// RUN: grep '@llvm.memcpy.i32' %t -// RUN: grep '@llvm.memmove.i32' %t -// RUN: grep __builtin %t | count 0 +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm < %s| FileCheck %s +// CHECK: call void @llvm.memset.p0i8.i32 +// CHECK: call void @llvm.memset.p0i8.i32 +// CHECK: call void @llvm.memcpy.p0i8.p0i8.i32 +// CHECK: call void @llvm.memmove.p0i8.p0i8.i32 +// CHECK-NOT: __builtin +// CHECK: ret int main(int argc, char **argv) { unsigned char a = 0x11223344; unsigned char b = 0x11223344; diff --git a/test/CodeGenCXX/eh.cpp b/test/CodeGenCXX/eh.cpp index d233525..afd9da6 100644 --- a/test/CodeGenCXX/eh.cpp +++ b/test/CodeGenCXX/eh.cpp @@ -15,7 +15,7 @@ void test1() { // CHECK-NEXT: store i8* %{{exception|2}}, i8** %{{exception.ptr|1}} // CHECK-NEXT: %{{0|3}} = bitcast i8* %{{exception|2}} to %struct.test1_D* // CHECK-NEXT: %{{tmp|4}} = bitcast %struct.test1_D* %{{0|3}} to i8* -// CHECK-NEXT: call void @llvm.memcpy.i64(i8* %{{tmp|4}}, i8* bitcast (%struct.test1_D* @d1 to i8*), i64 8, i32 8) +// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{tmp|4}}, i8* bitcast (%struct.test1_D* @d1 to i8*), i64 8, i32 8, i1 false) // CHECK-NEXT: call void @__cxa_throw(i8* %{{exception|2}}, i8* bitcast (%0* @_ZTI7test1_D to i8*), i8* null) noreturn // CHECK-NEXT: unreachable diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp index 6ea12eb..ca7c52f 100644 --- a/test/CodeGenCXX/new.cpp +++ b/test/CodeGenCXX/new.cpp @@ -93,6 +93,6 @@ A* t10() { struct B { }; void t11() { // CHECK: call noalias i8* @_Znwm - // CHECK: call void @llvm.memset.i64( + // CHECK: call void @llvm.memset.p0i8.i64( B* b = new B(); } diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp index 8b6e43f..37891bd 100644 --- a/test/CodeGenCXX/value-init.cpp +++ b/test/CodeGenCXX/value-init.cpp @@ -18,7 +18,7 @@ void test_value_init() { // PR5800 // CHECK: store i32 17 - // CHECK: call void @llvm.memset.i64 + // CHECK: call void @llvm.memset.p0i8.i64 // CHECK: call void @_ZN1BC1Ev C c = { 17 } ; // CHECK: call void @_ZN1CD1Ev diff --git a/test/CodeGenObjC/property-dbg.m b/test/CodeGenObjC/property-dbg.m new file mode 100644 index 0000000..5bbb046 --- /dev/null +++ b/test/CodeGenObjC/property-dbg.m @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -S -g -masm-verbose -x objective-c < %s | grep setI | grep DW_AT_name +@interface Foo { + int i; +} +@property int i; +@end + +@implementation Foo +@synthesize i; +@end + +int bar(Foo *f) { + int i = 1; + f.i = 2; + i = f.i; + return i; +} diff --git a/test/Index/complete-enums.c b/test/Index/complete-enums.c new file mode 100644 index 0000000..5e712a1 --- /dev/null +++ b/test/Index/complete-enums.c @@ -0,0 +1,15 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +enum { + Red = 17, + Green, + Blue +}; + +void f() { + +} + +// RUN: c-index-test -code-completion-at=%s:11:1 %s | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: EnumConstantDecl:{ResultType enum <anonymous>}{TypedText Red} diff --git a/test/Index/complete-macros.c b/test/Index/complete-macros.c new file mode 100644 index 0000000..c33d8c0 --- /dev/null +++ b/test/Index/complete-macros.c @@ -0,0 +1,11 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +#define FOO(Arg1,Arg2) foobar + +void f() { + +} + +// RUN: c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: macro definition:{TypedText FOO}{LeftParen (}{Placeholder Arg1}{Comma , }{Placeholder Arg2}{RightParen )} diff --git a/test/Makefile b/test/Makefile index b7cb38a..e9d8945 100644 --- a/test/Makefile +++ b/test/Makefile @@ -18,7 +18,7 @@ ifndef TESTARGS ifdef VERBOSE TESTARGS = -v else -TESTARGS = -s +TESTARGS = -s -v endif endif diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index c8f2c0b..ae004ce 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -62,3 +62,13 @@ struct test4 { // PR5825 struct test5 {}; ::new(static_cast<void*>(0)) test5; // expected-error {{expected unqualified-id}} + + +// PR6782 +template<class T> +class Class1; + +class Class2 { +} // no ; + +typedef Class1<Class2> Type1; // expected-error {{cannot combine with previous 'class' declaration specifier}} |