diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
commit | abe15e553e58165e7692c0d0842865c488ed7b45 (patch) | |
tree | 1e68501209c9133fbda8d45171e59f8d6f12dd55 /test | |
parent | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (diff) |
Notes
Diffstat (limited to 'test')
1929 files changed, 4759 insertions, 3059 deletions
diff --git a/test/Analysis/CFDateGC.m b/test/Analysis/CFDateGC.m index 3c11465157ae8..01cb4a4613321 100644 --- a/test/Analysis/CFDateGC.m +++ b/test/Analysis/CFDateGC.m @@ -1,8 +1,8 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=basic %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=range %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -disable-free %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=basic %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=range %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -disable-free %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/Analysis/CFNumber.c b/test/Analysis/CFNumber.c index 76d7ebbf15fca..9e6f093c56bfd 100644 --- a/test/Analysis/CFNumber.c +++ b/test/Analysis/CFNumber.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s typedef signed long CFIndex; typedef const struct __CFAllocator * CFAllocatorRef; diff --git a/test/Analysis/CFRetainRelease_NSAssertionHandler.m b/test/Analysis/CFRetainRelease_NSAssertionHandler.m index 16f8db21e835b..e2d1c88b8f79e 100644 --- a/test/Analysis/CFRetainRelease_NSAssertionHandler.m +++ b/test/Analysis/CFRetainRelease_NSAssertionHandler.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region typedef struct objc_selector *SEL; typedef signed char BOOL; diff --git a/test/Analysis/CGColorSpace.c b/test/Analysis/CGColorSpace.c index d69f86e9fd4a1..7390b5a801172 100644 --- a/test/Analysis/CGColorSpace.c +++ b/test/Analysis/CGColorSpace.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef struct CGColorSpace *CGColorSpaceRef; extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void); diff --git a/test/Analysis/CheckNSError.m b/test/Analysis/CheckNSError.m index ec44b22aa4fc6..e3b1be0a5bf4e 100644 --- a/test/Analysis/CheckNSError.m +++ b/test/Analysis/CheckNSError.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef signed char BOOL; diff --git a/test/Analysis/MissingDealloc.m b/test/Analysis/MissingDealloc.m index cb5339a4cdab9..daa6460da81b9 100644 --- a/test/Analysis/MissingDealloc.m +++ b/test/Analysis/MissingDealloc.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s -verify typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; diff --git a/test/Analysis/NSPanel.m b/test/Analysis/NSPanel.m index c98a685b1f40b..b2863e089a809 100644 --- a/test/Analysis/NSPanel.m +++ b/test/Analysis/NSPanel.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // BEGIN delta-debugging reduced header stuff diff --git a/test/Analysis/NSString-failed-cases.m b/test/Analysis/NSString-failed-cases.m index b7f8be07cbcdf..2b8242f0d019d 100644 --- a/test/Analysis/NSString-failed-cases.m +++ b/test/Analysis/NSString-failed-cases.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // XFAIL: * //===----------------------------------------------------------------------===// diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m index d7804dc5f42aa..fb44309b12489 100644 --- a/test/Analysis/NSString.m +++ b/test/Analysis/NSString.m @@ -1,13 +1,13 @@ -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // ==-- FIXME: -analyzer-store=basic fails on this file (false negatives). --== -// NOTWORK: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s && -// NOTWORK: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && -// NOTWORK: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && -// NOTWORK: clang -cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s && +// NOTWORK: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && +// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && +// NOTWORK: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/Analysis/NSWindow.m b/test/Analysis/NSWindow.m index 6d017293cc682..acd3278c474e0 100644 --- a/test/Analysis/NSWindow.m +++ b/test/Analysis/NSWindow.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=range -verify %s // These declarations were reduced using Delta-Debugging from Foundation.h // on Mac OS X. The test cases are below. diff --git a/test/Analysis/NoReturn.m b/test/Analysis/NoReturn.m index ad441a3b9b841..9d3de0f89a438 100644 --- a/test/Analysis/NoReturn.m +++ b/test/Analysis/NoReturn.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s #include <stdarg.h> diff --git a/test/Analysis/ObjCProperties.m b/test/Analysis/ObjCProperties.m index 89d8f9b297b1b..1749d71f359da 100644 --- a/test/Analysis/ObjCProperties.m +++ b/test/Analysis/ObjCProperties.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify // The point of this test cases is to exercise properties in the static // analyzer diff --git a/test/Analysis/ObjCRetSigs.m b/test/Analysis/ObjCRetSigs.m index 416ef1c8eed87..cdc81993b81f8 100644 --- a/test/Analysis/ObjCRetSigs.m +++ b/test/Analysis/ObjCRetSigs.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-methodsigs -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-methodsigs -verify %s int printf(const char *, ...); diff --git a/test/Analysis/PR2599.m b/test/Analysis/PR2599.m index ea71ad2a237b4..e866ee6cb2708 100644 --- a/test/Analysis/PR2599.m +++ b/test/Analysis/PR2599.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s typedef const void * CFTypeRef; typedef const struct __CFString * CFStringRef; diff --git a/test/Analysis/PR2978.m b/test/Analysis/PR2978.m index 428997f709c67..a70e34ac78005 100644 --- a/test/Analysis/PR2978.m +++ b/test/Analysis/PR2978.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc %s -verify // Tests for the checker which checks missing/extra ivar 'release' calls // in dealloc. diff --git a/test/Analysis/PR3991.m b/test/Analysis/PR3991.m index a1d465734df7e..38566d5f6c180 100644 --- a/test/Analysis/PR3991.m +++ b/test/Analysis/PR3991.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s //===----------------------------------------------------------------------===// // Delta-debugging produced forward declarations. diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c index 2a833c48ff133..0354c06c78102 100644 --- a/test/Analysis/array-struct.c +++ b/test/Analysis/array-struct.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s struct s { int data; diff --git a/test/Analysis/blocks.m b/test/Analysis/blocks.m index 50a9d06e8f933..ef43751ce1b86 100644 --- a/test/Analysis/blocks.m +++ b/test/Analysis/blocks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Mac OS X headers: diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c index 3c6b83b723917..947f63ef48b63 100644 --- a/test/Analysis/casts.c +++ b/test/Analysis/casts.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // Test if the 'storage' region gets properly initialized after it is cast to // 'struct sockaddr *'. diff --git a/test/Analysis/casts.m b/test/Analysis/casts.m index fb4252014b01a..790f63f244dbe 100644 --- a/test/Analysis/casts.m +++ b/test/Analysis/casts.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // Test function pointer casts. Currently we track function addresses using // loc::FunctionVal. Because casts can be arbitrary, do we need to model diff --git a/test/Analysis/cfref_PR2519.c b/test/Analysis/cfref_PR2519.c index 48f757e51a71e..c673736dcd783 100644 --- a/test/Analysis/cfref_PR2519.c +++ b/test/Analysis/cfref_PR2519.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef unsigned char Boolean; typedef signed long CFIndex; diff --git a/test/Analysis/cfref_rdar6080742.c b/test/Analysis/cfref_rdar6080742.c index 27b4c51f96b70..f3027336c4b20 100644 --- a/test/Analysis/cfref_rdar6080742.c +++ b/test/Analysis/cfref_rdar6080742.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // This test case was reported in <rdar:problem/6080742>. // It tests path-sensitivity with respect to '!(cfstring != 0)' (negation of inequality). diff --git a/test/Analysis/complex.c b/test/Analysis/complex.c index 605255e555ab7..2b4f2c41179b0 100644 --- a/test/Analysis/complex.c +++ b/test/Analysis/complex.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s #include <stdint.h> diff --git a/test/Analysis/concrete-address.c b/test/Analysis/concrete-address.c index fdede4beec706..443e36485307b 100644 --- a/test/Analysis/concrete-address.c +++ b/test/Analysis/concrete-address.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s void foo() { int *p = (int*) 0x10000; // Should not crash here. diff --git a/test/Analysis/conditional-op-missing-lhs.c b/test/Analysis/conditional-op-missing-lhs.c index 4b03785799010..7db9284386971 100644 --- a/test/Analysis/conditional-op-missing-lhs.c +++ b/test/Analysis/conditional-op-missing-lhs.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -warn-uninit-values -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -warn-uninit-values -verify %s void f1() { diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c index a0e889f2daa0b..63c9d0d97a448 100644 --- a/test/Analysis/dead-stores.c +++ b/test/Analysis/dead-stores.c @@ -1,8 +1,8 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -fblocks -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -fblocks -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -fblocks -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -fblocks -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -fblocks -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -fblocks -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -fblocks -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -fblocks -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -fblocks -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -fblocks -verify %s void f1() { int k, y; diff --git a/test/Analysis/dead-stores.cpp b/test/Analysis/dead-stores.cpp index 363cfdd98cc61..9778a11c921ab 100644 --- a/test/Analysis/dead-stores.cpp +++ b/test/Analysis/dead-stores.cpp @@ -1,15 +1,15 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s //===----------------------------------------------------------------------===// // Basic dead store checking (but in C++ mode). //===----------------------------------------------------------------------===// int j; -void f1() { +void test1() { int x = 4; ++x; // expected-warning{{never read}} @@ -26,14 +26,69 @@ void f1() { // Dead store checking involving constructors. //===----------------------------------------------------------------------===// -class Test1 { +class Test2 { int &x; public: - Test1(int &y) : x(y) {} - ~Test1() { ++x; } + Test2(int &y) : x(y) {} + ~Test2() { ++x; } }; -int test_ctor_1(int x) { - { Test1 a(x); } // no-warning +int test2(int x) { + { Test2 a(x); } // no-warning return x; } + +//===----------------------------------------------------------------------===// +// Dead store checking involving CXXTemporaryExprs +//===----------------------------------------------------------------------===// + +namespace TestTemp { + template<typename _Tp> + class pencil { + public: + ~pencil() throw() {} + }; + template<typename _Tp, typename _Number2> struct _Row_base { + _Row_base(const pencil<_Tp>& x) {} + }; + template<typename _Tp, typename _Number2 = TestTemp::pencil<_Tp> > + class row : protected _Row_base<_Tp, _Number2> { + typedef _Row_base<_Tp, _Number2> _Base; + typedef _Number2 pencil_type; + public: + explicit row(const pencil_type& __a = pencil_type()) : _Base(__a) {} + }; +} + +void test2_b() { + TestTemp::row<const char*> x; // no-warning +} + +//===----------------------------------------------------------------------===// +// Test references. +//===----------------------------------------------------------------------===// + +void test3_a(int x) { + ++x; // expected-warning{{never read}} +} + +void test3_b(int &x) { + ++x; // no-warninge +} + +void test3_c(int x) { + int &y = x; + // Shows the limitation of dead stores tracking. The write is really + // dead since the value cannot escape the function. + ++y; // no-warning +} + +void test3_d(int &x) { + int &y = x; + ++y; // no-warning +} + +void test3_e(int &x) { + int &y = x; +} + diff --git a/test/Analysis/dead-stores.m b/test/Analysis/dead-stores.m index 4ad3c0a42da43..d4a20a81fba65 100644 --- a/test/Analysis/dead-stores.m +++ b/test/Analysis/dead-stores.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/Analysis/delegates.m b/test/Analysis/delegates.m index df97866b85587..876e3a0606865 100644 --- a/test/Analysis/delegates.m +++ b/test/Analysis/delegates.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s //===----------------------------------------------------------------------===// diff --git a/test/Analysis/elementtype.c b/test/Analysis/elementtype.c index f3eee26342411..4f79a31912a15 100644 --- a/test/Analysis/elementtype.c +++ b/test/Analysis/elementtype.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s typedef struct added_obj_st { int type; diff --git a/test/Analysis/exercise-ps.c b/test/Analysis/exercise-ps.c index 13f075de5ea18..27094c8576c5c 100644 --- a/test/Analysis/exercise-ps.c +++ b/test/Analysis/exercise-ps.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // // Just exercise the analyzer on code that has at one point caused issues // (i.e., no assertions or crashes). diff --git a/test/Analysis/fields.c b/test/Analysis/fields.c index e341918500362..2a71114e39d41 100644 --- a/test/Analysis/fields.c +++ b/test/Analysis/fields.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=basic -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=region -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=basic -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=region -verify unsigned foo(); typedef struct bf { unsigned x:2; } bf; diff --git a/test/Analysis/func.c b/test/Analysis/func.c index 449a4c29ced8a..8a951f8dcb5e2 100644 --- a/test/Analysis/func.c +++ b/test/Analysis/func.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s void f(void) { void (*p)(void); diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c index 0c5142ba4d3f1..4d771eeb4bd3d 100644 --- a/test/Analysis/malloc.c +++ b/test/Analysis/malloc.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void free(void *); @@ -43,3 +43,11 @@ int *f5() { q = realloc(q, 20); return q; // no-warning } + +void f6() { + int *p = malloc(10); + if (!p) + return; // no-warning + else + free(p); +} diff --git a/test/Analysis/misc-ps-64.m b/test/Analysis/misc-ps-64.m index ec4c3b4c65e9a..3f8836bfca4fe 100644 --- a/test/Analysis/misc-ps-64.m +++ b/test/Analysis/misc-ps-64.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -fblocks %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fblocks %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -fblocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fblocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s // <rdar://problem/6440393> - A bunch of misc. failures involving evaluating // these expressions and building CFGs. These tests are here to prevent diff --git a/test/Analysis/misc-ps-basic-store.m b/test/Analysis/misc-ps-basic-store.m index 6af63f947291f..2ae09ad38a59f 100644 --- a/test/Analysis/misc-ps-basic-store.m +++ b/test/Analysis/misc-ps-basic-store.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fblocks %s //--------------------------------------------------------------------------- // Test case 'checkaccess_union' differs for region store and basic store. diff --git a/test/Analysis/misc-ps-eager-assume.m b/test/Analysis/misc-ps-eager-assume.m index e636c21b94908..c23efab416e9b 100644 --- a/test/Analysis/misc-ps-eager-assume.m +++ b/test/Analysis/misc-ps-eager-assume.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s -analyzer-eagerly-assume +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s -analyzer-eagerly-assume // Delta-reduced header stuff (needed for test cases). typedef signed char BOOL; diff --git a/test/Analysis/misc-ps-ranges.m b/test/Analysis/misc-ps-ranges.m index 92e20d647debf..760b4d743357c 100644 --- a/test/Analysis/misc-ps-ranges.m +++ b/test/Analysis/misc-ps-ranges.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s // <rdar://problem/6776949> // main's 'argc' argument is always > 0 diff --git a/test/Analysis/misc-ps-region-store-i386.m b/test/Analysis/misc-ps-region-store-i386.m index f9df55270b66c..bb98668bde739 100644 --- a/test/Analysis/misc-ps-region-store-i386.m +++ b/test/Analysis/misc-ps-region-store-i386.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks %s // Here is a case where a pointer is treated as integer, invalidated as an // integer, and then used again as a pointer. This test just makes sure diff --git a/test/Analysis/misc-ps-region-store-x86_64.m b/test/Analysis/misc-ps-region-store-x86_64.m index 01d99f24c68f0..3f30327e1886a 100644 --- a/test/Analysis/misc-ps-region-store-x86_64.m +++ b/test/Analysis/misc-ps-region-store-x86_64.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks %s // Here is a case where a pointer is treated as integer, invalidated as an // integer, and then used again as a pointer. This test just makes sure diff --git a/test/Analysis/misc-ps-region-store.cpp b/test/Analysis/misc-ps-region-store.cpp new file mode 100644 index 0000000000000..225abb5aa19a4 --- /dev/null +++ b/test/Analysis/misc-ps-region-store.cpp @@ -0,0 +1,91 @@ +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s + +// Test basic handling of references. +char &test1_aux(); +char *test1() { + return &test1_aux(); +} + +// Test test1_aux() evaluates to char &. +char test1_as_rvalue() { + return test1_aux(); +} + +// Test passing a value as a reference. The 'const' in test2_aux() adds +// an ImplicitCastExpr, which is evaluated as an lvalue. +int test2_aux(const int &n); +int test2(int n) { + return test2_aux(n); +} + +int test2_b_aux(const short &n); +int test2_b(int n) { + return test2_b_aux(n); +} + +// Test getting the lvalue of a derived and converting it to a base. This +// previously crashed. +class Test3_Base {}; +class Test3_Derived : public Test3_Base {}; + +int test3_aux(Test3_Base &x); +int test3(Test3_Derived x) { + return test3_aux(x); +} + +int test_init_in_condition_aux(); +int test_init_in_condition() { + if (int x = test_init_in_condition_aux()) { // no-warning + return 1; + } + return 0; +} + +int test_init_in_condition_switch() { + switch (int x = test_init_in_condition_aux()) { // no-warning + case 1: + return 0; + case 2: + if (x == 2) + return 0; + else { + // Unreachable. + int *p = 0; + *p = 0xDEADBEEF; // no-warning + } + default: + break; + } + return 0; +} + +int test_init_in_condition_while() { + int z = 0; + while (int x = ++z) { // no-warning + if (x == 2) + break; + } + + if (z == 2) + return 0; + + int *p = 0; + *p = 0xDEADBEEF; // no-warning + return 0; +} + + +int test_init_in_condition_for() { + int z = 0; + for (int x = 0; int y = ++z; ++x) { + if (x == y) // no-warning + break; + } + if (z == 1) + return 0; + + int *p = 0; + *p = 0xDEADBEEF; // no-warning + return 0; +} diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m index e736e0f37cdb7..7f29c99a44d76 100644 --- a/test/Analysis/misc-ps-region-store.m +++ b/test/Analysis/misc-ps-region-store.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s typedef struct objc_selector *SEL; typedef signed char BOOL; @@ -23,6 +23,13 @@ extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); @end extern NSString * const NSConnectionReplyMode; +#ifdef TEST_64 +typedef long long int64_t; +typedef int64_t intptr_t; +#else +typedef int int32_t; +typedef int32_t intptr_t; +#endif //--------------------------------------------------------------------------- // Test case 'checkaccess_union' differs for region store and basic store. @@ -636,3 +643,44 @@ void rdar7468209() { }(); } +//===----------------------------------------------------------------------===// +// PR 5857 - Test loading an integer from a byte array that has also been +// reinterpreted to be loaded as a field. +//===----------------------------------------------------------------------===// + +typedef struct { int x; } TestFieldLoad; +int pr5857(char *src) { + TestFieldLoad *tfl = (TestFieldLoad *) (intptr_t) src; + int y = tfl->x; + long long *z = (long long *) (intptr_t) src; + long long w = 0; + int n = 0; + for (n = 0; n < y; ++n) { + // Previously we crashed analyzing this statement. + w = *z++; + } + return 1; +} + +//===----------------------------------------------------------------------===// +// PR 4358 - Without field-sensitivity, this code previously triggered +// a false positive that 'uninit' could be uninitialized at the call +// to pr4358_aux(). +//===----------------------------------------------------------------------===// + +struct pr4358 { + int bar; + int baz; +}; +void pr4358_aux(int x); +void pr4358(struct pr4358 *pnt) { + int uninit; + if (pnt->bar < 3) { + uninit = 1; + } else if (pnt->baz > 2) { + uninit = 3; + } else if (pnt->baz <= 2) { + uninit = 2; + } + pr4358_aux(uninit); // no-warning +} diff --git a/test/Analysis/misc-ps-region-store.mm b/test/Analysis/misc-ps-region-store.mm new file mode 100644 index 0000000000000..fd92759012f42 --- /dev/null +++ b/test/Analysis/misc-ps-region-store.mm @@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s + +//===------------------------------------------------------------------------------------------===// +// This files tests our path-sensitive handling of Objective-c++ files. +//===------------------------------------------------------------------------------------------===// + +// Test basic handling of references. +char &test1_aux(); +char *test1() { + return &test1_aux(); +} + +// Test test1_aux() evaluates to char &. +char test1_as_rvalue() { + return test1_aux(); +} + +// Test basic handling of references with Objective-C classes. +@interface Test1 +- (char&) foo; +@end + +char* Test1_harness(Test1 *p) { + return &[p foo]; +} + +char Test1_harness_b(Test1 *p) { + return [p foo]; +} + diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index c97ef951c5aa3..53b9b6f4fa67a 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -1,8 +1,8 @@ // NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued. -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fblocks %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -fobjc-gc -analyzer-constraints=basic -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fblocks %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fblocks %s typedef struct objc_ivar *Ivar; typedef struct objc_selector *SEL; diff --git a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m index 227945620d78c..f4f4e5c32431d 100644 --- a/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m +++ b/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -triple i386-apple-darwin8 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s 2>&1 | FileCheck -check-prefix=darwin8 %s -// RUN: clang -cc1 -triple i386-apple-darwin8 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin8 %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s 2>&1 | FileCheck -check-prefix=darwin9 %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin9 %s +// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s 2>&1 | FileCheck -check-prefix=darwin8 %s +// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin8 %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s 2>&1 | FileCheck -check-prefix=darwin9 %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s 2>&1 | FileCheck -check-prefix=darwin9 %s @interface MyClass {} - (void *)voidPtrM; diff --git a/test/Analysis/no-exit-cfg.c b/test/Analysis/no-exit-cfg.c index eb4fc8d41aaec..d7800f8f030b6 100644 --- a/test/Analysis/no-exit-cfg.c +++ b/test/Analysis/no-exit-cfg.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // This is a test case for the issue reported in PR 2819: // http://llvm.org/bugs/show_bug.cgi?id=2819 diff --git a/test/Analysis/no-outofbounds.c b/test/Analysis/no-outofbounds.c index 8aa194d31b874..dc553ccf2f77e 100644 --- a/test/Analysis/no-outofbounds.c +++ b/test/Analysis/no-outofbounds.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s -// RUN: clang -cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s +// RUN: %clang_cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s // XFAIL: * //===----------------------------------------------------------------------===// diff --git a/test/Analysis/null-deref-ps-region.c b/test/Analysis/null-deref-ps-region.c index 8f5fe9fb10c16..dfd76e9dfd860 100644 --- a/test/Analysis/null-deref-ps-region.c +++ b/test/Analysis/null-deref-ps-region.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -verify %s // The store for 'a[1]' should not be removed mistakenly. SymbolicRegions may diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index 8bfc1f337aa10..6dd50a3452983 100644 --- a/test/Analysis/null-deref-ps.c +++ b/test/Analysis/null-deref-ps.c @@ -1,7 +1,7 @@ -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -analyzer-no-purge-dead -verify %s -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -analyzer-no-purge-dead -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef unsigned uintptr_t; diff --git a/test/Analysis/outofbound.c b/test/Analysis/outofbound.c index a866ad905b3bd..2142e9e1f73b1 100644 --- a/test/Analysis/outofbound.c +++ b/test/Analysis/outofbound.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s char f1() { char* s = "abcd"; diff --git a/test/Analysis/override-werror.c b/test/Analysis/override-werror.c index e17361ebe4182..a2a8ec6b87e63 100644 --- a/test/Analysis/override-werror.c +++ b/test/Analysis/override-werror.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=basic -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=region -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=basic -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=region -verify // This test case illustrates that using '-analyze' overrides the effect of // -Werror. This allows basic warnings not to interfere with producing diff --git a/test/Analysis/plist-output.m b/test/Analysis/plist-output.m index 7f49340b78855..a584de8a47bb1 100644 --- a/test/Analysis/plist-output.m +++ b/test/Analysis/plist-output.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-output=plist -o - %s | FileCheck %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-output=plist -o - %s | FileCheck %s void test_null_init(void) { int *p = 0; diff --git a/test/Analysis/pr4209.m b/test/Analysis/pr4209.m index 3a32649ee722d..da288e943b4fe 100644 --- a/test/Analysis/pr4209.m +++ b/test/Analysis/pr4209.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // This test case was crashing due to how CFRefCount.cpp resolved the // ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr. diff --git a/test/Analysis/pr_2542_rdar_6793404.m b/test/Analysis/pr_2542_rdar_6793404.m index 761448caf952e..890fa04540dc2 100644 --- a/test/Analysis/pr_2542_rdar_6793404.m +++ b/test/Analysis/pr_2542_rdar_6793404.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=region -verify %s // BEGIN delta-debugging reduced header stuff diff --git a/test/Analysis/pr_4164.c b/test/Analysis/pr_4164.c index d38f4b3e2de27..b21b1dcf787a3 100644 --- a/test/Analysis/pr_4164.c +++ b/test/Analysis/pr_4164.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // PR 4164: http://llvm.org/bugs/show_bug.cgi?id=4164 // diff --git a/test/Analysis/ptr-arith.c b/test/Analysis/ptr-arith.c index 2adbbe211d7fb..be504866745d1 100644 --- a/test/Analysis/ptr-arith.c +++ b/test/Analysis/ptr-arith.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s void f1() { int a[10]; diff --git a/test/Analysis/rdar-6442306-1.m b/test/Analysis/rdar-6442306-1.m index 28fa83a3af6ee..1eae5d779dd68 100644 --- a/test/Analysis/rdar-6442306-1.m +++ b/test/Analysis/rdar-6442306-1.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=basic -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=region -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=basic -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref %s -analyzer-store=region -verify typedef int bar_return_t; typedef struct { diff --git a/test/Analysis/rdar-6540084.m b/test/Analysis/rdar-6540084.m index 7940fc637b079..d4c67a1e66bb3 100644 --- a/test/Analysis/rdar-6540084.m +++ b/test/Analysis/rdar-6540084.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s // // This test exercises the live variables analysis (LiveVariables.cpp). // The case originally identified a non-termination bug. diff --git a/test/Analysis/rdar-6541136-region.c b/test/Analysis/rdar-6541136-region.c index fbbf40814c9ae..9afffcbe6078a 100644 --- a/test/Analysis/rdar-6541136-region.c +++ b/test/Analysis/rdar-6541136-region.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s +// RUN: %clang_cc1 -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s struct tea_cheese { unsigned magic; }; typedef struct tea_cheese kernel_tea_cheese_t; diff --git a/test/Analysis/rdar-6541136.c b/test/Analysis/rdar-6541136.c index 18dc3c8460023..423fe4b05a242 100644 --- a/test/Analysis/rdar-6541136.c +++ b/test/Analysis/rdar-6541136.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic %s +// RUN: %clang_cc1 -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic %s struct tea_cheese { unsigned magic; }; typedef struct tea_cheese kernel_tea_cheese_t; diff --git a/test/Analysis/rdar-6562655.m b/test/Analysis/rdar-6562655.m index 95f876efee50d..185649f57268f 100644 --- a/test/Analysis/rdar-6562655.m +++ b/test/Analysis/rdar-6562655.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region -verify %s // // This test case mainly checks that the retain/release checker doesn't crash // on this file. diff --git a/test/Analysis/rdar-6582778-basic-store.c b/test/Analysis/rdar-6582778-basic-store.c index e1a06947d04b2..a4229f7671902 100644 --- a/test/Analysis/rdar-6582778-basic-store.c +++ b/test/Analysis/rdar-6582778-basic-store.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s typedef const void * CFTypeRef; typedef double CFTimeInterval; diff --git a/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m b/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m index 060a91a49e85c..225074ba863c2 100644 --- a/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m +++ b/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify typedef struct Foo { int x; } Bar; diff --git a/test/Analysis/rdar-7168531.m b/test/Analysis/rdar-7168531.m index 683dc745c6c40..8a84b4bc239ba 100644 --- a/test/Analysis/rdar-7168531.m +++ b/test/Analysis/rdar-7168531.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=region -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=basic +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=region +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=basic // Note that the target triple is important for this test case. It specifies that we use the // fragile Objective-C ABI. diff --git a/test/Analysis/refcnt_naming.m b/test/Analysis/refcnt_naming.m index 417162b6dbf61..66210c312aebd 100644 --- a/test/Analysis/refcnt_naming.m +++ b/test/Analysis/refcnt_naming.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s typedef const struct __CFString * CFStringRef; typedef const struct __CFAllocator * CFAllocatorRef; diff --git a/test/Analysis/region-1.m b/test/Analysis/region-1.m index 8d332cfb75013..1b95ac4b0c29c 100644 --- a/test/Analysis/region-1.m +++ b/test/Analysis/region-1.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // // This test case simply should not crash. It evaluates the logic of not // using MemRegion::getRValueType in incorrect places. diff --git a/test/Analysis/retain-release-basic-store.m b/test/Analysis/retain-release-basic-store.m index 744032ba77c5a..58321bb388dc3 100644 --- a/test/Analysis/retain-release-basic-store.m +++ b/test/Analysis/retain-release-basic-store.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/Analysis/retain-release-gc-only.m b/test/Analysis/retain-release-gc-only.m index 97fa6124484cf..fcec46edd2598 100644 --- a/test/Analysis/retain-release-gc-only.m +++ b/test/Analysis/retain-release-gc-only.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc-only -fblocks %s -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -fobjc-gc-only -fblocks -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc-only -fblocks %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -fobjc-gc-only -fblocks -verify %s //===----------------------------------------------------------------------===// // Header stuff. diff --git a/test/Analysis/retain-release-region-store.m b/test/Analysis/retain-release-region-store.m index 2b75ff9ea89b1..35dc6e7110814 100644 --- a/test/Analysis/retain-release-region-store.m +++ b/test/Analysis/retain-release-region-store.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m index 969249cdeeb30..f5d985ebd4489 100644 --- a/test/Analysis/retain-release.m +++ b/test/Analysis/retain-release.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -fblocks -verify %s -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -fblocks -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s #if __has_feature(attribute_ns_returns_retained) #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) diff --git a/test/Analysis/security-syntax-checks.m b/test/Analysis/security-syntax-checks.m index c63d58901e46c..cfdb030746dc6 100644 --- a/test/Analysis/security-syntax-checks.m +++ b/test/Analysis/security-syntax-checks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -warn-security-syntactic %s -verify +// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -warn-security-syntactic %s -verify // <rdar://problem/6336718> rule request: floating point used as loop // condition (FLP30-C, FLP-30-CPP) @@ -48,6 +48,7 @@ int setuid(uid_t); int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); extern void check(int); +void abort(void); void test_setuid() { diff --git a/test/Analysis/sizeofpointer.c b/test/Analysis/sizeofpointer.c index eace4f873bc29..82fda04114d23 100644 --- a/test/Analysis/sizeofpointer.c +++ b/test/Analysis/sizeofpointer.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -warn-sizeof-pointer -verify %s +// RUN: %clang_cc1 -analyze -warn-sizeof-pointer -verify %s struct s { }; diff --git a/test/Analysis/stack-addr-ps.c b/test/Analysis/stack-addr-ps.c index a358165a22deb..e58c7804ddbac 100644 --- a/test/Analysis/stack-addr-ps.c +++ b/test/Analysis/stack-addr-ps.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -fblocks -verify %s -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -fblocks -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -fblocks -verify %s int* f1() { int x = 0; diff --git a/test/Analysis/uninit-msg-expr.m b/test/Analysis/uninit-msg-expr.m index 6a2ada536f8ad..c8a9e3ccbb220 100644 --- a/test/Analysis/uninit-msg-expr.m +++ b/test/Analysis/uninit-msg-expr.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/Analysis/uninit-ps-rdar6145427.m b/test/Analysis/uninit-ps-rdar6145427.m index 594a6f0dcd885..d4e3b31a23829 100644 --- a/test/Analysis/uninit-ps-rdar6145427.m +++ b/test/Analysis/uninit-ps-rdar6145427.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -verify -analyzer-store=basic -checker-cfref %s -// RUN: clang -cc1 -analyze -verify -analyzer-store=region -checker-cfref %s +// RUN: %clang_cc1 -analyze -verify -analyzer-store=basic -checker-cfref %s +// RUN: %clang_cc1 -analyze -verify -analyzer-store=region -checker-cfref %s // Delta-Debugging reduced preamble. typedef signed char BOOL; diff --git a/test/Analysis/uninit-vals-ps-region.c b/test/Analysis/uninit-vals-ps-region.c index 5bcf74dcabc85..ce86ad05320a8 100644 --- a/test/Analysis/uninit-vals-ps-region.c +++ b/test/Analysis/uninit-vals-ps-region.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -verify %s struct s { int data; diff --git a/test/Analysis/uninit-vals-ps.c b/test/Analysis/uninit-vals-ps.c index a2824c023396b..12287a2df375d 100644 --- a/test/Analysis/uninit-vals-ps.c +++ b/test/Analysis/uninit-vals-ps.c @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -verify %s struct FPRec { void (*my_func)(int * x); diff --git a/test/Analysis/uninit-vals.c b/test/Analysis/uninit-vals.c index c48544e3c555f..b0769ba6bce1e 100644 --- a/test/Analysis/uninit-vals.c +++ b/test/Analysis/uninit-vals.c @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -warn-uninit-values -verify %s +// RUN: %clang_cc1 -analyze -warn-uninit-values -verify %s int f1() { int x; diff --git a/test/Analysis/uninit-vals.m b/test/Analysis/uninit-vals.m index 43bab9e79134e..037e227be6687 100644 --- a/test/Analysis/uninit-vals.m +++ b/test/Analysis/uninit-vals.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=basic -verify %s +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -verify %s typedef unsigned int NSUInteger; diff --git a/test/Analysis/unions-region.m b/test/Analysis/unions-region.m index 1c48e798808d9..7fd1b44f05fa3 100644 --- a/test/Analysis/unions-region.m +++ b/test/Analysis/unions-region.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify +// RUN: %clang_cc1 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify //===-- unions-region.m ---------------------------------------------------===// // diff --git a/test/Analysis/unused-ivars.m b/test/Analysis/unused-ivars.m index 55c482aa8b3f7..2ad886fdb3a12 100644 --- a/test/Analysis/unused-ivars.m +++ b/test/Analysis/unused-ivars.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fblocks -analyze -warn-objc-unused-ivars %s -verify +// RUN: %clang_cc1 -fblocks -analyze -warn-objc-unused-ivars %s -verify //===--- BEGIN: Delta-debugging reduced headers. --------------------------===// diff --git a/test/CXX/basic/basic.def.odr/p2-typeid.cpp b/test/CXX/basic/basic.def.odr/p2-typeid.cpp index 881212d74ba4a..55debe3ca731d 100644 --- a/test/CXX/basic/basic.def.odr/p2-typeid.cpp +++ b/test/CXX/basic/basic.def.odr/p2-typeid.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++ [basic.def.odr]p2: // An expression is potentially evaluated unless it [...] is the diff --git a/test/CXX/basic/basic.link/p9.cpp b/test/CXX/basic/basic.link/p9.cpp index ecff3eebafecc..bd16b02d7badf 100644 --- a/test/CXX/basic/basic.link/p9.cpp +++ b/test/CXX/basic/basic.link/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: This test is woefully incomplete. namespace N { } // expected-note{{here}} diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2-template-id.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2-template-id.cpp index e2c76f9183362..f650ad517a198 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2-template-id.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2-template-id.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N1 { struct X { }; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp index 677df8284a72c..ee01416c7b1ba 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { struct X { }; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p3.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p3.cpp index ae5590cd3c146..c4c2c8d60596a 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p3.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: embellish diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp index 8f0bed8789fe6..b59e6ca320e0a 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { class A { @@ -32,7 +32,7 @@ namespace D { namespace Test { void test() { func(A::A()); - func(B::B()); // expected-error {{ no matching function for call to 'func' }} + func(B::B()); // expected-error {{use of undeclared identifier 'func'}} func(C::C()); A::A() + A::A(); B::B() + B::B(); diff --git a/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp b/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp index cb9d942ba6f69..76b6e2b574652 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.elab/templateid.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // elaborated-type-specifier: // class-key '::'? nested-name-specifier? 'template'? simple-template-id diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp index 88bc813363fa9..7a6210007eb93 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace Ints { int zero = 0; // expected-note {{candidate found by name lookup is 'Ints::zero'}} diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p3.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p3.cpp index 7a51a7bb1df07..dc0f8b4af23c8 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p3.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // This is basically paraphrased from the standard. diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p4.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p4.cpp index 2c0ce80d8ce69..38eccfa2248bf 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p4.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { int a; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp index 78af521c91030..5045baccb4d0a 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { struct x {}; // expected-note {{candidate found by name lookup is 'A::x'}} diff --git a/test/CXX/basic/basic.lookup/basic.lookup.udir/p1.cpp b/test/CXX/basic/basic.lookup/basic.lookup.udir/p1.cpp index 04aef1e39e40a..ab0dc248f3dc1 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.udir/p1.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.udir/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // When looking up a namespace-name in a using-directive or // namespace-alias-definition, only namespace names are considered. diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp index 1b56ecd27d68d..a1cf529741b9d 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s static const int a = 10; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p12.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p12.cpp index aee8acf5c05ac..878ff078bc267 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p12.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p12.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S {}; S E0; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp index afd6623605721..58d7ff4d16afb 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S { static const int f0 = 0; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p14.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p14.cpp index 141a5732c1d3f..0fa4f650b0bb3 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p14.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p14.cpp @@ -1,11 +1,18 @@ -// RUN: clang-cc -fsyntax-only -verify %s -// XFAIL: * +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// C++0x [basic.lookup.unqual]p14: +// If a variable member of a namespace is defined outside of the +// scope of its namespace then any name used in the definition of +// the variable member (after the declarator-id) is looked up as if +// the definition of the variable member occurred in its namespace. namespace N { struct S {}; S i; extern S j; + extern S j2; } int i = 2; N::S N::j = i; +N::S N::j2(i); diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp index 418059dc74ce1..253d15e90178d 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // XFAIL: * class C { diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp index 7fd1b53c2cb0e..20a7ae05a12a3 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int f; diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp new file mode 100644 index 0000000000000..e57954609907e --- /dev/null +++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp @@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5741 +namespace test0 { + struct A { + struct B { }; + struct C; + }; + + struct A::C : B { }; +} + +// Test that successive base specifiers don't screw with each other. +namespace test1 { + struct Opaque1 {}; + struct Opaque2 {}; + + struct A { + struct B { B(Opaque1); }; + }; + struct B { + B(Opaque2); + }; + + struct C : A, B { + // Apparently the base-or-member lookup is actually ambiguous + // without this qualification. + C() : A(), test1::B(Opaque2()) {} + }; +} + +// Test that we don't find the injected class name when parsing base +// specifiers. +namespace test2 { + template <class T> struct bar {}; // expected-note {{template parameter is declared here}} + template <class T> struct foo : bar<foo> {}; // expected-error {{template argument for template type parameter must be a type}} +} diff --git a/test/CXX/basic/basic.start/basic.start.main/p2a.cpp b/test/CXX/basic/basic.start/basic.start.main/p2a.cpp index a6a758798949f..b8dfbe78b6cce 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2a.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2a.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int Int; typedef char Char; diff --git a/test/CXX/basic/basic.start/basic.start.main/p2b.cpp b/test/CXX/basic/basic.start/basic.start.main/p2b.cpp index caecf60608817..785382cd077b8 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2b.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2b.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int Int; typedef char Char; diff --git a/test/CXX/basic/basic.start/basic.start.main/p2c.cpp b/test/CXX/basic/basic.start/basic.start.main/p2c.cpp index 8587d8cec791b..81b08b98758d4 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2c.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2c.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int main() { } diff --git a/test/CXX/basic/basic.start/basic.start.main/p2d.cpp b/test/CXX/basic/basic.start/basic.start.main/p2d.cpp index 777b5ceb743a3..bcdbdb260aee3 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2d.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2d.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s static int main() { // expected-error {{'main' is not allowed to be declared static}} } diff --git a/test/CXX/basic/basic.start/basic.start.main/p2e.cpp b/test/CXX/basic/basic.start/basic.start.main/p2e.cpp index 087cf77476ad4..954fdbdb645f2 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2e.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2e.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s inline int main() { // expected-error {{'main' is not allowed to be declared inline}} } diff --git a/test/CXX/basic/basic.start/basic.start.main/p2f.cpp b/test/CXX/basic/basic.start/basic.start.main/p2f.cpp index b7845b13e9a4b..a3d6a79a4fa0a 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2f.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2f.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void // expected-error {{error: 'main' must return 'int'}} -main( // expected-error {{error: first argument of 'main' should be of type 'int'}} +main( // expected-error {{error: first parameter of 'main' (argument count) must be of type 'int'}} float a ) { } diff --git a/test/CXX/basic/basic.start/basic.start.main/p2g.cpp b/test/CXX/basic/basic.start/basic.start.main/p2g.cpp index 4cedcdb916573..e3209fd3ce947 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2g.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2g.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int main(int argc, const char* const* argv) { } diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp index c752cec634a29..8a62ae84e2afc 100644 --- a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp +++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> struct A { diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp index 04af5bc82ec5a..e00e9486f0bfa 100644 --- a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp +++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { void operator delete(void*); diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-nodef.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-nodef.cpp index ff653d5fef08f..6cd587c4de402 100644 --- a/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-nodef.cpp +++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/p2-nodef.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int *use_new(int N) { return new int [N]; diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp index f3499e4286bcc..f4860bb9babfb 100644 --- a/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp +++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int *use_new(int N) { if (N == 1) return new int; diff --git a/test/CXX/class.access/class.access.dcl/p1.cpp b/test/CXX/class.access/class.access.dcl/p1.cpp index 043a9bfb4e0d9..5d7905f9da817 100644 --- a/test/CXX/class.access/class.access.dcl/p1.cpp +++ b/test/CXX/class.access/class.access.dcl/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify +// RUN: %clang_cc1 -fsyntax-only -verify // This is just the test for [namespace.udecl]p4 with 'using' // uniformly stripped out. diff --git a/test/CXX/class.derived/class.virtual/p12.cpp b/test/CXX/class.derived/class.virtual/p12.cpp index b5974a0211807..208a0d155fe71 100644 --- a/test/CXX/class.derived/class.virtual/p12.cpp +++ b/test/CXX/class.derived/class.virtual/p12.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -ast-print %s | FileCheck %s // CHECK: test12_A::foo() struct test12_A { diff --git a/test/CXX/class.derived/p2.cpp b/test/CXX/class.derived/p2.cpp new file mode 100644 index 0000000000000..7ef53d36ab7b2 --- /dev/null +++ b/test/CXX/class.derived/p2.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +// "During the lookup for a base class name, non-type names are ignored" +namespace PR5840 { + struct Base {}; + int Base = 10; + struct Derived : Base {}; +} diff --git a/test/CXX/class/class.friend/p1-ambiguous.cpp b/test/CXX/class/class.friend/p1-ambiguous.cpp index a02bc53375220..a9dca4fa8ec88 100644 --- a/test/CXX/class/class.friend/p1-ambiguous.cpp +++ b/test/CXX/class/class.friend/p1-ambiguous.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Make sure that friend declarations don't introduce ambiguous // declarations. diff --git a/test/CXX/class/class.friend/p1.cpp b/test/CXX/class/class.friend/p1.cpp index 7065a7e917fd7..886fef5bc4f62 100644 --- a/test/CXX/class/class.friend/p1.cpp +++ b/test/CXX/class/class.friend/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct Outer { struct Inner { diff --git a/test/CXX/class/class.friend/p2.cpp b/test/CXX/class/class.friend/p2.cpp index 98be2049e7566..9fe2b17e5049d 100644 --- a/test/CXX/class/class.friend/p2.cpp +++ b/test/CXX/class/class.friend/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct B0; diff --git a/test/CXX/class/class.friend/p6.cpp b/test/CXX/class/class.friend/p6.cpp index 2e8153c6c0471..bd4630e2aa9db 100644 --- a/test/CXX/class/class.friend/p6.cpp +++ b/test/CXX/class/class.friend/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { friend static class B; // expected-error {{'static' is invalid in friend declarations}} diff --git a/test/CXX/class/class.local/p1.cpp b/test/CXX/class/class.local/p1.cpp index 8a84f5dbed8af..05ae5c71d15a9 100644 --- a/test/CXX/class/class.local/p1.cpp +++ b/test/CXX/class/class.local/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int x; void f() diff --git a/test/CXX/class/class.local/p2.cpp b/test/CXX/class/class.local/p2.cpp index 854415fe307de..56ff1e53a493f 100644 --- a/test/CXX/class/class.local/p2.cpp +++ b/test/CXX/class/class.local/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -faccess-control +// RUN: %clang_cc1 -fsyntax-only -verify %s -faccess-control struct A { }; @@ -7,6 +7,5 @@ void f() { B b; - A *a = &b; // expected-error{{conversion from 'struct B' to inaccessible base class 'struct A'}} \ - expected-error{{incompatible type initializing 'struct B *', expected 'struct A *'}} + A *a = &b; // expected-error{{conversion from 'struct B' to inaccessible base class 'struct A'}} } diff --git a/test/CXX/class/class.local/p3.cpp b/test/CXX/class/class.local/p3.cpp index 9c625d18c95c2..c24d5d8a09a20 100644 --- a/test/CXX/class/class.local/p3.cpp +++ b/test/CXX/class/class.local/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f1() { struct X { diff --git a/test/CXX/class/class.local/p4.cpp b/test/CXX/class/class.local/p4.cpp index f2432ec973932..d7807440cc9c6 100644 --- a/test/CXX/class/class.local/p4.cpp +++ b/test/CXX/class/class.local/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { struct X { diff --git a/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp b/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp index b90661deefe63..f5fbf7a08c20f 100644 --- a/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp +++ b/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // [class.mfct.non-static]p3: // When an id-expression (5.1) that is not part of a class member diff --git a/test/CXX/class/class.nest/p1.cpp b/test/CXX/class/class.nest/p1.cpp index bbc49f9e95e7b..f1f5496d565b0 100644 --- a/test/CXX/class/class.nest/p1.cpp +++ b/test/CXX/class/class.nest/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class Outer { int x; diff --git a/test/CXX/class/class.nested.type/p1.cpp b/test/CXX/class/class.nested.type/p1.cpp index 61ccd281ca937..4a04a448595c5 100644 --- a/test/CXX/class/class.nested.type/p1.cpp +++ b/test/CXX/class/class.nested.type/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { public: diff --git a/test/CXX/class/class.union/p1.cpp b/test/CXX/class/class.union/p1.cpp index 9c969c5b75525..87946484ec187 100644 --- a/test/CXX/class/class.union/p1.cpp +++ b/test/CXX/class/class.union/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void abort() __attribute__((noreturn)); diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.memdef/p3.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.memdef/p3.cpp index 2ca7165aad487..1f962a98db6e5 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.memdef/p3.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.memdef/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> struct X0 { }; struct X1 { }; diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.unnamed/p1.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.unnamed/p1.cpp index dd30d6ad4f985..b4ec585e48e35 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.unnamed/p1.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.unnamed/p1.cpp @@ -1,7 +1,6 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s // This lame little test was ripped straight from the standard. - namespace { int i; // expected-note {{candidate}} } @@ -22,3 +21,22 @@ void test2() { A::i++; j++; } + + +// Test that all anonymous namespaces in a translation unit are +// considered the same context. +namespace { + class Test3 {}; // expected-note {{previous definition}} +} +namespace { + class Test3 {}; // expected-error {{redefinition of 'Test3'}} +} + +namespace test4 { + namespace { + class Test4 {}; // expected-note {{previous definition}} + } + namespace { + class Test4 {}; // expected-error {{redefinition of 'Test4'}} + } +} diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp index 9528c4b99cb89..935f5767889fb 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // We have to avoid ADL for this test. diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp index 00d109e67516b..1aa163a8d8d7a 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -verify %s +// RUN: %clang -fsyntax-only -verify %s namespace test0 { namespace ns0 { diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp index b4302d5b4b903..63b302265ea0f 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++03 [namespace.udecl]p11: // If a function declaration in namespace scope or block scope has diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p12.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p12.cpp index 4cbe1be056e4b..25371c7029b98 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p12.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p12.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++03 [namespace.udecl]p12: // When a using-declaration brings names from a base class into a diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p13.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p13.cpp index 1a05aae3afd68..ec814b1ab97c6 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p13.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p13.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++03 [namespace.udecl]p3: // For the purpose of overload resolution, the functions which are diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3-cxx0x.cpp index 8257330dcf35e..3f3bf4a2eccb2 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3-cxx0x.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s // C++0x N2914. struct B { diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp index bf314c41b5fb4..f2dc64b80742c 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++03 [namespace.udecl]p4: // A using-declaration used as a member-declaration shall refer to a diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp index 31218c41300f5..edaa975a58905 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++0x N2914. struct A { diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp index f86f8fb579072..c4b8849e58cfc 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++0x N2914. namespace A { diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp index 59137eb8c9d8e..78b5a41648a76 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++0x N2914. struct X { diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8.cpp index bf0f330777d11..fd2df010fc9b8 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct Opaque0 {}; struct Opaque1 {}; diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p1.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p1.cpp index fbd205833cad7..20a19ab042500 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p1.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udir/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // (this actually occurs before paragraph 1) namespace test0 { diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp index dabe13a0ff660..99a4f7aec4c8b 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // XFAIL: * void f0(void) { diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp index 7dc65c77d4a92..15efd72c14576 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // XFAIL: * void f0() { diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp index 7a1ba3e389bab..16a09d836d16b 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // XFAIL: * class A { diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp index d1251490ac1a3..fd86276e85488 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // XFAIL: * typedef const int T0; diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp index 907a91a86ec44..7bfb655db99b4 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s struct S; // expected-note {{forward declaration of 'struct S'}} extern S a; diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp index 6bdea20df6bda..082a32d8caf31 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -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}} } diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp index fa3101c6736c6..e73925479324e 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -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}} } diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp index b9cdb52f11a1c..392888e71b45b 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A {}; // expected-note 3 {{previous use is here}} diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p4-cxx0x.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p4-cxx0x.cpp index d97f2b83d1a7c..19159e159a0cb 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p4-cxx0x.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p4-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s template<typename T, typename U> struct is_same { diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p3.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p3.cpp index 867b4f03d41ff..28f49d0836475 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s typedef struct s { int x; } s; typedef int I; diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp index 69e843796ff7e..06c6695008e06 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // XFAIL: * struct S { diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp index 4d0319e58dfbb..c38bd292efdb6 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++98 -pedantic -Werror %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -pedantic -Werror %s int a1[] = { 1, 3, 5 }; void f() { int a2[] = { 1, 3, 5 }; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp index f62b4250eef0c..5ebc22fd82074 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f0() { int &ir = { 17 }; // expected-error{{reference to type 'int' cannot bind to an initializer list}} diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp new file mode 100644 index 0000000000000..885d11b9c24a6 --- /dev/null +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/basic.cpp @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5787 +class C { + public: + ~C() {} +}; + +template <typename T> +class E { + public: + E& Foo(const C&); + E& Bar() { return Foo(C()); } +}; + +void Test() { + E<int> e; + e.Bar(); +} diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp index 66fa2d1398444..bd08ab5423b0f 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s int g(int); void f() { int i; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p3.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p3.cpp index 54840f52663f2..47e215a0a9041 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p3.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p3.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int& r1; // expected-error{{declaration of reference variable 'r1' requires an initializer}} extern int& r2; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp index 5d34345c49fdd..7c63a79de1c67 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-dump %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s // CHECK: example0 void example0() { diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp index 5fa1fff8c86e9..a0904189161bf 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-var.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct Base { }; // expected-note{{candidate function}} struct Derived : Base { }; // expected-note{{candidate function}} @@ -91,7 +91,7 @@ void bind_lvalue_to_conv_lvalue() { void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerivedRef both) { Derived &dr1 = both; - Base &br1 = both; // expected-error{{error: conversion from 'struct ConvertibleToBothDerivedRef' to 'struct Base' is ambiguous}} + Base &br1 = both; // expected-error{{reference initialization of type 'struct Base &' with initializer of type 'struct ConvertibleToBothDerivedRef' is ambiguous}} } struct IntBitfield { @@ -125,5 +125,5 @@ void bind_const_lvalue_to_class_conv_temporary() { } void bind_lvalue_to_conv_rvalue_ambig(ConvertibleToBothDerived both) { const Derived &dr1 = both; - const Base &br1 = both; // expected-error{{error: conversion from 'struct ConvertibleToBothDerived' to 'struct Base const' is ambiguous}} + const Base &br1 = both; // expected-error{{reference initialization of type 'struct Base const &' with initializer of type 'struct ConvertibleToBothDerived' is ambiguous}} } diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp index 9d855349f295a..00e59e0bd7924 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x void f() { int b[5]; diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp index a3c147db5ee21..ac0ec85db0608 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s // Simple form int ar1[10]; diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p10.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p10.cpp index 82f526745dc69..9d26561ca8de8 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p10.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { virtual void f(int a = 7); diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp index 143a0caf82b2a..0a107eb2b139b 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void point(int = 3, int = 4); diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp index ea16f641dba0a..e9c5e0ca7b693 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void nondecl(int (*f)(int x = 5)) // {expected-error {{default arguments can only be specified}}} { diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp index 0cb8186cdb6f3..b2129b259bb3f 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f0(int i, int j, int k = 3); void f0(int i, int j, int k); diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p5.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p5.cpp index 894c9b5a877a0..7ee052c5f9cb7 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p5.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p5.cpp @@ -1,8 +1,8 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s float global_f; -void f0(int *ip = &global_f); // expected-error{{incompatible}} +void f0(int *ip = &global_f); // expected-error{{cannot initialize}} // Example from C++03 standard int a = 1; diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp index ef00e7b705340..00234ac5fd162 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { void f(int i = 3); // expected-note{{here}} diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp index 9c1d3a91c9bd3..164eb3682f31a 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void h() { diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp index 574237ee557da..1a08ab7332877 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { void f(A* p = this) { } // expected-error{{invalid use of 'this'}} }; diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp index 01fa6ac35548b..ad827fb7b3142 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p3.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(int) { } // expected-note {{previous definition is here}} void f(const int) { } // expected-error {{redefinition of 'f'}} diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp index 5f9a5345cf1c8..561e26b068f4b 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { public: int& i; @@ -16,7 +16,7 @@ void f() { int b; A a(b); - int A::*ip = &A::s; // expected-error {{incompatible type initializing 'int *', expected 'int class A::*'}} + int A::*ip = &A::s; // expected-error {{cannot initialize a variable of type 'int class A::*' with an rvalue of type 'int *'}} a.*&A::s = 10; // expected-error{{right hand operand to .* has non pointer-to-member type 'int *'}} a.*&A::i = 10; // expected-error{{cannot form a pointer-to-member to member 'i' of reference type 'int &'}} diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp index 98e1d302a7172..17fd712910006 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++ [dcl.ref]p5: // There shall be no references to references, no arrays of diff --git a/test/CXX/expr/expr.unary/expr.delete/p5.cpp b/test/CXX/expr/expr.unary/expr.delete/p5.cpp index 91e77bcb8bf7c..4b2b5ae7cbd50 100644 --- a/test/CXX/expr/expr.unary/expr.delete/p5.cpp +++ b/test/CXX/expr/expr.unary/expr.delete/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s // If the object being deleted has incomplete class type at the point of // deletion and the complete class has a non-trivial destructor or a diff --git a/test/CXX/expr/p3.cpp b/test/CXX/expr/p3.cpp index 40fe052f63429..6b243c26cc315 100644 --- a/test/CXX/expr/p3.cpp +++ b/test/CXX/expr/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s double operator +(double, double); // expected-error{{overloaded 'operator+' must have at least one parameter of class or enumeration type}} diff --git a/test/CXX/expr/p8.cpp b/test/CXX/expr/p8.cpp index 4f02497486c88..cc834d9dc8d82 100644 --- a/test/CXX/expr/p8.cpp +++ b/test/CXX/expr/p8.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int a0; const volatile int a1; diff --git a/test/CXX/expr/p9.cpp b/test/CXX/expr/p9.cpp index 1eec3cf0b9f9e..803b0cc459b26 100644 --- a/test/CXX/expr/p9.cpp +++ b/test/CXX/expr/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // floating-point overloads diff --git a/test/CXX/lex/lex.trigraph/p1.cpp b/test/CXX/lex/lex.trigraph/p1.cpp index 2a9a34b87eed4..aacbc55b28feb 100644 --- a/test/CXX/lex/lex.trigraph/p1.cpp +++ b/test/CXX/lex/lex.trigraph/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s +// RUN: %clang_cc1 -fsyntax-only -trigraphs -Wtrigraphs -verify %s ??=pragma // expected-warning {{trigraph converted to '#' character}} diff --git a/test/CXX/lex/lex.trigraph/p2.cpp b/test/CXX/lex/lex.trigraph/p2.cpp index 5be2d46b9189b..7d11d5bf5d592 100644 --- a/test/CXX/lex/lex.trigraph/p2.cpp +++ b/test/CXX/lex/lex.trigraph/p2.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s +// RUN: %clang_cc1 -fsyntax-only -trigraphs -Wtrigraphs -verify %s ??=define arraycheck(a,b) a??(b??) ??!??! b??(a??) // expected-warning {{trigraph converted to '#' character}} expected-warning {{trigraph converted to '[' character}} expected-warning {{trigraph converted to ']' character}} expected-warning {{trigraph converted to '|' character}} expected-warning {{trigraph converted to '|' character}} expected-warning {{trigraph converted to '[' character}} expected-warning {{trigraph converted to ']' character}} diff --git a/test/CXX/lex/lex.trigraph/p3.cpp b/test/CXX/lex/lex.trigraph/p3.cpp index f32af49994afe..2be03285fe65f 100644 --- a/test/CXX/lex/lex.trigraph/p3.cpp +++ b/test/CXX/lex/lex.trigraph/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -trigraphs -Wtrigraphs -verify %s +// RUN: %clang_cc1 -fsyntax-only -trigraphs -Wtrigraphs -verify %s char a[] = "?? ??\"??#??$??%??&??*??+??,??.??0??1??2??3??4??5??6" diff --git a/test/CXX/over/over.match/over.match.best/p1.cpp b/test/CXX/over/over.match/over.match.best/p1.cpp index df5198357d7ba..5c315a736052e 100644 --- a/test/CXX/over/over.match/over.match.best/p1.cpp +++ b/test/CXX/over/over.match/over.match.best/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> int &f0(T*, int); float &f0(void*, int); diff --git a/test/CXX/over/over.over/p1.cpp b/test/CXX/over/over.over/p1.cpp index e7f7d18c69e3c..10c60da013cbc 100644 --- a/test/CXX/over/over.over/p1.cpp +++ b/test/CXX/over/over.over/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> T f0(T); int f0(int); diff --git a/test/CXX/over/over.over/p2.cpp b/test/CXX/over/over.over/p2.cpp index 9ab0260618935..e8840d205e878 100644 --- a/test/CXX/over/over.over/p2.cpp +++ b/test/CXX/over/over.over/p2.cpp @@ -1,10 +1,10 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> T f0(T, T); void test_f0() { int (*f0a)(int, int) = f0; int (*f0b)(int, int) = &f0; - int (*f0c)(int, float) = f0; // expected-error{{incompatible type}} + int (*f0c)(int, float) = f0; // expected-error{{cannot initialize}} // FIXME: poor error message above! } diff --git a/test/CXX/over/over.over/p4.cpp b/test/CXX/over/over.over/p4.cpp index a05dbaebb71df..4189218f6521f 100644 --- a/test/CXX/over/over.over/p4.cpp +++ b/test/CXX/over/over.over/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> T f0(T); int f0(int); // expected-note{{candidate function}} @@ -18,6 +18,6 @@ int f0(int); void test_f0_2() { using namespace N; int (*fp0)(int) = f0; // expected-error{{ambiguous}} \ - // expected-error{{initializing}} + // expected-error{{cannot initialize}} float (*fp1)(float) = f0; } diff --git a/test/CXX/special/class.dtor/p2.cpp b/test/CXX/special/class.dtor/p2.cpp index c0e878fed2a56..b05c992f41156 100644 --- a/test/CXX/special/class.dtor/p2.cpp +++ b/test/CXX/special/class.dtor/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5548 struct A {~A();}; diff --git a/test/CXX/special/class.free/p1.cpp b/test/CXX/special/class.free/p1.cpp index bf99a2782bd5e..e4fe127f9f578 100644 --- a/test/CXX/special/class.free/p1.cpp +++ b/test/CXX/special/class.free/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> struct A { diff --git a/test/CXX/special/class.free/p6.cpp b/test/CXX/special/class.free/p6.cpp index b082b85d18c4b..555d4e9cfa944 100644 --- a/test/CXX/special/class.free/p6.cpp +++ b/test/CXX/special/class.free/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> struct A { diff --git a/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp b/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp index 79d6c54e29f06..a93249e2268d0 100644 --- a/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp +++ b/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test class template partial specializations of member templates. template<typename T> diff --git a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp index b3b7635106c5a..cfa14f996bbe5 100644 --- a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp +++ b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int I, int J, class T> class X { static const int value = 0; }; diff --git a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp index 47cf8379c3196..59253db3c5297 100644 --- a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp +++ b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, int N> struct A; diff --git a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp index 90bb16256c5b0..87e21e4af845e 100644 --- a/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, int N> struct A; diff --git a/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp b/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp index bc4bb5da40118..b65e1d0194b69 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.mem.class/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> struct X0 { diff --git a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp index fd3fb0bc7a7d8..4c05c622926d3 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1-retmem.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X1 { }; diff --git a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp index 6c827209ef0e8..17645639fb82f 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> // expected-note{{previous template}} class X0 { public: diff --git a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp index a09d0efa297f2..f09faa90d5f95 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test instantiation of member functions of class templates defined out-of-line template<typename T, typename U> struct X0 { diff --git a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/pr5056.cpp b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/pr5056.cpp index 602fd374c2ab5..70c9c70a41c01 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.mem.func/pr5056.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.mem.func/pr5056.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" void * malloc(int); diff --git a/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp b/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp index 2ddb8eac6c0ad..aa53ebc58025b 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.static/p1-inst.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test instantiation of static data members declared out-of-line. @@ -8,13 +8,13 @@ struct X { }; template<typename T> - T X<T>::value = 17; // expected-error{{initialize}} + T X<T>::value = 17; // expected-error{{no viable conversion}} struct InitOkay { InitOkay(int) { } }; -struct CannotInit { }; +struct CannotInit { }; // expected-note{{candidate function}} int &returnInt() { return X<int>::value; } float &returnFloat() { return X<float>::value; } diff --git a/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp b/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp index 949a8b0a72c7b..3cefeb821e99a 100644 --- a/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { @@ -6,18 +6,18 @@ struct X0 { }; template<typename T> -T X0<T>::value = 0; // expected-error{{initialize}} +T X0<T>::value = 0; // expected-error{{no viable conversion}} struct X1 { X1(int); }; -struct X2 { }; +struct X2 { }; // expected-note{{candidate function}} int& get_int() { return X0<int>::value; } X1& get_X1() { return X0<X1>::value; } -double*& get_double_ptr() { return X0<int*>::value; } // expected-error{{initialized}} +double*& get_double_ptr() { return X0<int*>::value; } // expected-error{{non-const lvalue reference to type 'double *' cannot bind to a value of unrelated type 'int *'}} X2& get_X2() { return X0<X2>::value; // expected-note{{instantiation}} diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p4.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p4.cpp index fe42ba41d81e8..b2a6219d04e69 100644 --- a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p4.cpp +++ b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> struct A { A(); }; template<class T> int &f(T); diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p5.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p5.cpp index 27e4426b90820..4d34968d32aa9 100644 --- a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> int &f(T); template<class T> float &f(T*, int=1); diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4-neg.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4-neg.cpp index 399dcc4bed760..e9a3eaa79d67b 100644 --- a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4-neg.cpp +++ b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4-neg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> void f0(T) { } // expected-note{{previous}} template<class U> void f0(U) { } // expected-error{{redefinition}} diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4.cpp index de1a883bcd7a0..f42b94a727d2f 100644 --- a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4.cpp +++ b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // All of these function templates are distinct. template<typename T> void f0(T) { } diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp index 2571e45c5cde2..a668adafcaf54 100644 --- a/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp +++ b/test/CXX/temp/temp.decls/temp.fct/temp.over.link/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int N, int M> struct A0 { diff --git a/test/CXX/temp/temp.decls/temp.friend/p1.cpp b/test/CXX/temp/temp.decls/temp.friend/p1.cpp index fc392da00acfb..7a28e70c9ae67 100644 --- a/test/CXX/temp/temp.decls/temp.friend/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.friend/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s template <typename T> struct Num { T value_; diff --git a/test/CXX/temp/temp.decls/temp.friend/p3.cpp b/test/CXX/temp/temp.decls/temp.friend/p3.cpp index 4615bebe711fa..17d8c85df00cc 100644 --- a/test/CXX/temp/temp.decls/temp.friend/p3.cpp +++ b/test/CXX/temp/temp.decls/temp.friend/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <class T> class A { typedef int Member; diff --git a/test/CXX/temp/temp.decls/temp.friend/p5.cpp b/test/CXX/temp/temp.decls/temp.friend/p5.cpp index 74895c4906235..f23611bd505ed 100644 --- a/test/CXX/temp/temp.decls/temp.friend/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.friend/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <class T> class A { class Member { diff --git a/test/CXX/temp/temp.decls/temp.mem/p1.cpp b/test/CXX/temp/temp.decls/temp.mem/p1.cpp index 80b18467a364e..1b9da84886e79 100644 --- a/test/CXX/temp/temp.decls/temp.mem/p1.cpp +++ b/test/CXX/temp/temp.decls/temp.mem/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <class T> struct A { static T cond; diff --git a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p1.cpp b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p1.cpp index 088a9e55eb3e6..0aef6adad13f2 100644 --- a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p1.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> struct A { }; diff --git a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3-nodeduct.cpp b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3-nodeduct.cpp new file mode 100644 index 0000000000000..a8b83d4854e39 --- /dev/null +++ b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3-nodeduct.cpp @@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5811 +template <class F> void Call(F f) { f(1); } +template <typename T> void f(T); +void a() { Call(f<int>); } + +// Check the conversion of a template-id to a pointer +template<typename T, T* Address> struct Constant { }; +Constant<void(int), &f<int> > constant0; + +template<typename T, T* Address> void constant_func(); +void test_constant_func() { + constant_func<void(int), &f<int> >(); +} + + +// Check typeof() on a template-id referring to a single function +template<typename T, typename U> +struct is_same { + static const bool value = false; +}; + +template<typename T> +struct is_same<T, T> { + static const bool value = true; +}; + +int typeof0[is_same<__typeof__(f<int>), void (int)>::value? 1 : -1]; +int typeof1[is_same<__typeof__(&f<int>), void (*)(int)>::value? 1 : -1]; + +template <typename T> void g(T); +template <typename T> void g(T, T); + +int typeof2[is_same<__typeof__(g<float>), void (int)>::value? 1 : -1]; // \ + // expected-error{{cannot determine the type of an overloaded function}} \ + // FIXME: expected-error{{use of undeclared identifier}} diff --git a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp index 01030b2a8a20a..2530f128a49d4 100644 --- a/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -template<class X, class Y, class Z> X f(Y,Z); +template<class X, class Y, class Z> X f(Y,Z); // expected-note {{candidate function}} void g() { f<int,char*,double>("aa",3.0); diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp index d193fb2ef296d..f6121b373e135 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/sfinae-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s +// RUN: %clang_cc1 %s typedef char one_byte; struct two_bytes { char data[2]; }; diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp index beb6aad2c089a..bcfb71c987ebf 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { }; @@ -15,7 +15,7 @@ void test_f1(int *ip, float fv) { f1(ip, fv); } -template<typename T> void f2(T*, T*); +template<typename T> void f2(T*, T*); // expected-note 2 {{candidate function}} struct ConvToIntPtr { operator int*() const; diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p2.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p2.cpp index 6f27d3636892e..c165c45306684 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p2.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { }; // bullet 1 diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp index dbe2ff3e18fb2..9fefbe1b03686 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { }; diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p2.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p2.cpp index 7d175781c2d94..5a9ea084fd618 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p2.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: [temp.deduct.conv]p2 bullets 1 and 2 can't actually happen without // references? diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p3.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p3.cpp index 95bd7fe121595..e23e98abe64d6 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p3.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct AnyPtr { template<typename T> operator T*() const; diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp index 50d31fb2f851f..4dca820c1929c 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s struct AnyT { template<typename T> diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp index 86a34500ad415..99a265af394cd 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.funcaddr/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> T f0(T, int); diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p11.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p11.cpp index 072789c7d5799..99ade4bc99741 100644 --- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p11.cpp +++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p11.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <class T> T* f(int); // #1 template <class T, class U> T& f(U); // #2 diff --git a/test/CXX/temp/temp.param/p10.cpp b/test/CXX/temp/temp.param/p10.cpp index 56e7f3281eb69..b9dac75beb91e 100644 --- a/test/CXX/temp/temp.param/p10.cpp +++ b/test/CXX/temp/temp.param/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename> struct Y1; template<typename, int> struct Y2; diff --git a/test/CXX/temp/temp.param/p11.cpp b/test/CXX/temp/temp.param/p11.cpp index 9e7fd39c0a465..5af0c4e91b569 100644 --- a/test/CXX/temp/temp.param/p11.cpp +++ b/test/CXX/temp/temp.param/p11.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename> struct Y1; template<typename, int> struct Y2; diff --git a/test/CXX/temp/temp.param/p12.cpp b/test/CXX/temp/temp.param/p12.cpp index 3864fbeaa11e9..7be38790905fa 100644 --- a/test/CXX/temp/temp.param/p12.cpp +++ b/test/CXX/temp/temp.param/p12.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename> struct Y1; // expected-note{{too few template parameters in template template argument}} template<typename, int> struct Y2; diff --git a/test/CXX/temp/temp.param/p13.cpp b/test/CXX/temp/temp.param/p13.cpp index 559b892d0fd2d..7e7dbe58a7b56 100644 --- a/test/CXX/temp/temp.param/p13.cpp +++ b/test/CXX/temp/temp.param/p13.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // The scope of atemplate-parameterextends from its point of // declaration until the end of its template. In particular, a diff --git a/test/CXX/temp/temp.param/p14.cpp b/test/CXX/temp/temp.param/p14.cpp index 150e0ad636be0..a6c53c1e64a61 100644 --- a/test/CXX/temp/temp.param/p14.cpp +++ b/test/CXX/temp/temp.param/p14.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // XFAIL: * // A template-parameter shall not be used in its own default argument. diff --git a/test/CXX/temp/temp.param/p15-cxx0x.cpp b/test/CXX/temp/temp.param/p15-cxx0x.cpp index 57b6ee22410c9..0ce669979c112 100644 --- a/test/CXX/temp/temp.param/p15-cxx0x.cpp +++ b/test/CXX/temp/temp.param/p15-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s template<typename T> struct X; template<int I> struct Y; diff --git a/test/CXX/temp/temp.param/p15.cpp b/test/CXX/temp/temp.param/p15.cpp index 764bb7bae073f..13087791a3db3 100644 --- a/test/CXX/temp/temp.param/p15.cpp +++ b/test/CXX/temp/temp.param/p15.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s template<typename T> struct X; template<int I> struct Y; diff --git a/test/CXX/temp/temp.param/p2.cpp b/test/CXX/temp/temp.param/p2.cpp index d40f99b58a29a..41868c5c1ac72 100644 --- a/test/CXX/temp/temp.param/p2.cpp +++ b/test/CXX/temp/temp.param/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // There is no semantic difference between class and typename in a // template-parameter. typename followed by an unqualified-id names a diff --git a/test/CXX/temp/temp.param/p3.cpp b/test/CXX/temp/temp.param/p3.cpp index 6a76fe20b81aa..67d648ea97bbf 100644 --- a/test/CXX/temp/temp.param/p3.cpp +++ b/test/CXX/temp/temp.param/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // A type-parameter defines its identifier to be a type-name (if // declared with class or typename) or template-name (if declared with @@ -15,7 +15,7 @@ template<template<class T> class Y> struct X1 { // could be interpreted as either a non-type template-parameter or a // type-parameter (because its identifier is the name of an already // existing class) is taken as a type-parameter. For example, -class T { /* ... */ }; +class T { /* ... */ }; // expected-note{{candidate function}} int i; template<class T, T i> struct X2 { @@ -23,6 +23,6 @@ template<class T, T i> struct X2 { { T t1 = i; //template-parameters T and i ::T t2 = ::i; // global namespace members T and i \ - // expected-error{{cannot initialize}} + // expected-error{{no viable conversion}} } }; diff --git a/test/CXX/temp/temp.param/p4.cpp b/test/CXX/temp/temp.param/p4.cpp index 3efff1243600f..5ec402a45bf5d 100644 --- a/test/CXX/temp/temp.param/p4.cpp +++ b/test/CXX/temp/temp.param/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X; // C++ [temp.param]p4 diff --git a/test/CXX/temp/temp.param/p7.cpp b/test/CXX/temp/temp.param/p7.cpp index ccc869ae0fbe5..13f0367764aa7 100644 --- a/test/CXX/temp/temp.param/p7.cpp +++ b/test/CXX/temp/temp.param/p7.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // A non-type template-parameter shall not be declared to have // floating point, class, or void type. diff --git a/test/CXX/temp/temp.param/p8.cpp b/test/CXX/temp/temp.param/p8.cpp index dd4af17d79fab..fed048cad8b62 100644 --- a/test/CXX/temp/temp.param/p8.cpp +++ b/test/CXX/temp/temp.param/p8.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int X[10]> struct A; template<int *X> struct A; template<int f(float, double)> struct B; diff --git a/test/CXX/temp/temp.param/p9.cpp b/test/CXX/temp/temp.param/p9.cpp index d6b740544d023..625477c4e7b68 100644 --- a/test/CXX/temp/temp.param/p9.cpp +++ b/test/CXX/temp/temp.param/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s // A default template-argument shall not be specified in a function // template declaration or a function template definition diff --git a/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp b/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp index a41b46ff5c9b5..75580d245cfc7 100644 --- a/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp +++ b/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // XFAIL: * // Note: we fail this test because we perform template instantiation diff --git a/test/CXX/temp/temp.res/temp.dep/p3.cpp b/test/CXX/temp/temp.res/temp.dep/p3.cpp index d47f0d6835144..c41a4c60ee743 100644 --- a/test/CXX/temp/temp.res/temp.dep/p3.cpp +++ b/test/CXX/temp/temp.res/temp.dep/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A0 { struct K { }; }; diff --git a/test/CXX/temp/temp.spec/p5.cpp b/test/CXX/temp/temp.spec/p5.cpp index d5632e7f341d6..c37817cc49b8d 100644 --- a/test/CXX/temp/temp.spec/p5.cpp +++ b/test/CXX/temp/temp.spec/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> inline void f(T) { } template void f(int); // expected-note{{previous explicit instantiation}} diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p1.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p1.cpp index 239b8aeb04e40..3843c0d2c880d 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p1.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // This test creates cases where implicit instantiations of various entities // would cause a diagnostic, but provides expliict specializations for those diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp index 61f1710a6b9ed..b81c1e7b2c8fd 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> class X; template<> class X<int>; // expected-note{{forward}} diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p11.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p11.cpp index e794e67a5ef34..5fa2f627b0094 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p11.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p11.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> class Array { /* ... */ }; template<class T> void sort(Array<T>& v); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p13.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p13.cpp index 63cf9f5e50d12..fb6d1bed1f715 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p13.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p13.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> void f(T); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p14.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p14.cpp index a5d5b9e3c41e2..121cb8eedf2fb 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p14.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p14.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s template<class T> void f(T) { /* ... */ } template<class T> inline void g(T) { /* ... */ } diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp index 840f566362ed8..6e7f80842ec04 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p15.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct NonDefaultConstructible { - NonDefaultConstructible(const NonDefaultConstructible&); + NonDefaultConstructible(const NonDefaultConstructible&); // expected-note{{candidate function}} }; template<typename T, typename U> diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p16.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p16.cpp index ce40afd402253..2f9a3cbf94577 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p16.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p16.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<class T> struct A { void f(T); template<class X1> void g1(T, X1); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp index 06653044c3bb6..3b5b5afa8ed9d 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T1> class A { template<class T2> class B { diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp index a5877d281d741..4d175a8860870 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T1> class A { template<class T2> class B { template<class T3> void mf1(T3); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p19.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p19.cpp index 1f38e5a2c17d2..1c2ea7ebde717 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p19.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p19.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X { diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp index 64856605a0a75..654f5abb8a548 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // This test creates cases where implicit instantiations of various entities // would cause a diagnostic, but provides expliict specializations for those diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp index d270b8167a167..f987c120a2de8 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> void f(T); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp index 9dae3eb5190b0..ab26f407f3f38 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X { diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp index de05a926338c0..84841cb60f4d9 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { template<class T> class X; diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp index ad0d506213675..3eaf89689a254 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -struct IntHolder { // expected-note{{here}} - IntHolder(int); +struct IntHolder { // expected-note{{here}} // expected-note 2{{candidate function}} + IntHolder(int); // expected-note 2{{candidate function}} }; template<typename T, typename U> diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p5.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p5.cpp index 58682c786f959..512ea47d5a5f5 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p5.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct IntHolder { IntHolder(int); diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp index e92d3f0a88835..34c3710e04c5b 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p9.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p9.cpp index 49481d2e6d7ae..d4ce01fd65010 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p9.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { template<class T> class X { /* ... */ }; diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp index d7731f17637c9..a4caceae4954c 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s template<typename T> struct X { diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp index 3938509961b49..70eb69641867b 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s template<typename T> struct X { static T member1; diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1.cpp index 896e30efb8866..626bdf1815038 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p1.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct C { }; @@ -14,7 +14,7 @@ template struct X0<void>; // expected-note{{instantiation}} // Explicitly instantiate a function template specialization template<typename T> void f0(T t) { - ++t; // expected-error{{cannot modify}} + ++t; // expected-error{{cannot increment}} } template void f0(int); @@ -48,8 +48,8 @@ template void X1<int>::f<>(int&, int*); // expected-note{{instantiation}} // Explicitly instantiate members of a class template struct Incomplete; // expected-note{{forward declaration}} -struct NonDefaultConstructible { - NonDefaultConstructible(int); +struct NonDefaultConstructible { // expected-note{{candidate function}} + NonDefaultConstructible(int); // expected-note{{candidate function}} }; template<typename T, typename U> @@ -68,7 +68,7 @@ struct X2 { }; template<typename T, typename U> -T X2<T, U>::static_member1 = 17; // expected-error{{incompatible type}} +T X2<T, U>::static_member1 = 17; // expected-error{{cannot initialize}} template<typename T, typename U> U X2<T, U>::static_member2; // expected-error{{no matching}} diff --git a/test/CXX/temp/temp.spec/temp.explicit/p10.cpp b/test/CXX/temp/temp.spec/temp.explicit/p10.cpp index 900b0b3092775..290a874296e1b 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p10.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { @@ -20,7 +20,7 @@ struct X0<T>::Inner { }; template<typename T> -T X0<T>::static_var = 1; // expected-error{{incompatible type}} +T X0<T>::static_var = 1; // expected-error{{cannot initialize}} extern template struct X0<void*>; template struct X0<void*>; // expected-note 2{{instantiation}} diff --git a/test/CXX/temp/temp.spec/temp.explicit/p12.cpp b/test/CXX/temp/temp.spec/temp.explicit/p12.cpp index fdf4393d43854..912b8e17bb98b 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p12.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p12.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s char* p = 0; template<class T> T g(T x = &p) { return x; } diff --git a/test/CXX/temp/temp.spec/temp.explicit/p2.cpp b/test/CXX/temp/temp.spec/temp.explicit/p2.cpp index f3d2c955cb5bd..8538d27f09bcb 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p2.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Example from the standard template<class T> class Array { void mf() { } }; diff --git a/test/CXX/temp/temp.spec/temp.explicit/p3.cpp b/test/CXX/temp/temp.spec/temp.explicit/p3.cpp index 9057971a5bb4c..e30f046c2bd1a 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p3.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // A declaration of a function template shall be in scope at the point of the // explicit instantiation of the function template. @@ -8,14 +8,12 @@ template void f0(int); // okay // A definition of the class or class template containing a member function // template shall be in scope at the point of the explicit instantiation of // the member function template. -struct X0; // expected-note 2{{forward declaration}} -template<typename> struct X1; // expected-note 5{{declared here}} +struct X0; // expected-note 3{{forward declaration}} +template<typename> struct X1; // expected-note 8{{declared here}} // FIXME: Repeated diagnostics here! -template void X0::f0<int>(int); // expected-error 2{{incomplete type}} \ - // expected-error{{does not refer}} -template void X1<int>::f0<int>(int); // expected-error 2{{implicit instantiation of undefined template}} \ - // expected-error{{does not refer}} +template void X0::f0<int>(int); // expected-error 3{{incomplete type}} // expected-error{{invalid token after top level declarator}} +template void X1<int>::f0<int>(int); // expected-error 3{{implicit instantiation of undefined template}} // expected-error{{invalid token after top level declarator}} // A definition of a class template or class member template shall be in scope // at the point of the explicit instantiation of the class template or class @@ -35,10 +33,10 @@ template struct X2<int>::Inner<float>; // expected-error{{explicit instantiation // A definition of a class template shall be in scope at the point of an // explicit instantiation of a member function or a static data member of the // class template. -template void X1<int>::f1(int); // expected-error{{undefined template}} \ +template void X1<int>::f1(int); // expected-error 2{{undefined template}} \ // expected-error{{does not refer}} -template int X1<int>::member; // expected-error{{undefined template}} \ +template int X1<int>::member; // expected-error 2{{undefined template}} \ // expected-error{{does not refer}} // A definition of a member class of a class template shall be in scope at the diff --git a/test/CXX/temp/temp.spec/temp.explicit/p4.cpp b/test/CXX/temp/temp.spec/temp.explicit/p4.cpp index 04e511b0b2d5d..f292b5a93d380 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p4.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> void f0(T); // expected-note{{here}} template void f0(int); // expected-error{{explicit instantiation of undefined function template}} diff --git a/test/CXX/temp/temp.spec/temp.explicit/p5.cpp b/test/CXX/temp/temp.spec/temp.explicit/p5.cpp index a992648d7c489..13fb0492f1a47 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p5.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { template<class T> class Y { // expected-note{{explicit instantiation refers here}} diff --git a/test/CXX/temp/temp.spec/temp.explicit/p6.cpp b/test/CXX/temp/temp.spec/temp.explicit/p6.cpp index 763d679db7bbb..44ce41b6f957c 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p6.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p6.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> class Array { /* ... */ }; template<class T> void sort(Array<T>& v) { } diff --git a/test/CXX/temp/temp.spec/temp.explicit/p7.cpp b/test/CXX/temp/temp.spec/temp.explicit/p7.cpp index ffd653dbaa4fc..b62e0cb9b1cd0 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p7.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p7.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { diff --git a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp index 9a5bd3245c78d..0c5aec3b0bc8a 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { diff --git a/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp b/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp index 59705d8a20e72..e67233c375476 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p9-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -std=c++0x -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -std=c++0x -o - %s | FileCheck %s template<typename T> struct X0 { diff --git a/test/CXX/temp/temp.spec/temp.explicit/p9.cpp b/test/CXX/temp/temp.spec/temp.explicit/p9.cpp index a53113fb969e9..ad973bb7c5891 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p9.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p9.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s template<typename T> struct X0 { diff --git a/test/CodeCompletion/call.cpp b/test/CodeCompletion/call.cpp index 8c7bf83e2a3a6..5467717bbc77e 100644 --- a/test/CodeCompletion/call.cpp +++ b/test/CodeCompletion/call.cpp @@ -17,11 +17,11 @@ void f(); void test() { f(Y(), 0, 0); - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: f(struct N::Y y, <#int ZZ#>) // CHECK-CC1-NEXT: f(int i, <#int j#>, int k) // CHECK-CC1-NEXT: f(float x, <#float y#>) - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s // CHECK-CC2-NOT: f(struct N::Y y, int ZZ) // CHECK-CC2: f(int i, int j, <#int k#>) } diff --git a/test/CodeCompletion/enum-switch-case-qualified.cpp b/test/CodeCompletion/enum-switch-case-qualified.cpp index 3e8d75d940d70..d441269336fd9 100644 --- a/test/CodeCompletion/enum-switch-case-qualified.cpp +++ b/test/CodeCompletion/enum-switch-case-qualified.cpp @@ -21,12 +21,12 @@ namespace M { void test(enum N::C::Color color) { switch (color) { case - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:23:8 %s -o - | FileCheck -check-prefix=CC1 %s - // CHECK-CC1: Blue : 0 : N::C::Blue - // CHECK-CC1-NEXT: Green : 0 : N::C::Green - // CHECK-CC1-NEXT: Indigo : 0 : N::C::Indigo - // CHECK-CC1-NEXT: Orange : 0 : N::C::Orange - // CHECK-CC1-NEXT: Red : 0 : N::C::Red - // CHECK-CC1-NEXT: Violet : 0 : N::C::Violet - // CHECK-CC1: Yellow : 0 : N::C::Yellow + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:8 %s -o - | FileCheck -check-prefix=CC1 %s + // CHECK-CC1: Blue : 0 : [#enum M::N::C::Color#]N::C::Blue + // CHECK-CC1-NEXT: Green : 0 : [#enum M::N::C::Color#]N::C::Green + // CHECK-CC1-NEXT: Indigo : 0 : [#enum M::N::C::Color#]N::C::Indigo + // CHECK-CC1-NEXT: Orange : 0 : [#enum M::N::C::Color#]N::C::Orange + // CHECK-CC1-NEXT: Red : 0 : [#enum M::N::C::Color#]N::C::Red + // CHECK-CC1-NEXT: Violet : 0 : [#enum M::N::C::Color#]N::C::Violet + // CHECK-CC1: Yellow : 0 : [#enum M::N::C::Color#]N::C::Yellow diff --git a/test/CodeCompletion/enum-switch-case.c b/test/CodeCompletion/enum-switch-case.c index b7a3676170bf2..1a7c58fc1e252 100644 --- a/test/CodeCompletion/enum-switch-case.c +++ b/test/CodeCompletion/enum-switch-case.c @@ -19,7 +19,7 @@ void test(enum Color color) { case Green: break; - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:10 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:10 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: Blue : 0 // CHECK-CC1-NEXT: Green : 0 // CHECK-CC1-NEXT: Indigo : 0 diff --git a/test/CodeCompletion/enum-switch-case.cpp b/test/CodeCompletion/enum-switch-case.cpp index 3a010a83dee54..ee8facae0dd34 100644 --- a/test/CodeCompletion/enum-switch-case.cpp +++ b/test/CodeCompletion/enum-switch-case.cpp @@ -19,10 +19,10 @@ void test(enum N::Color color) { break; case - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:21:8 %s -o - | FileCheck -check-prefix=CC1 %s - // CHECK-CC1: Blue : 0 : N::Blue - // CHECK-CC1-NEXT: Green : 0 : N::Green - // CHECK-CC1-NEXT: Indigo : 0 : N::Indigo - // CHECK-CC1-NEXT: Orange : 0 : N::Orange - // CHECK-CC1-NEXT: Violet : 0 : N::Violet + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:21:8 %s -o - | FileCheck -check-prefix=CC1 %s + // CHECK-CC1: Blue : 0 : [#enum N::Color#]N::Blue + // CHECK-CC1-NEXT: Green : 0 : [#enum N::Color#]N::Green + // CHECK-CC1-NEXT: Indigo : 0 : [#enum N::Color#]N::Indigo + // CHECK-CC1-NEXT: Orange : 0 : [#enum N::Color#]N::Orange + // CHECK-CC1-NEXT: Violet : 0 : [#enum N::Color#]N::Violet diff --git a/test/CodeCompletion/function-templates.cpp b/test/CodeCompletion/function-templates.cpp index 302b95516f3b4..cdbbf75838e1a 100644 --- a/test/CodeCompletion/function-templates.cpp +++ b/test/CodeCompletion/function-templates.cpp @@ -14,10 +14,10 @@ public: void f() { std::sort(1, 2); Foo().getAs<int>(); - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: dyn_cast<<#class X#>>(<#Y *Val#>) // CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#> - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: getAs<<#typename T#>>() ) diff --git a/test/CodeCompletion/functions.cpp b/test/CodeCompletion/functions.cpp index 85292e4d3076c..6838de36e8464 100644 --- a/test/CodeCompletion/functions.cpp +++ b/test/CodeCompletion/functions.cpp @@ -3,6 +3,6 @@ void f(float x, float y...); void test() { :: - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:5:5 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:5:5 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: f(<#int i#>{#, <#int j#>{#, <#int k#>#}#}) // CHECK-CC1: f(<#float x#>, <#float y#><#, ...#>) diff --git a/test/CodeCompletion/macros.c b/test/CodeCompletion/macros.c index 20d26f2f773a4..0ba2f065c4ea1 100644 --- a/test/CodeCompletion/macros.c +++ b/test/CodeCompletion/macros.c @@ -13,9 +13,9 @@ struct Point { }; void test(struct Point *p) { - // RUN: clang-cc -fsyntax-only -code-completion-macros -code-completion-at=%s:17:14 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-macros -code-completion-at=%s:17:14 %s -o - | FileCheck -check-prefix=CC1 %s switch (p->IDENTITY(color)) { - // RUN: clang-cc -fsyntax-only -code-completion-macros -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC2 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-macros -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC2 %s case } // CC1: color diff --git a/test/CodeCompletion/member-access.c b/test/CodeCompletion/member-access.c index c9ac58f295d4d..f41c509c8809d 100644 --- a/test/CodeCompletion/member-access.c +++ b/test/CodeCompletion/member-access.c @@ -6,7 +6,7 @@ struct Point { void test(struct Point *p) { p-> - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:8:6 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:8:6 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: x // CHECK-CC1: y // CHECK-CC1: z diff --git a/test/CodeCompletion/member-access.cpp b/test/CodeCompletion/member-access.cpp index d03180b182de7..7d1637c2726fb 100644 --- a/test/CodeCompletion/member-access.cpp +++ b/test/CodeCompletion/member-access.cpp @@ -27,16 +27,16 @@ public: void test(const Proxy &p) { p-> - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:29:6 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s - // CHECK-CC1: member1 : 0 : [#Base1::#]member1 - // CHECK-CC1: member1 : 0 : [#Base2::#]member1 - // CHECK-CC1: member2 : 0 : [#Base1::#]member2 + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:29:6 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // CHECK-CC1: member1 : 0 : [#int#][#Base1::#]member1 + // CHECK-CC1: member1 : 0 : [#int#][#Base2::#]member1 + // CHECK-CC1: member2 : 0 : [#float#][#Base1::#]member2 // CHECK-CC1: member3 : 0 // CHECK-CC1: member4 : 0 - // CHECK-CC1: memfun1 : 0 : [#Base3::#]memfun1(<#float#>) - // CHECK-CC1: memfun1 : 0 : [#Base3::#]memfun1(<#double#>)[# const#] - // CHECK-CC1: memfun2 : 0 : [#Base3::#]memfun2(<#int#>) - // CHECK-CC1: memfun3 : 0 : memfun3(<#int#>) - // CHECK-CC1: memfun1 : 0 (Hidden) : Base2::memfun1(<#int#>) + // CHECK-CC1: memfun1 : 0 : [#void#][#Base3::#]memfun1(<#float#>) + // CHECK-CC1: memfun1 : 0 : [#void#][#Base3::#]memfun1(<#double#>)[# const#] + // CHECK-CC1: memfun2 : 0 : [#void#][#Base3::#]memfun2(<#int#>) + // CHECK-CC1: memfun3 : 0 : [#int#]memfun3(<#int#>) + // CHECK-CC1: memfun1 : 0 (Hidden) : [#void#]Base2::memfun1(<#int#>) // CHECK-CC1: Base1 : 3 : Base1:: diff --git a/test/CodeCompletion/namespace-alias.cpp b/test/CodeCompletion/namespace-alias.cpp index c1f34178c3ecb..45116621474c3 100644 --- a/test/CodeCompletion/namespace-alias.cpp +++ b/test/CodeCompletion/namespace-alias.cpp @@ -11,7 +11,7 @@ namespace N2 { namespace I1 { } namespace New = - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:13:18 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:13:18 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: I1 : 1 // CHECK-CC1: I4 : 1 // CHECK-CC1: I5 : 1 diff --git a/test/CodeCompletion/namespace.cpp b/test/CodeCompletion/namespace.cpp index ff90b85b5a57f..8a421122b0a6c 100644 --- a/test/CodeCompletion/namespace.cpp +++ b/test/CodeCompletion/namespace.cpp @@ -8,7 +8,7 @@ namespace N2 { namespace I1 { } namespace - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:10:12 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:12 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: I1 : 0 // CHECK-CC1-NEXT: I5 : 0 diff --git a/test/CodeCompletion/nested-name-specifier.cpp b/test/CodeCompletion/nested-name-specifier.cpp index 8da7c37d95e9d..643418accd070 100644 --- a/test/CodeCompletion/nested-name-specifier.cpp +++ b/test/CodeCompletion/nested-name-specifier.cpp @@ -10,7 +10,7 @@ namespace N { } N:: -// RUN: clang-cc -fsyntax-only -code-completion-at=%s:12:4 %s -o - | FileCheck -check-prefix=CC1 %s +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:12:4 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: A : 0 // CHECK-CC1: B : 0 // CHECK-CC1: M : 0 diff --git a/test/CodeCompletion/objc-message.m b/test/CodeCompletion/objc-message.m index 58fc4f5d68f2e..a1ae271bbead4 100644 --- a/test/CodeCompletion/objc-message.m +++ b/test/CodeCompletion/objc-message.m @@ -23,13 +23,13 @@ void func() { Foo *obj = [Foo new]; [obj xx]; } -// RUN: clang -cc1 -fsyntax-only -code-completion-at=%s:23:19 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:19 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: categoryClassMethod : 0 // CHECK-CC1: classMethod1:withKeyword: : 0 // CHECK-CC1: classMethod2 : 0 // CHECK-CC1: new : 0 // CHECK-CC1: protocolClassMethod : 0 -// RUN: clang -cc1 -fsyntax-only -code-completion-at=%s:24:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:24:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: categoryInstanceMethod : 0 // CHECK-CC2: instanceMethod1 : 0 // CHECK-CC2: protocolInstanceMethod : 0 diff --git a/test/CodeCompletion/operator.cpp b/test/CodeCompletion/operator.cpp index 20ba5ba3fbc83..eef7fbd17ba59 100644 --- a/test/CodeCompletion/operator.cpp +++ b/test/CodeCompletion/operator.cpp @@ -8,7 +8,7 @@ void f() { typedef float Float; operator - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:10:11 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:11 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: Float : 0 // CHECK-CC1: + : 0 // CHECK-CC1: short : 0 diff --git a/test/CodeCompletion/ordinary-name.c b/test/CodeCompletion/ordinary-name.c index 680d6dc989c79..7f5a05ff75aa1 100644 --- a/test/CodeCompletion/ordinary-name.c +++ b/test/CodeCompletion/ordinary-name.c @@ -4,7 +4,7 @@ typedef struct t TYPEDEF; void foo() { int y; - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:6:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:6:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: y : 0 // CHECK-CC1: foo : 2 // CHECK-NOT-CC1: y : 2 diff --git a/test/CodeCompletion/tag.c b/test/CodeCompletion/tag.c index 6d9c1eabd5617..554d38100b6d4 100644 --- a/test/CodeCompletion/tag.c +++ b/test/CodeCompletion/tag.c @@ -7,6 +7,6 @@ void X(); void test() { enum X { x }; enum - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:9:7 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:9:7 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: X : 0 // CHECK-CC1: Y : 2 diff --git a/test/CodeCompletion/tag.cpp b/test/CodeCompletion/tag.cpp index 17c9707db1a32..17fb0140a0c9a 100644 --- a/test/CodeCompletion/tag.cpp +++ b/test/CodeCompletion/tag.cpp @@ -15,7 +15,7 @@ namespace N { void test() { class - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:17:10 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:17:10 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: Y : 2 // CHECK-CC1: Z : 2 // CHECK-CC1: A : 4 diff --git a/test/CodeCompletion/templates.cpp b/test/CodeCompletion/templates.cpp index ff5611823d728..32a7b2125fec8 100644 --- a/test/CodeCompletion/templates.cpp +++ b/test/CodeCompletion/templates.cpp @@ -17,10 +17,10 @@ namespace std { void f() { std::vector<int> v; v.foo(); - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:18:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:18:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: allocator<<#typename T#>> // CHECK-CC1-NEXT: vector<<#typename T#>{#, <#typename Alloc#>#}> - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:5 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:5 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: foo // CHECK-CC2: in_base // CHECK-CC2: stop diff --git a/test/CodeCompletion/truncation.c b/test/CodeCompletion/truncation.c index 5af3c4b6d6c98..c7706354183d1 100644 --- a/test/CodeCompletion/truncation.c +++ b/test/CodeCompletion/truncation.c @@ -2,10 +2,10 @@ struct -// RUN: clang-cc -fsyntax-only -code-completion-at=%s.h:4:8 -o - %s | FileCheck -check-prefix=CC1 %s +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s.h:4:8 -o - %s | FileCheck -check-prefix=CC1 %s // CHECK-CC1: X : 1 // CHECK-CC1-NEXT: Y : 1 -// RUN: clang-cc -fsyntax-only -code-completion-at=%s:3:8 -o - %s | FileCheck -check-prefix=CC2 %s +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:3:8 -o - %s | FileCheck -check-prefix=CC2 %s // CHECK-CC2: X : 1 // CHECK-CC2: Xa : 1 // CHECK-CC2: Y : 1 diff --git a/test/CodeCompletion/using-namespace.cpp b/test/CodeCompletion/using-namespace.cpp index 57383d5db4279..f8f31d8c1a0d1 100644 --- a/test/CodeCompletion/using-namespace.cpp +++ b/test/CodeCompletion/using-namespace.cpp @@ -12,7 +12,7 @@ namespace N2 { void foo() { using namespace - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:14:20 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:14:20 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: I1 : 2 // CHECK-CC1: I4 : 2 // CHECK-CC1: I5 : 2 diff --git a/test/CodeCompletion/using.cpp b/test/CodeCompletion/using.cpp index 305afda2e6dd4..ba4c9ce507d54 100644 --- a/test/CodeCompletion/using.cpp +++ b/test/CodeCompletion/using.cpp @@ -14,7 +14,7 @@ namespace N2 { int N3; using - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:16:10 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:16:10 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: I1 : 2 // CHECK-CC1: I4 : 2 // CHECK-CC1: I5 : 2 diff --git a/test/CodeGen/2007-11-29-ArraySizeFromInitializer.c b/test/CodeGen/2007-11-29-ArraySizeFromInitializer.c index 3b158241c68e1..a1ec633f02a39 100644 --- a/test/CodeGen/2007-11-29-ArraySizeFromInitializer.c +++ b/test/CodeGen/2007-11-29-ArraySizeFromInitializer.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t int array[] = {1, 2, 3, 4, 5}; diff --git a/test/CodeGen/2008-02-07-bitfield-bug.c b/test/CodeGen/2008-02-07-bitfield-bug.c index dc2ebb75d5983..73e31e75e9795 100644 --- a/test/CodeGen/2008-02-07-bitfield-bug.c +++ b/test/CodeGen/2008-02-07-bitfield-bug.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t // PR1990 struct test { diff --git a/test/CodeGen/2008-02-08-bitfield-bug.c b/test/CodeGen/2008-02-08-bitfield-bug.c index fc69e58ed3cf9..1549b7248b814 100644 --- a/test/CodeGen/2008-02-08-bitfield-bug.c +++ b/test/CodeGen/2008-02-08-bitfield-bug.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t struct test { unsigned a:1; diff --git a/test/CodeGen/2008-02-26-inline-asm-bug.c b/test/CodeGen/2008-02-26-inline-asm-bug.c index a6816f5de8ff4..1103e9ba587e6 100644 --- a/test/CodeGen/2008-02-26-inline-asm-bug.c +++ b/test/CodeGen/2008-02-26-inline-asm-bug.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep "\$0,\$1" +// RUN: %clang_cc1 -emit-llvm < %s | grep "\$0,\$1" void f() { int d1, d2; diff --git a/test/CodeGen/2008-07-17-no-emit-on-error.c b/test/CodeGen/2008-07-17-no-emit-on-error.c index 6266b504fd048..0452325a790d0 100644 --- a/test/CodeGen/2008-07-17-no-emit-on-error.c +++ b/test/CodeGen/2008-07-17-no-emit-on-error.c @@ -1,7 +1,7 @@ // RUN: rm -f %t1.bc -// RUN: clang-cc -DPASS %s -emit-llvm-bc -o %t1.bc +// RUN: %clang_cc1 -DPASS %s -emit-llvm-bc -o %t1.bc // RUN: test -f %t1.bc -// RUN: not clang-cc %s -emit-llvm-bc -o %t1.bc +// RUN: not %clang_cc1 %s -emit-llvm-bc -o %t1.bc // RUN: not test -f %t1.bc void f() { diff --git a/test/CodeGen/2008-07-21-mixed-var-fn-decl.c b/test/CodeGen/2008-07-21-mixed-var-fn-decl.c index 59a3f38849518..ac132604399e6 100644 --- a/test/CodeGen/2008-07-21-mixed-var-fn-decl.c +++ b/test/CodeGen/2008-07-21-mixed-var-fn-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s int g0, f0(); int f1(), g1; diff --git a/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c b/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c index 4aa28f8eb484a..33bd800456f99 100644 --- a/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c +++ b/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o - %s | FileCheck %s struct et7 { float lv7[0]; diff --git a/test/CodeGen/2008-07-22-packed-bitfield-access.c b/test/CodeGen/2008-07-22-packed-bitfield-access.c index 437a4be156b75..76b942d5ad035 100644 --- a/test/CodeGen/2008-07-22-packed-bitfield-access.c +++ b/test/CodeGen/2008-07-22-packed-bitfield-access.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - int main () { struct foo { diff --git a/test/CodeGen/2008-07-29-override-alias-decl.c b/test/CodeGen/2008-07-29-override-alias-decl.c index 18e8982832e0c..a4bea0e06cd88 100644 --- a/test/CodeGen/2008-07-29-override-alias-decl.c +++ b/test/CodeGen/2008-07-29-override-alias-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s int x() { return 1; } diff --git a/test/CodeGen/2008-07-30-implicit-initialization.c b/test/CodeGen/2008-07-30-implicit-initialization.c index b225a14e6f0af..8c719bb63cc39 100644 --- a/test/CodeGen/2008-07-30-implicit-initialization.c +++ b/test/CodeGen/2008-07-30-implicit-initialization.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t // RUN: grep "ret i32" %t | count 2 // RUN: grep "ret i32 0" %t | count 2 // <rdar://problem/6113085> diff --git a/test/CodeGen/2008-07-30-redef-of-bitcasted-decl.c b/test/CodeGen/2008-07-30-redef-of-bitcasted-decl.c index 9fce0aedce417..546590eba64c5 100644 --- a/test/CodeGen/2008-07-30-redef-of-bitcasted-decl.c +++ b/test/CodeGen/2008-07-30-redef-of-bitcasted-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // <rdar://problem/6108358> /* For posterity, the issue here begins initial "char []" decl for diff --git a/test/CodeGen/2008-07-31-asm-labels.c b/test/CodeGen/2008-07-31-asm-labels.c index d2dcc04bf5847..130ad6ba46cce 100644 --- a/test/CodeGen/2008-07-31-asm-labels.c +++ b/test/CodeGen/2008-07-31-asm-labels.c @@ -1,9 +1,9 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep "@pipe()" %t | count 0 // RUN: grep '_thisIsNotAPipe' %t | count 3 // RUN: grep 'g0' %t | count 0 // RUN: grep '_renamed' %t | count 2 -// RUN: clang-cc -DUSE_DEF -emit-llvm -o %t %s +// RUN: %clang_cc1 -DUSE_DEF -emit-llvm -o %t %s // RUN: grep "@pipe()" %t | count 0 // RUN: grep '_thisIsNotAPipe' %t | count 3 // <rdr://6116729> diff --git a/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c b/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c index 0ce4ba66ca12b..de062631f93bb 100644 --- a/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c +++ b/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3 +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3 // <rdr://6115726> int f0() { diff --git a/test/CodeGen/2008-08-04-void-pointer-arithmetic.c b/test/CodeGen/2008-08-04-void-pointer-arithmetic.c index bd4d8f8c18e72..dbfc107da5cc8 100644 --- a/test/CodeGen/2008-08-04-void-pointer-arithmetic.c +++ b/test/CodeGen/2008-08-04-void-pointer-arithmetic.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // <rdar://problem/6122967> int f0(void *a, void *b) { diff --git a/test/CodeGen/2008-08-19-cast-of-typedef.c b/test/CodeGen/2008-08-19-cast-of-typedef.c index 3435384a5829d..740f48a8baa36 100644 --- a/test/CodeGen/2008-08-19-cast-of-typedef.c +++ b/test/CodeGen/2008-08-19-cast-of-typedef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s typedef short T[4]; struct s { diff --git a/test/CodeGen/2008-08-25-incompatible-cond-expr.m b/test/CodeGen/2008-08-25-incompatible-cond-expr.m index fa9b1970f7fd3..f285cca094ed9 100644 --- a/test/CodeGen/2008-08-25-incompatible-cond-expr.m +++ b/test/CodeGen/2008-08-25-incompatible-cond-expr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @protocol P0 @end diff --git a/test/CodeGen/2008-09-22-bad-switch-type.c b/test/CodeGen/2008-09-22-bad-switch-type.c index 2526dd9289c8b..853e6bd174b62 100644 --- a/test/CodeGen/2008-09-22-bad-switch-type.c +++ b/test/CodeGen/2008-09-22-bad-switch-type.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // PR2817 void f0(void) { diff --git a/test/CodeGen/2008-12-02-logical-or-fold.c b/test/CodeGen/2008-12-02-logical-or-fold.c index d54bf287d2e2a..167ad299ce61b 100644 --- a/test/CodeGen/2008-12-02-logical-or-fold.c +++ b/test/CodeGen/2008-12-02-logical-or-fold.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | grep "store i32 1" +// RUN: %clang_cc1 -emit-llvm -o - %s | grep "store i32 1" // PR3150 int a() {return 1||1;} diff --git a/test/CodeGen/2009-01-21-invalid-debug-info.m b/test/CodeGen/2009-01-21-invalid-debug-info.m index 1c1028b4ea981..af912e2dc54ac 100644 --- a/test/CodeGen/2009-01-21-invalid-debug-info.m +++ b/test/CodeGen/2009-01-21-invalid-debug-info.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -S -g -o %t.s %s +// RUN: %clang_cc1 -S -g -o %t.s %s // FIXME: This test case can be removed at some point (since it will // no longer effectively test anything). The reason it was causing diff --git a/test/CodeGen/2009-03-22-increment-bitfield.c b/test/CodeGen/2009-03-22-increment-bitfield.c index f0aaafda60ea9..407aea2b77fa7 100644 --- a/test/CodeGen/2009-03-22-increment-bitfield.c +++ b/test/CodeGen/2009-03-22-increment-bitfield.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -O1 < %s | grep "ret i32 0" +// RUN: %clang_cc1 -emit-llvm -O1 < %s | grep "ret i32 0" int a(void) { return ++(struct x {unsigned x : 2;}){3}.x; diff --git a/test/CodeGen/2009-04-23-dbg.c b/test/CodeGen/2009-04-23-dbg.c index c6b179126e033..6a8bf01ba86fc 100644 --- a/test/CodeGen/2009-04-23-dbg.c +++ b/test/CodeGen/2009-04-23-dbg.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -g -o %t %s -emit-llvm-bc && llc %t -o %t.s +// RUN: %clang_cc1 -g -o %t %s -emit-llvm-bc && llc %t -o %t.s # 1 "a.c" # 1 "a.c" 1 # 1 "<built-in>" 1 diff --git a/test/CodeGen/2009-05-22-callingconv.c b/test/CodeGen/2009-05-22-callingconv.c index 8afc656843ea6..3e616d9bea46b 100644 --- a/test/CodeGen/2009-05-22-callingconv.c +++ b/test/CodeGen/2009-05-22-callingconv.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple i386-unknown-unknown | grep call | grep x86_stdcallcc +// RUN: %clang_cc1 %s -emit-llvm -o - -triple i386-unknown-unknown | grep call | grep x86_stdcallcc void abort(void) __attribute__((__noreturn__)); typedef void re_string_t; typedef void re_dfa_t; diff --git a/test/CodeGen/2009-05-28-const-typedef.c b/test/CodeGen/2009-05-28-const-typedef.c index e46e83b9478c3..3464fde685447 100644 --- a/test/CodeGen/2009-05-28-const-typedef.c +++ b/test/CodeGen/2009-05-28-const-typedef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - // PR4281 typedef struct { diff --git a/test/CodeGen/2009-06-01-addrofknr.c b/test/CodeGen/2009-06-01-addrofknr.c index d51a4a47b4788..17d6fdf5d89f6 100644 --- a/test/CodeGen/2009-06-01-addrofknr.c +++ b/test/CodeGen/2009-06-01-addrofknr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -o %t -emit-llvm -verify +// RUN: %clang_cc1 %s -o %t -emit-llvm -verify // PR4289 struct funcptr { diff --git a/test/CodeGen/2009-06-14-anonymous-union-init.c b/test/CodeGen/2009-06-14-anonymous-union-init.c index 8d1831a4f3ce2..8ccd7bc4ec338 100644 --- a/test/CodeGen/2009-06-14-anonymous-union-init.c +++ b/test/CodeGen/2009-06-14-anonymous-union-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep "zeroinitializer, i16 16877" +// RUN: %clang_cc1 -emit-llvm < %s | grep "zeroinitializer, i16 16877" // PR4390 struct sysfs_dirent { union { struct sysfs_elem_dir {} s_dir; }; diff --git a/test/CodeGen/2009-07-31-DbgDeclare.c b/test/CodeGen/2009-07-31-DbgDeclare.c index da49afedbc7a9..3ccb2630a49cb 100644 --- a/test/CodeGen/2009-07-31-DbgDeclare.c +++ b/test/CodeGen/2009-07-31-DbgDeclare.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -S -g -o %t.s %s +// RUN: %clang_cc1 -S -g -o %t.s %s void foo() { int i = 0; i = 42; diff --git a/test/CodeGen/2009-08-14-vararray-crash.c b/test/CodeGen/2009-08-14-vararray-crash.c index 40e071bd19a09..7f489bcff1fc3 100644 --- a/test/CodeGen/2009-08-14-vararray-crash.c +++ b/test/CodeGen/2009-08-14-vararray-crash.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s +// RUN: %clang_cc1 -emit-llvm < %s void sum1(int rb) { typedef unsigned char imgrow[rb]; diff --git a/test/CodeGen/2009-10-20-GlobalDebug.c b/test/CodeGen/2009-10-20-GlobalDebug.c index fddc76c14da86..f19ceb1e73c18 100644 --- a/test/CodeGen/2009-10-20-GlobalDebug.c +++ b/test/CodeGen/2009-10-20-GlobalDebug.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s +// RUN: %clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s int global; // CHECK: asciz "global" ## DW_AT_name int main() { return 0;} diff --git a/test/CodeGen/OpaqueStruct.c b/test/CodeGen/OpaqueStruct.c index b994c30002461..fe96126c0581a 100644 --- a/test/CodeGen/OpaqueStruct.c +++ b/test/CodeGen/OpaqueStruct.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t typedef struct a b; b* x; diff --git a/test/CodeGen/PR2001-bitfield-reload.c b/test/CodeGen/PR2001-bitfield-reload.c index 4dec65fd5472f..d05aef35793ea 100644 --- a/test/CodeGen/PR2001-bitfield-reload.c +++ b/test/CodeGen/PR2001-bitfield-reload.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | FileCheck %s // PR2001 /* Test that the result of the assignment properly uses the value *in diff --git a/test/CodeGen/PR2413-void-address-cast-error.c b/test/CodeGen/PR2413-void-address-cast-error.c index 95a4c6d80fc32..3920dfdec2472 100644 --- a/test/CodeGen/PR2413-void-address-cast-error.c +++ b/test/CodeGen/PR2413-void-address-cast-error.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - void f() { void *addr; diff --git a/test/CodeGen/PR2643-null-store-to-bitfield.c b/test/CodeGen/PR2643-null-store-to-bitfield.c index 6a5b0e92f660f..d6c2f36aa503b 100644 --- a/test/CodeGen/PR2643-null-store-to-bitfield.c +++ b/test/CodeGen/PR2643-null-store-to-bitfield.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // PR2643 void foo() { diff --git a/test/CodeGen/PR2743-reference-missing-static.c b/test/CodeGen/PR2743-reference-missing-static.c index e152c52585278..f32d6c5f14451 100644 --- a/test/CodeGen/PR2743-reference-missing-static.c +++ b/test/CodeGen/PR2743-reference-missing-static.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // PR2743 // <rdr://6094512> diff --git a/test/CodeGen/PR3130-cond-constant.c b/test/CodeGen/PR3130-cond-constant.c index e488eeb37f677..dbec6509bd252 100644 --- a/test/CodeGen/PR3130-cond-constant.c +++ b/test/CodeGen/PR3130-cond-constant.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - int a = 2.0 ? 1 : 2; diff --git a/test/CodeGen/PR3589-freestanding-libcalls.c b/test/CodeGen/PR3589-freestanding-libcalls.c index 14608137188e9..8b8282fb80b9d 100644 --- a/test/CodeGen/PR3589-freestanding-libcalls.c +++ b/test/CodeGen/PR3589-freestanding-libcalls.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1 -// RUN: clang-cc -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1 -// RUN: clang-cc -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0 +// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1 +// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1 +// RUN: %clang_cc1 -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0 int printf(const char *, ...); diff --git a/test/CodeGen/PR3613-static-decl.c b/test/CodeGen/PR3613-static-decl.c index a9dc744589268..7f6d979492c4e 100644 --- a/test/CodeGen/PR3613-static-decl.c +++ b/test/CodeGen/PR3613-static-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s // RUN: grep '@g0 = internal global %.truct.s0 { i32 3 }' %t | count 1 struct s0 { diff --git a/test/CodeGen/PR3709-int-to-pointer-sign.c b/test/CodeGen/PR3709-int-to-pointer-sign.c index 24c42f649bbe2..f77737e0f7707 100644 --- a/test/CodeGen/PR3709-int-to-pointer-sign.c +++ b/test/CodeGen/PR3709-int-to-pointer-sign.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -O1 -triple=x86_64-gnu-linux | grep "i64 -1" +// RUN: %clang_cc1 -emit-llvm %s -o - -O1 -triple=x86_64-gnu-linux | grep "i64 -1" // PR3709 long long a() { return (long long)(int*)-1;} diff --git a/test/CodeGen/PR4611-bitfield-layout.c b/test/CodeGen/PR4611-bitfield-layout.c index bc514bf4dfe22..3975ed0c138a6 100644 --- a/test/CodeGen/PR4611-bitfield-layout.c +++ b/test/CodeGen/PR4611-bitfield-layout.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t // RUN: grep "struct.object_entry = type { i8, \[2 x i8\], i8 }" %t struct object_entry { diff --git a/test/CodeGen/PR5060-align.c b/test/CodeGen/PR5060-align.c index 5d864084b012e..efd8520553987 100644 --- a/test/CodeGen/PR5060-align.c +++ b/test/CodeGen/PR5060-align.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -verify | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -verify | FileCheck %s // CHECK: @foo.p = internal global i8 0, align 32 char *foo(void) { diff --git a/test/CodeGen/address-space-cast.c b/test/CodeGen/address-space-cast.c index 2fba5ecd7dcaf..076c2f16fe6f3 100644 --- a/test/CodeGen/address-space-cast.c +++ b/test/CodeGen/address-space-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s +// RUN: %clang_cc1 -emit-llvm < %s volatile unsigned char* const __attribute__((address_space(1))) serial_ctrl = 0x02; diff --git a/test/CodeGen/address-space-compound-literal.c b/test/CodeGen/address-space-compound-literal.c index 79d19ed6b6ba2..37d9c7bc58f5c 100644 --- a/test/CodeGen/address-space-compound-literal.c +++ b/test/CodeGen/address-space-compound-literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep "internal addrspace(1) global i32 1" +// RUN: %clang_cc1 -emit-llvm < %s | grep "internal addrspace(1) global i32 1" typedef int a __attribute__((address_space(1))); a* x = &(a){1}; diff --git a/test/CodeGen/address-space-field1.c b/test/CodeGen/address-space-field1.c index b041cf55d0b00..61d88f9e75652 100644 --- a/test/CodeGen/address-space-field1.c +++ b/test/CodeGen/address-space-field1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm < %s -o - | FileCheck %s // CHECK:%struct.S = type { i32, i32 } // CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) nounwind // CHECK: [[p1addr:%.*]] = alloca %struct.S addrspace(1)* ; <%struct.S addrspace(1)**> [#uses=3] diff --git a/test/CodeGen/address-space-field2.c b/test/CodeGen/address-space-field2.c index 5576e55b63fab..198fd22a3a74d 100644 --- a/test/CodeGen/address-space-field2.c +++ b/test/CodeGen/address-space-field2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s // CHECK: addrspace(1) // CHECK: addrspace(2) // CHECK: addrspace(1) diff --git a/test/CodeGen/address-space-field3.c b/test/CodeGen/address-space-field3.c index 567757fe66704..090f4a104b052 100644 --- a/test/CodeGen/address-space-field3.c +++ b/test/CodeGen/address-space-field3.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s // CHECK: addrspace(1) // CHECK: addrspace(2) // CHECK: addrspace(1) diff --git a/test/CodeGen/address-space-field4.c b/test/CodeGen/address-space-field4.c index 31df018206b5d..a1906c0c00597 100644 --- a/test/CodeGen/address-space-field4.c +++ b/test/CodeGen/address-space-field4.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s // CHECK: addrspace(2) // CHECK: addrspace(3) // CHECK: addrspace(1) diff --git a/test/CodeGen/address-space.c b/test/CodeGen/address-space.c index 8536f161533be..5b58919557148 100644 --- a/test/CodeGen/address-space.c +++ b/test/CodeGen/address-space.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -emit-llvm < %s | grep '@foo.*global.*addrspace(1)' -// RUN: clang-cc -emit-llvm < %s | grep '@ban.*global.*addrspace(1)' -// RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(1)' | count 2 -// RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(2).. @A' -// RUN: clang-cc -emit-llvm < %s | grep 'load.*addrspace(2).. @B' +// RUN: %clang_cc1 -emit-llvm < %s | grep '@foo.*global.*addrspace(1)' +// RUN: %clang_cc1 -emit-llvm < %s | grep '@ban.*global.*addrspace(1)' +// RUN: %clang_cc1 -emit-llvm < %s | grep 'load.*addrspace(1)' | count 2 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'load.*addrspace(2).. @A' +// RUN: %clang_cc1 -emit-llvm < %s | grep 'load.*addrspace(2).. @B' int foo __attribute__((address_space(1))); int ban[10] __attribute__((address_space(1))); diff --git a/test/CodeGen/alias.c b/test/CodeGen/alias.c index f8836e6f605fe..f2e87a5dafbc6 100644 --- a/test/CodeGen/alias.c +++ b/test/CodeGen/alias.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s // RUN: grep '@g0 = common global i32 0' %t // RUN: grep '@f1 = alias void ()\* @f0' %t // RUN: grep '@g1 = alias i32\* @g0' %t diff --git a/test/CodeGen/align-local.c b/test/CodeGen/align-local.c index afbe1d5dd0d0b..b839ee14a10be 100644 --- a/test/CodeGen/align-local.c +++ b/test/CodeGen/align-local.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep "align 16" | count 2 +// RUN: %clang_cc1 -emit-llvm < %s | grep "align 16" | count 2 typedef struct __attribute((aligned(16))) {int x[4];} ff; diff --git a/test/CodeGen/alignof.c b/test/CodeGen/alignof.c index 71c275018ed56..64d0c08356870 100644 --- a/test/CodeGen/alignof.c +++ b/test/CodeGen/alignof.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -O1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o %t %s // RUN: grep 'ret i32 4' %t enum e0 { E0 }; diff --git a/test/CodeGen/always_inline.c b/test/CodeGen/always_inline.c index d995ea11be09f..c91fd43f2761c 100644 --- a/test/CodeGen/always_inline.c +++ b/test/CodeGen/always_inline.c @@ -1,7 +1,7 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s // RUN: not grep '@f0' %t // RUN: not grep 'call ' %t -// RUN: clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s +// RUN: %clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s // RUN: grep '@f0' %t | count 2 //static int f0() { diff --git a/test/CodeGen/arm-arguments.c b/test/CodeGen/arm-arguments.c index 945c1f2e668dc..fb61b0f78497a 100644 --- a/test/CodeGen/arm-arguments.c +++ b/test/CodeGen/arm-arguments.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s -// RUN: clang-cc -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s +// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s +// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s // APCS-GNU: define arm_apcscc signext i8 @f0() // AAPCS: define arm_aapcscc signext i8 @f0() diff --git a/test/CodeGen/arm_asm_clobber.c b/test/CodeGen/arm_asm_clobber.c index 05eb2e211f24d..a7ca0b5332b02 100644 --- a/test/CodeGen/arm_asm_clobber.c +++ b/test/CodeGen/arm_asm_clobber.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple armv6-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple armv6-unknown-unknown -emit-llvm -o %t %s void test0(void) { asm volatile("mov r0, r0" :: ); diff --git a/test/CodeGen/array.c b/test/CodeGen/array.c index 294dabfbbb5d9..0b401ea8190c2 100644 --- a/test/CodeGen/array.c +++ b/test/CodeGen/array.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t void f() { int a[2]; diff --git a/test/CodeGen/asm-2.c b/test/CodeGen/asm-2.c index 72b23b150592e..9d73608a4c18d 100644 --- a/test/CodeGen/asm-2.c +++ b/test/CodeGen/asm-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t -triple i386-pc-linux-gnu -O2 +// RUN: %clang_cc1 -emit-llvm %s -o %t -triple i386-pc-linux-gnu -O2 // RUN: not grep "load" %t // <rdar://problem/6841383> diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c index 8ddd2acaf87c0..4076609271007 100644 --- a/test/CodeGen/asm-inout.c +++ b/test/CodeGen/asm-inout.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o %t // RUN: grep "load i8\*\*\* %p.addr" %t | count 1 // XFAIL: * diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c index 41951b8ac21f9..df593d79fa17c 100644 --- a/test/CodeGen/asm.c +++ b/test/CodeGen/asm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o %t void t1(int len) { __asm__ volatile("" : "=&r"(len), "+&r"(len)); } diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c index 355f7b83231e2..ff304f57f01de 100644 --- a/test/CodeGen/atomic.c +++ b/test/CodeGen/atomic.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=i686-apple-darwin9 > %t1 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 > %t1 // RUN: grep @llvm.atomic.load.add.i32 %t1 | count 3 // RUN: grep @llvm.atomic.load.sub.i8 %t1 | count 2 // RUN: grep @llvm.atomic.load.min.i32 %t1 diff --git a/test/CodeGen/attr-cleanup.c b/test/CodeGen/attr-cleanup.c index 9105ededa20c0..7c2053d7ac356 100644 --- a/test/CodeGen/attr-cleanup.c +++ b/test/CodeGen/attr-cleanup.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t // <rdar://problem/6827047> void f(void* arg); diff --git a/test/CodeGen/attr-nodebug.c b/test/CodeGen/attr-nodebug.c index e0c813399fb95..66caa2b38fac9 100644 --- a/test/CodeGen/attr-nodebug.c +++ b/test/CodeGen/attr-nodebug.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -g -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -emit-llvm -o %t %s // RUN: not grep 'call void @llvm.dbg.func.start' %t void t1() __attribute__((nodebug)); diff --git a/test/CodeGen/attr-noinline.c b/test/CodeGen/attr-noinline.c index 719d6eb88fb37..dbca71ff5fb27 100644 --- a/test/CodeGen/attr-noinline.c +++ b/test/CodeGen/attr-noinline.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -g -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -emit-llvm -o %t %s // RUN: grep 'noinline' %t void t1() __attribute__((noinline)); diff --git a/test/CodeGen/attr-used.c b/test/CodeGen/attr-used.c index 5537ec2f4cef7..bc92b9435b32a 100644 --- a/test/CodeGen/attr-used.c +++ b/test/CodeGen/attr-used.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep '@llvm.used = .*@g0' %t // RUN: grep '@llvm.used = .*@f0' %t // RUN: grep '@llvm.used = .*@f1.l0' %t diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c index 29672c2ecb3d2..68bc73daec975 100644 --- a/test/CodeGen/attributes.c +++ b/test/CodeGen/attributes.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -triple i386-linux-gnu -o %t %s +// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu -o %t %s // RUN: FileCheck --input-file=%t %s // CHECK: @t5 = weak global i32 2 diff --git a/test/CodeGen/bitfield-assign.c b/test/CodeGen/bitfield-assign.c index 575a9fb766cfd..b8ab61339cf69 100644 --- a/test/CodeGen/bitfield-assign.c +++ b/test/CodeGen/bitfield-assign.c @@ -4,12 +4,12 @@ /* Check that we get one load for each simple assign and two for the compound assign (load the old value before the add then load again to store back). Also check that our g0 pattern is good. */ -// RUN: clang-cc -triple i386-unknown-unknown -O0 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O0 -emit-llvm -o %t %s // RUN: grep 'load ' %t | count 5 // RUN: grep "@g0" %t | count 4 // Check that we got the right value. -// RUN: clang-cc -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s // RUN: grep 'load ' %t | count 0 // RUN: grep "@g0" %t | count 0 diff --git a/test/CodeGen/bitfield-init.c b/test/CodeGen/bitfield-init.c index 7459614a1254a..bee4e7d3a059b 100644 --- a/test/CodeGen/bitfield-init.c +++ b/test/CodeGen/bitfield-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t typedef struct { unsigned int i: 1; } c; const c d = { 1 }; diff --git a/test/CodeGen/bitfield-promote.c b/test/CodeGen/bitfield-promote.c index 1290a1ecd33b5..4c3292c48feb5 100644 --- a/test/CodeGen/bitfield-promote.c +++ b/test/CodeGen/bitfield-promote.c @@ -1,4 +1,4 @@ -// RUN: clang -O3 -emit-llvm -S -o %t %s +// RUN: %clang -O3 -emit-llvm -S -o %t %s // RUN: grep 'ret i64 4294967292' %t | count 2 // RUN: grep 'ret i64 -4' %t | count 1 diff --git a/test/CodeGen/bitfield.c b/test/CodeGen/bitfield.c index 9cd79d3d58707..dea5e43e0f1c6 100644 --- a/test/CodeGen/bitfield.c +++ b/test/CodeGen/bitfield.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t -O3 +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t -O3 // RUN: grep "ret i32" %t | count 4 // RUN: grep "ret i32 1" %t | count 4 diff --git a/test/CodeGen/blocks-1.c b/test/CodeGen/blocks-1.c index ae5a74aab6f0a..71b4de8beff59 100644 --- a/test/CodeGen/blocks-1.c +++ b/test/CodeGen/blocks-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t -fblocks +// RUN: %clang_cc1 %s -emit-llvm -o %t -fblocks // RUN: grep "_Block_object_dispose" %t | count 17 // RUN: grep "__copy_helper_block_" %t | count 16 // RUN: grep "__destroy_helper_block_" %t | count 16 diff --git a/test/CodeGen/blocks-2.c b/test/CodeGen/blocks-2.c index c22e882f1b793..4e574dafec52a 100644 --- a/test/CodeGen/blocks-2.c +++ b/test/CodeGen/blocks-2.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -g %s -emit-llvm -o %t -fblocks +// RUN: %clang_cc1 -g %s -emit-llvm -o %t -fblocks // RUN: grep "func.start" %t | count 4 -// RUN: clang-cc -g %s -triple i386-unknown-unknown -emit-llvm -o %t -fblocks -fblock-introspection +// RUN: %clang_cc1 -g %s -triple i386-unknown-unknown -emit-llvm -o %t -fblocks -fblock-introspection // RUN: grep "v8@?0i4" %t | count 1 -// RUN: clang-cc -g %s -triple i386-unknown-unknown -emit-llvm -o %t -fblocks +// RUN: %clang_cc1 -g %s -triple i386-unknown-unknown -emit-llvm -o %t -fblocks // RUN: grep "v8@?0i4" %t | count 0 // 1 declaration, 1 bar, 1 test_block_dbg and 1 for the block. // XFAIL: * diff --git a/test/CodeGen/blocks-aligned-byref-variable.c b/test/CodeGen/blocks-aligned-byref-variable.c index 61522fd2da77f..79ac41dcd5d5e 100644 --- a/test/CodeGen/blocks-aligned-byref-variable.c +++ b/test/CodeGen/blocks-aligned-byref-variable.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-llvm -o - -triple x86_64-apple-darwin10 -// RUN: clang-cc -emit-llvm -o - -triple i386-apple-darwin10 +// RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 -emit-llvm -o - -triple i386-apple-darwin10 typedef int __attribute__((aligned(32))) ai; void f() { diff --git a/test/CodeGen/blocks-seq.c b/test/CodeGen/blocks-seq.c index 4006b715f4640..3557b48053ffe 100644 --- a/test/CodeGen/blocks-seq.c +++ b/test/CodeGen/blocks-seq.c @@ -1,7 +1,7 @@ // FIXME: We forcibly strip the names so that the test doesn't vary between // builds with and without asserts. We need a better solution for this. -// RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm-bc -o - %s | opt -strip | llvm-dis > %t +// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm-bc -o - %s | opt -strip | llvm-dis > %t // RUN: grep '%6 = call i32 (...)\* @rhs()' %t | count 1 // RUN: grep '%7 = getelementptr inbounds %0\* %1, i32 0, i32 1' %t | count 1 // RUN: grep '%8 = load %0\*\* %7' %t | count 1 diff --git a/test/CodeGen/blocks.c b/test/CodeGen/blocks.c index eddf25c74a837..0ef10c14e0092 100644 --- a/test/CodeGen/blocks.c +++ b/test/CodeGen/blocks.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t -fblocks +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t -fblocks void (^f)(void) = ^{}; // rdar://6768379 diff --git a/test/CodeGen/bool-bitfield.c b/test/CodeGen/bool-bitfield.c index 50990a47c2857..cb2d1dbd024d3 100644 --- a/test/CodeGen/bool-bitfield.c +++ b/test/CodeGen/bool-bitfield.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t // From GCC PR19331 struct SysParams diff --git a/test/CodeGen/bool-convert.c b/test/CodeGen/bool-convert.c index 4df81bb82d7c1..8bde837ed3ae7 100644 --- a/test/CodeGen/bool-convert.c +++ b/test/CodeGen/bool-convert.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep i1 | count 1 +// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1 // All of these should uses the memory representation of _Bool struct teststruct1 {_Bool a, b;} test1; _Bool* test2; diff --git a/test/CodeGen/bool-init.c b/test/CodeGen/bool-init.c index 7d331ed07eb08..1a8f127b868f5 100644 --- a/test/CodeGen/bool-init.c +++ b/test/CodeGen/bool-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep i1 | count 1 +// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1 // Check that the type of this global isn't i1 _Bool test = &test; diff --git a/test/CodeGen/boolassign.c b/test/CodeGen/boolassign.c index 73aab8db7cb17..8c563194e0932 100644 --- a/test/CodeGen/boolassign.c +++ b/test/CodeGen/boolassign.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int testBoolAssign(void) { int ss; diff --git a/test/CodeGen/builtin-attributes.c b/test/CodeGen/builtin-attributes.c index 184e9676edaa9..944aac3f521fa 100644 --- a/test/CodeGen/builtin-attributes.c +++ b/test/CodeGen/builtin-attributes.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple arm-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm-unknown-unknown -emit-llvm -o - %s | FileCheck %s // CHECK: declare arm_aapcscc i32 @printf(i8*, ...) void f0() { diff --git a/test/CodeGen/builtin-count-zeros.c b/test/CodeGen/builtin-count-zeros.c index ff08bd1083578..5a0be2fb867f4 100644 --- a/test/CodeGen/builtin-count-zeros.c +++ b/test/CodeGen/builtin-count-zeros.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep 'cttz' | count 2 -// RUN: clang-cc -emit-llvm %s -o - | grep 'ctlz' | count 2 +// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'cttz' | count 2 +// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'ctlz' | count 2 int a(int a) {return __builtin_ctz(a) + __builtin_clz(a);} diff --git a/test/CodeGen/builtin-memfns.c b/test/CodeGen/builtin-memfns.c index f1d092502dc2d..a7b716b931c75 100644 --- a/test/CodeGen/builtin-memfns.c +++ b/test/CodeGen/builtin-memfns.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// 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 diff --git a/test/CodeGen/builtin-nanf.c b/test/CodeGen/builtin-nanf.c index 8f7d2a1e443b4..ae37c9dc80779 100644 --- a/test/CodeGen/builtin-nanf.c +++ b/test/CodeGen/builtin-nanf.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s // RUN: grep 'float 0x7FF8000000000000, float 0x7FF8000000000000, float 0x7FF8000020000000, float 0x7FF8000000000000, float 0x7FF80001E0000000, float 0x7FF8001E00000000, float 0x7FF801E000000000, float 0x7FF81E0000000000, float 0x7FF9E00000000000, float 0x7FFFFFFFE0000000' %t float n[] = { diff --git a/test/CodeGen/builtin-rename.c b/test/CodeGen/builtin-rename.c index d0b5c2472de61..0b71d88806237 100644 --- a/test/CodeGen/builtin-rename.c +++ b/test/CodeGen/builtin-rename.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | grep 'declare.*printf' | count 1 +// RUN: %clang_cc1 %s -emit-llvm -o - | grep 'declare.*printf' | count 1 // PR3612 int printf(const char *, ...); diff --git a/test/CodeGen/builtin-stackaddress.c b/test/CodeGen/builtin-stackaddress.c index d8e58c4f6be70..f13b90eb9ed3f 100644 --- a/test/CodeGen/builtin-stackaddress.c +++ b/test/CodeGen/builtin-stackaddress.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-llvm < %s | grep "llvm.returnaddress" -// RUN: clang-cc -emit-llvm < %s | grep "llvm.frameaddress" +// RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.returnaddress" +// RUN: %clang_cc1 -emit-llvm < %s | grep "llvm.frameaddress" void* a(unsigned x) { return __builtin_return_address(0); } diff --git a/test/CodeGen/builtin-unwind-init.c b/test/CodeGen/builtin-unwind-init.c index 56872f7434eee..6fa77667bdf7d 100644 --- a/test/CodeGen/builtin-unwind-init.c +++ b/test/CodeGen/builtin-unwind-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm < %s -o - | FileCheck %s void a() { __builtin_unwind_init(); } diff --git a/test/CodeGen/builtinmemcpy.c b/test/CodeGen/builtinmemcpy.c index d1fdebbe82870..93253c5a8a487 100644 --- a/test/CodeGen/builtinmemcpy.c +++ b/test/CodeGen/builtinmemcpy.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm < %s -o - | grep "llvm.memcpy" +// RUN: %clang_cc1 -emit-llvm < %s -o - | grep "llvm.memcpy" char* x(char* a, char* b) {return __builtin_memcpy(a, b, 4);} diff --git a/test/CodeGen/builtins-x86.c b/test/CodeGen/builtins-x86.c index c82ecde1ff390..2eadd7f884d89 100644 --- a/test/CodeGen/builtins-x86.c +++ b/test/CodeGen/builtins-x86.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -DUSE_64 -triple x86_64-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -DUSE_ALL -triple x86_64-unknown-unknown -fsyntax-only -o %t %s +// RUN: %clang_cc1 -DUSE_64 -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -DUSE_ALL -triple x86_64-unknown-unknown -fsyntax-only -o %t %s #ifdef USE_ALL #define USE_3DNOW diff --git a/test/CodeGen/builtins.c b/test/CodeGen/builtins.c index 11bcc14249ace..4fa4785755b98 100644 --- a/test/CodeGen/builtins.c +++ b/test/CodeGen/builtins.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: not grep __builtin %t int printf(const char *, ...); diff --git a/test/CodeGen/builtinshufflevector.c b/test/CodeGen/builtinshufflevector.c index 9a3ae610282e0..f365844c6d43c 100644 --- a/test/CodeGen/builtinshufflevector.c +++ b/test/CodeGen/builtinshufflevector.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep 'shufflevector' | count 1 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'shufflevector' | count 1 typedef int v4si __attribute__ ((vector_size (16))); v4si a(v4si x, v4si y) {return __builtin_shufflevector(x, y, 3, 2, 5, 7);} diff --git a/test/CodeGen/c-strings.c b/test/CodeGen/c-strings.c index 2cf4036cb6753..4fbeb7b87e225 100644 --- a/test/CodeGen/c-strings.c +++ b/test/CodeGen/c-strings.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep "hello" %t | count 3 // RUN: grep 'c"hello\\00"' %t | count 2 // RUN: grep 'c"hello\\00\\00\\00"' %t | count 1 diff --git a/test/CodeGen/call-knr-indirect.c b/test/CodeGen/call-knr-indirect.c index 17be015bffb19..2e923b303cd0c 100644 --- a/test/CodeGen/call-knr-indirect.c +++ b/test/CodeGen/call-knr-indirect.c @@ -1,4 +1,4 @@ -// RUN: clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function' +// RUN: %clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function' // This should call rb_define_global_function, not rb_f_chop. void rb_define_global_function (const char*,void(*)(),int); diff --git a/test/CodeGen/cast.c b/test/CodeGen/cast.c index 6fb2b116d47b7..5f340c5bb670d 100644 --- a/test/CodeGen/cast.c +++ b/test/CodeGen/cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t extern void go(const void *p); float v[2] = { 0.0, 1.0 }; diff --git a/test/CodeGen/cfstring.c b/test/CodeGen/cfstring.c index a78dfdaf6502a..1f0977f0398ac 100644 --- a/test/CodeGen/cfstring.c +++ b/test/CodeGen/cfstring.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t #define CFSTR __builtin___CFStringMakeConstantString void f() { diff --git a/test/CodeGen/cfstring2.c b/test/CodeGen/cfstring2.c index ceefeb9e832c5..c760f5dcf5ebb 100644 --- a/test/CodeGen/cfstring2.c +++ b/test/CodeGen/cfstring2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t typedef const struct __CFString * CFStringRef; diff --git a/test/CodeGen/cleanup-stack.c b/test/CodeGen/cleanup-stack.c index 3954d85de2b00..72a1a6c751a9b 100644 --- a/test/CodeGen/cleanup-stack.c +++ b/test/CodeGen/cleanup-stack.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -O3 -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm %s -o %t // RUN: grep "ret i32 9" %t struct s0 { diff --git a/test/CodeGen/complex.c b/test/CodeGen/complex.c index 6a0d3d628c549..8d9c68d074efa 100644 --- a/test/CodeGen/complex.c +++ b/test/CodeGen/complex.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s +// RUN: %clang_cc1 -emit-llvm < %s int main(void) { diff --git a/test/CodeGen/compound-literal.c b/test/CodeGen/compound-literal.c index ef0436744dae5..4b995dbfef2e0 100644 --- a/test/CodeGen/compound-literal.c +++ b/test/CodeGen/compound-literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm +// RUN: %clang_cc1 < %s -emit-llvm int* a = &(int){1}; struct s {int a, b, c;} * b = &(struct s) {1, 2, 3}; diff --git a/test/CodeGen/compound-type.c b/test/CodeGen/compound-type.c index 47eb3a6e57b69..63ba69460c317 100644 --- a/test/CodeGen/compound-type.c +++ b/test/CodeGen/compound-type.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm -triple i686-pc-linux-gnu > %t +// RUN: %clang_cc1 < %s -emit-llvm -triple i686-pc-linux-gnu > %t // RUN: grep "div i32" %t // RUN: grep "shl i32" %t diff --git a/test/CodeGen/compound.c b/test/CodeGen/compound.c index c54600705330b..960b2e8b04b8f 100644 --- a/test/CodeGen/compound.c +++ b/test/CodeGen/compound.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm +// RUN: %clang_cc1 < %s -emit-llvm int A; long long B; int C; diff --git a/test/CodeGen/conditional-gnu-ext.c b/test/CodeGen/conditional-gnu-ext.c index 1483d8af85928..f4ac81bf5934a 100644 --- a/test/CodeGen/conditional-gnu-ext.c +++ b/test/CodeGen/conditional-gnu-ext.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t // PR1824 int foo(int x, short y) { diff --git a/test/CodeGen/conditional.c b/test/CodeGen/conditional.c index f55d59071a2fd..d079aafd787ad 100644 --- a/test/CodeGen/conditional.c +++ b/test/CodeGen/conditional.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t float test1(int cond, float a, float b) { return cond ? a : b; diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c index 5f196ca5a43de..c7a53be02c58a 100644 --- a/test/CodeGen/const-init.c +++ b/test/CodeGen/const-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -ffreestanding -verify -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -ffreestanding -verify -emit-llvm -o - %s | FileCheck %s #include <stdint.h> diff --git a/test/CodeGen/const-label-addr.c b/test/CodeGen/const-label-addr.c index f8c35c676783c..9d99f88c8a650 100644 --- a/test/CodeGen/const-label-addr.c +++ b/test/CodeGen/const-label-addr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int a() { A:;static void* a = &&A; } diff --git a/test/CodeGen/constant-comparison.c b/test/CodeGen/constant-comparison.c index 3089ae48e6e7f..371cb179f9015 100644 --- a/test/CodeGen/constant-comparison.c +++ b/test/CodeGen/constant-comparison.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-llvm %s -o - 2>&1 | not grep warning -// RUN: clang-cc -emit-llvm %s -o - | grep @b | count 1 +// RUN: %clang_cc1 -emit-llvm %s -o - 2>&1 | not grep warning +// RUN: %clang_cc1 -emit-llvm %s -o - | grep @b | count 1 int a, b; int *c1 = 1 < 2 ? &a : &b; diff --git a/test/CodeGen/constructor-attribute.c b/test/CodeGen/constructor-attribute.c index b715201dc53bd..a1f0e604d401e 100644 --- a/test/CodeGen/constructor-attribute.c +++ b/test/CodeGen/constructor-attribute.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep -e "global_ctors.*@A" %t // RUN: grep -e "global_dtors.*@B" %t // RUN: grep -e "global_ctors.*@C" %t diff --git a/test/CodeGen/cxx-condition.cpp b/test/CodeGen/cxx-condition.cpp index 330a17a10a43d..5aa0c5e294f1a 100644 --- a/test/CodeGen/cxx-condition.cpp +++ b/test/CodeGen/cxx-condition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t void f() { int a; diff --git a/test/CodeGen/cxx-default-arg.cpp b/test/CodeGen/cxx-default-arg.cpp index 8391b9ccae196..25b7c10ad10fd 100644 --- a/test/CodeGen/cxx-default-arg.cpp +++ b/test/CodeGen/cxx-default-arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t // Note: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code // that makes all of the defaulted arguments explicit. The resulting diff --git a/test/CodeGen/cxx-value-init.cpp b/test/CodeGen/cxx-value-init.cpp index e23869879fbd3..6e4cc0388e928 100644 --- a/test/CodeGen/cxx-value-init.cpp +++ b/test/CodeGen/cxx-value-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t enum E {}; int v1 = E(); diff --git a/test/CodeGen/darwin-string-literals.c b/test/CodeGen/darwin-string-literals.c index 427e9c2e1b209..b665321730f26 100644 --- a/test/CodeGen/darwin-string-literals.c +++ b/test/CodeGen/darwin-string-literals.c @@ -1,10 +1,10 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s // CHECK-LSB: @.str = private constant [8 x i8] c"string0\00" // CHECK-LSB: @.str1 = private constant [8 x i8] c"string1\00" // CHECK-LSB: @.str2 = internal constant [36 x i8] c"h\00e\00l\00l\00o\00 \00\92! \00\03& \00\90! \00w\00o\00r\00l\00d\00\00\00", section "__TEXT,__ustring", align 2 -// RUN: clang-cc -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s +// RUN: %clang_cc1 -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix MSB %s // CHECK-MSB: @.str = private constant [8 x i8] c"string0\00" // CHECK-MSB: @.str1 = private constant [8 x i8] c"string1\00" diff --git a/test/CodeGen/debug-info.c b/test/CodeGen/debug-info.c index d7a54d6439379..a84d0b2c6aca5 100644 --- a/test/CodeGen/debug-info.c +++ b/test/CodeGen/debug-info.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -o %t -emit-llvm -g %s +// RUN: %clang_cc1 -o %t -emit-llvm -g %s // RUN: FileCheck --input-file=%t %s // PR3023 diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c index f7a001e47ce4a..6d068134b5893 100644 --- a/test/CodeGen/decl.c +++ b/test/CodeGen/decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm < %s | FileCheck %s // CHECK: @test1.x = internal constant [12 x i32] [i32 1 // CHECK: @test2.x = internal constant [13 x i32] [i32 1, diff --git a/test/CodeGen/designated-initializers.c b/test/CodeGen/designated-initializers.c index cc88cef0dcdfe..652238f06d56a 100644 --- a/test/CodeGen/designated-initializers.c +++ b/test/CodeGen/designated-initializers.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t // RUN: grep "{ i8\* null, i32 1024 }" %t // RUN: grep "i32 0, i32 22" %t diff --git a/test/CodeGen/dllimport-dllexport.c b/test/CodeGen/dllimport-dllexport.c index 6e259058b7a1e..c7c2420ea77eb 100644 --- a/test/CodeGen/dllimport-dllexport.c +++ b/test/CodeGen/dllimport-dllexport.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o %t +// RUN: %clang_cc1 -emit-llvm < %s -o %t // RUN: grep 'dllexport' %t | count 1 // RUN: not grep 'dllimport' %t diff --git a/test/CodeGen/dostmt.c b/test/CodeGen/dostmt.c index 4fb3dcdee9bc2..1a2e02a78e6ba 100644 --- a/test/CodeGen/dostmt.c +++ b/test/CodeGen/dostmt.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - int bar(); int test0() { diff --git a/test/CodeGen/emit-all-decls.c b/test/CodeGen/emit-all-decls.c index 3e7927d8ef792..deeb573a385af 100644 --- a/test/CodeGen/emit-all-decls.c +++ b/test/CodeGen/emit-all-decls.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: not grep "@foo" %t -// RUN: clang-cc -femit-all-decls -emit-llvm -o %t %s +// RUN: %clang_cc1 -femit-all-decls -emit-llvm -o %t %s // RUN: grep "@foo" %t static void foo() { diff --git a/test/CodeGen/empty-union-init.c b/test/CodeGen/empty-union-init.c index 8448b3ded798b..a58354b772f3d 100644 --- a/test/CodeGen/empty-union-init.c +++ b/test/CodeGen/empty-union-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o - +// RUN: %clang_cc1 -emit-llvm < %s -o - // PR2419 struct Mem { diff --git a/test/CodeGen/enum.c b/test/CodeGen/enum.c index 172d308c2b0b8..771fc6b182e34 100644 --- a/test/CodeGen/enum.c +++ b/test/CodeGen/enum.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6' +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6' static enum { foo, bar = 1U } z; diff --git a/test/CodeGen/exprs.c b/test/CodeGen/exprs.c index c1a5995dfc8db..d82cbf48d30a1 100644 --- a/test/CodeGen/exprs.c +++ b/test/CodeGen/exprs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - // PR1895 // sizeof function diff --git a/test/CodeGen/ext-vector-shuffle.c b/test/CodeGen/ext-vector-shuffle.c index 88f8c242e8801..1d147a3b3e322 100644 --- a/test/CodeGen/ext-vector-shuffle.c +++ b/test/CodeGen/ext-vector-shuffle.c @@ -1,6 +1,6 @@ -// RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'extractelement' -// RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'insertelement' -// RUN: clang-cc %s -x cl -emit-llvm -o - | grep 'shufflevector' +// RUN: %clang_cc1 %s -x cl -emit-llvm -o - | not grep 'extractelement' +// RUN: %clang_cc1 %s -x cl -emit-llvm -o - | not grep 'insertelement' +// RUN: %clang_cc1 %s -x cl -emit-llvm -o - | grep 'shufflevector' typedef __attribute__(( ext_vector_type(2) )) float float2; typedef __attribute__(( ext_vector_type(4) )) float float4; diff --git a/test/CodeGen/ext-vector.c b/test/CodeGen/ext-vector.c index 6a246db63515d..6215323881fcd 100644 --- a/test/CodeGen/ext-vector.c +++ b/test/CodeGen/ext-vector.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t typedef __attribute__(( ext_vector_type(4) )) float float4; typedef __attribute__(( ext_vector_type(2) )) float float2; @@ -138,3 +138,16 @@ void test8(float4 *ap, float4 *bp, int c) { cmp = a == b; cmp = a != b; } + +int test9(int4 V) { + return V.xy.x; +} + +int test10(int4 V) { + return (V+V).x; +} + +int4 test11a(); +int test11() { + return test11a().x; +} diff --git a/test/CodeGen/extern-block-var.c b/test/CodeGen/extern-block-var.c index e8de3e7f11fe1..329f109568427 100644 --- a/test/CodeGen/extern-block-var.c +++ b/test/CodeGen/extern-block-var.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int f() { extern int a; diff --git a/test/CodeGen/flexible-array-init.c b/test/CodeGen/flexible-array-init.c index bf8f057c2a06f..36323502a4151 100644 --- a/test/CodeGen/flexible-array-init.c +++ b/test/CodeGen/flexible-array-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s struct { int x; int y[]; } a = { 1, 7, 11 }; // CHECK: @a = global %0 { i32 1, [2 x i32] [i32 7, i32 11] } diff --git a/test/CodeGen/func-decl-cleanup.c b/test/CodeGen/func-decl-cleanup.c index 4808e12fdfcc9..0af8b69402020 100644 --- a/test/CodeGen/func-decl-cleanup.c +++ b/test/CodeGen/func-decl-cleanup.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - // PR2360 diff --git a/test/CodeGen/func-ptr-cast-decl.c b/test/CodeGen/func-ptr-cast-decl.c new file mode 100644 index 0000000000000..e6307964294ad --- /dev/null +++ b/test/CodeGen/func-ptr-cast-decl.c @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -emit-llvm-only %s -verify +// PR5882 + +int q_sk_num(void *a); +typedef int (*fptr)(double); +void a() { ((fptr)q_sk_num)(0); } diff --git a/test/CodeGen/func-return-member.c b/test/CodeGen/func-return-member.c index 68a48fc1041fc..8c55a9671cd05 100644 --- a/test/CodeGen/func-return-member.c +++ b/test/CodeGen/func-return-member.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s struct frk { float _Complex c; int x; }; struct faz { struct frk f; }; diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c index b09b28b8d93d3..8ddaa28eed03d 100644 --- a/test/CodeGen/function-attributes.c +++ b/test/CodeGen/function-attributes.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s // CHECK: define signext i8 @f0(i32 %x) nounwind // CHECK: define zeroext i8 @f1(i32 %x) nounwind // CHECK: define void @f2(i8 signext %x) nounwind diff --git a/test/CodeGen/function-decay.m b/test/CodeGen/function-decay.m index 4b8e3602d4608..161f9079b254d 100644 --- a/test/CodeGen/function-decay.m +++ b/test/CodeGen/function-decay.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - @interface I0 @end @implementation I0 diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c index 1c53db4119616..cb9a4ef81f139 100644 --- a/test/CodeGen/functions.c +++ b/test/CodeGen/functions.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int g(); diff --git a/test/CodeGen/global-decls.c b/test/CodeGen/global-decls.c index c7a70fa237ac3..89e899f5baba8 100644 --- a/test/CodeGen/global-decls.c +++ b/test/CodeGen/global-decls.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s // RUN: grep '@g0_ext = extern_weak global i32' %t extern int g0_ext __attribute__((weak)); diff --git a/test/CodeGen/global-init.c b/test/CodeGen/global-init.c index 2368422f3ab75..e166fb44659d3 100644 --- a/test/CodeGen/global-init.c +++ b/test/CodeGen/global-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - -triple i386-linux-gnu %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - -triple i386-linux-gnu %s | FileCheck %s // This checks that the global won't be marked as common. // (It shouldn't because it's being initialized). diff --git a/test/CodeGen/global-with-initialiser.c b/test/CodeGen/global-with-initialiser.c index d253782f66e1d..27d209e0ad09c 100644 --- a/test/CodeGen/global-with-initialiser.c +++ b/test/CodeGen/global-with-initialiser.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t const int globalInt = 1; int globalIntWithFloat = 1.5f; diff --git a/test/CodeGen/globalinit.c b/test/CodeGen/globalinit.c index b3d0cb54d15c5..e07a419418bc0 100644 --- a/test/CodeGen/globalinit.c +++ b/test/CodeGen/globalinit.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t int A[10] = { 1,2,3,4,5 }; diff --git a/test/CodeGen/illegal-UTF8.m b/test/CodeGen/illegal-UTF8.m index a9d5a37ac7570..871e6e5956a85 100644 --- a/test/CodeGen/illegal-UTF8.m +++ b/test/CodeGen/illegal-UTF8.m @@ -1,4 +1,4 @@ -// RUN: clang %s -S -m64 -o - +// RUN: %clang %s -S -m64 -o - @class NSString; diff --git a/test/CodeGen/incomplete-function-type.c b/test/CodeGen/incomplete-function-type.c index c760e04a08f5b..0ba6633b4adf9 100644 --- a/test/CodeGen/incomplete-function-type.c +++ b/test/CodeGen/incomplete-function-type.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s // CHECK: ModuleID // CHECK-NOT: opaque // CHECK: define void @f0 diff --git a/test/CodeGen/indirect-goto.c b/test/CodeGen/indirect-goto.c index 6804f5739bbff..9fd8cfacecbf6 100644 --- a/test/CodeGen/indirect-goto.c +++ b/test/CodeGen/indirect-goto.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts -S | grep "ret i32 2520" +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts -S | grep "ret i32 2520" static int foo(unsigned i) { void *addrs[] = { &&L1, &&L2, &&L3, &&L4, &&L5 }; diff --git a/test/CodeGen/init-with-member-expr.c b/test/CodeGen/init-with-member-expr.c index 197a9ab4e3b87..fdc8c149e5222 100644 --- a/test/CodeGen/init-with-member-expr.c +++ b/test/CodeGen/init-with-member-expr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm +// RUN: %clang_cc1 < %s -emit-llvm struct test { int a; }; diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c index b0537ae5b0771..f6b35361570a2 100644 --- a/test/CodeGen/init.c +++ b/test/CodeGen/init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o %t void f1() { // Scalars in braces. diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c index 76d90eda2100b..a17b069929688 100644 --- a/test/CodeGen/inline.c +++ b/test/CodeGen/inline.c @@ -1,5 +1,5 @@ // RUN: echo "GNU89 tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=gnu89 +// RUN: %clang %s -emit-llvm -S -o %t -std=gnu89 // RUN: grep "define available_externally i32 @ei()" %t // RUN: grep "define i32 @foo()" %t // RUN: grep "define i32 @bar()" %t @@ -14,7 +14,7 @@ // RUN: grep "define available_externally i32 @test5" %t // RUN: echo "\nC99 tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=c99 +// RUN: %clang %s -emit-llvm -S -o %t -std=c99 // RUN: grep "define i32 @ei()" %t // RUN: grep "define available_externally i32 @foo()" %t // RUN: grep "define i32 @bar()" %t @@ -29,7 +29,7 @@ // RUN: grep "define available_externally i32 @test5" %t // RUN: echo "\nC++ tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=c++98 +// RUN: %clang %s -emit-llvm -S -o %t -std=c++98 // RUN: grep "define linkonce_odr i32 @_Z2eiv()" %t // RUN: grep "define linkonce_odr i32 @_Z3foov()" %t // RUN: grep "define i32 @_Z3barv()" %t diff --git a/test/CodeGen/inline2.c b/test/CodeGen/inline2.c index 304d6168578c7..737b58fa44c62 100644 --- a/test/CodeGen/inline2.c +++ b/test/CodeGen/inline2.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix GNU89 %s -// RUN: clang-cc -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix C99 %s +// RUN: %clang_cc1 -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix GNU89 %s +// RUN: %clang_cc1 -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix C99 %s // CHECK-GNU89: define i32 @f0() // CHECK-C99: define i32 @f0() diff --git a/test/CodeGen/int-to-pointer.c b/test/CodeGen/int-to-pointer.c index 7cefc3902ebcb..242a8a694259c 100644 --- a/test/CodeGen/int-to-pointer.c +++ b/test/CodeGen/int-to-pointer.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t void *test(int i) { diff --git a/test/CodeGen/kr-func-promote.c b/test/CodeGen/kr-func-promote.c index d4c3851909ab8..fcdbac3ee424b 100644 --- a/test/CodeGen/kr-func-promote.c +++ b/test/CodeGen/kr-func-promote.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep "i32 @a(i32)" +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | grep "i32 @a(i32)" int a(); int a(x) short x; {return x;} diff --git a/test/CodeGen/kr-style-block.c b/test/CodeGen/kr-style-block.c index ac788dc9ab9f3..09efb37927a81 100644 --- a/test/CodeGen/kr-style-block.c +++ b/test/CodeGen/kr-style-block.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t -fblocks +// RUN: %clang_cc1 -emit-llvm %s -o %t -fblocks void foo (void(^)()); diff --git a/test/CodeGen/libcalls.c b/test/CodeGen/libcalls.c index 32fc59f27fee1..fe12f4a08a522 100644 --- a/test/CodeGen/libcalls.c +++ b/test/CodeGen/libcalls.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -emit-llvm -o %t %s -triple i386-unknown-unknown +// RUN: %clang_cc1 -emit-llvm -o %t %s -triple i386-unknown-unknown // RUN: grep "declare " %t | count 6 // RUN: grep "declare " %t | grep "@llvm." | count 1 -// RUN: clang-cc -fno-math-errno -emit-llvm -o %t %s -triple i386-unknown-unknown +// RUN: %clang_cc1 -fno-math-errno -emit-llvm -o %t %s -triple i386-unknown-unknown // RUN: grep "declare " %t | count 6 // RUN: grep "declare " %t | grep -v "@llvm." | count 0 diff --git a/test/CodeGen/lineno-dbginfo.c b/test/CodeGen/lineno-dbginfo.c index b78dd21d72b39..c5c350f7009e7 100644 --- a/test/CodeGen/lineno-dbginfo.c +++ b/test/CodeGen/lineno-dbginfo.c @@ -1,5 +1,5 @@ // RUN: echo "#include <stdio.h>" > %t.h -// RUN: clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll +// RUN: %clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll // RUN: grep "i32 5" %t.ll // RUN: rm -f lineno-dbginfo.i // outer is at line number 5. diff --git a/test/CodeGen/linkage-redecl.c b/test/CodeGen/linkage-redecl.c index b015ca854737e..09b51f02c13f2 100644 --- a/test/CodeGen/linkage-redecl.c +++ b/test/CodeGen/linkage-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - |grep internal +// RUN: %clang_cc1 -emit-llvm %s -o - |grep internal // C99 6.2.2p3 // PR3425 diff --git a/test/CodeGen/long-double-x86.c b/test/CodeGen/long-double-x86.c index b01ce0b93ec3b..f040207e73a87 100644 --- a/test/CodeGen/long-double-x86.c +++ b/test/CodeGen/long-double-x86.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep x86_fp80 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep x86_fp80 long double x = 0; int checksize[sizeof(x) == 16 ? 1 : -1]; diff --git a/test/CodeGen/mandel.c b/test/CodeGen/mandel.c index 9d7956c56d1b8..8ecf8f2337a3e 100644 --- a/test/CodeGen/mandel.c +++ b/test/CodeGen/mandel.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t /* Sparc is not C99-compliant */ #if defined(sparc) || defined(__sparc__) || defined(__sparcv9) diff --git a/test/CodeGen/mangle.c b/test/CodeGen/mangle.c index 6f42f6f6496cc..a087b42ad21a7 100644 --- a/test/CodeGen/mangle.c +++ b/test/CodeGen/mangle.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s // CHECK: @"\01foo" diff --git a/test/CodeGen/merge-attrs.c b/test/CodeGen/merge-attrs.c index 1aab47a3a30cd..474b17225ab3c 100644 --- a/test/CodeGen/merge-attrs.c +++ b/test/CodeGen/merge-attrs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t void *malloc(__SIZE_TYPE__ size) __attribute__ ((__nothrow__)); diff --git a/test/CodeGen/merge-statics.c b/test/CodeGen/merge-statics.c index c442669e6422f..6716935c4d122 100644 --- a/test/CodeGen/merge-statics.c +++ b/test/CodeGen/merge-statics.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm | grep internal | count 1 +// RUN: %clang_cc1 < %s -emit-llvm | grep internal | count 1 // The two decls for 'a' should merge into one llvm GlobalVariable. diff --git a/test/CodeGen/no-common.c b/test/CodeGen/no-common.c index 64e37d78f9646..03a5bb064c31d 100644 --- a/test/CodeGen/no-common.c +++ b/test/CodeGen/no-common.c @@ -1,6 +1,6 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s // RUN: grep '@x = common global' %t -// RUN: clang -fno-common -emit-llvm -S -o %t %s +// RUN: %clang -fno-common -emit-llvm -S -o %t %s // RUN: grep '@x = global' %t int x; diff --git a/test/CodeGen/object-size.c b/test/CodeGen/object-size.c index 45747de6c9218..4947c19a5de80 100644 --- a/test/CodeGen/object-size.c +++ b/test/CodeGen/object-size.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s #define strcpy(dest, src) \ ((__builtin_object_size(dest, 0) != -1ULL) \ @@ -35,7 +35,7 @@ void test4() { void test5() { // CHECK: %tmp = load i8** @gp - // CHECK-NEXT:%0 = call i64 @llvm.objectsize.i64(i8* %tmp, i32 0) + // CHECK-NEXT:%0 = call i64 @llvm.objectsize.i64(i8* %tmp, i1 false) // CHECK-NEXT:%cmp = icmp ne i64 %0, -1 strcpy(gp, "Hi there"); } diff --git a/test/CodeGen/offsetof.c b/test/CodeGen/offsetof.c index b0f5727a92dc3..c279e2282e460 100644 --- a/test/CodeGen/offsetof.c +++ b/test/CodeGen/offsetof.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t // PR2910 struct sockaddr_un { diff --git a/test/CodeGen/opaque-pointer.c b/test/CodeGen/opaque-pointer.c index 7f78b91fb17e2..d658db111d3a1 100644 --- a/test/CodeGen/opaque-pointer.c +++ b/test/CodeGen/opaque-pointer.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - struct test; typedef void (*my_func) (struct test *); diff --git a/test/CodeGen/overloadable.c b/test/CodeGen/overloadable.c index 4b58c82546247..1ed72b19c4d4f 100644 --- a/test/CodeGen/overloadable.c +++ b/test/CodeGen/overloadable.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep _Z1fPA10_1X +// RUN: %clang_cc1 -emit-llvm %s -o - | grep _Z1fPA10_1X int __attribute__((overloadable)) f(int x) { return x; } float __attribute__((overloadable)) f(float x) { return x; } double __attribute__((overloadable)) f(double x) { return x; } diff --git a/test/CodeGen/packed-union.c b/test/CodeGen/packed-union.c index 41dc94c7a4100..0aeed008b752e 100644 --- a/test/CodeGen/packed-union.c +++ b/test/CodeGen/packed-union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin10 -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o %t // RUN: grep "struct._attrs = type <{ i32, i8 }>" %t typedef struct _attrs { diff --git a/test/CodeGen/palignr.c b/test/CodeGen/palignr.c index 41e48bd2854d9..68efb414509ce 100644 --- a/test/CodeGen/palignr.c +++ b/test/CodeGen/palignr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=i686-apple-darwin -target-feature +ssse3 -O1 -S -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=i686-apple-darwin -target-feature +ssse3 -O1 -S -o - | FileCheck %s #define _mm_alignr_epi8(a, b, n) (__builtin_ia32_palignr128((a), (b), (n))) #define _mm_alignr_pi8(a, b, n) (__builtin_ia32_palignr((a), (b), (n*8))) diff --git a/test/CodeGen/parameter-passing.c b/test/CodeGen/parameter-passing.c index 966223a39f56b..e48815b96612c 100644 --- a/test/CodeGen/parameter-passing.c +++ b/test/CodeGen/parameter-passing.c @@ -5,13 +5,13 @@ // We also check _Bool and empty structures, as these can have annoying // corner cases. -// RUN: clang-cc %s -triple i386-unknown-unknown -O3 -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O3 -emit-llvm -o %t // RUN: not grep '@g0' %t -// RUN: clang-cc %s -triple x86_64-unknown-unknown -O3 -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple x86_64-unknown-unknown -O3 -emit-llvm -o %t // RUN: not grep '@g0' %t -// RUN: clang-cc %s -triple powerpc-unknown-unknown -O3 -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple powerpc-unknown-unknown -O3 -emit-llvm -o %t // RUN: not grep '@g0' %t typedef _Bool BoolTy; diff --git a/test/CodeGen/pascal-string.c b/test/CodeGen/pascal-string.c index fcd807cde7b17..0a9ee67ea01ee 100644 --- a/test/CodeGen/pascal-string.c +++ b/test/CodeGen/pascal-string.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s -fpascal-strings | grep "05Hello" +// RUN: %clang_cc1 -emit-llvm -o - %s -fpascal-strings | grep "05Hello" unsigned char * Foo( void ) { diff --git a/test/CodeGen/pointer-arithmetic.c b/test/CodeGen/pointer-arithmetic.c index 5049875dd3ed2..33465e0aa1378 100644 --- a/test/CodeGen/pointer-arithmetic.c +++ b/test/CodeGen/pointer-arithmetic.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -S %s -o - +// RUN: %clang_cc1 -S %s -o - typedef int Int; diff --git a/test/CodeGen/pointer-cmp-type.c b/test/CodeGen/pointer-cmp-type.c index d88c0911ba489..59b271235ca9e 100644 --- a/test/CodeGen/pointer-cmp-type.c +++ b/test/CodeGen/pointer-cmp-type.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep "icmp ult" +// RUN: %clang_cc1 -emit-llvm %s -o - | grep "icmp ult" int a(char* a, char* b) {return a<b;} diff --git a/test/CodeGen/pointer-to-int.c b/test/CodeGen/pointer-to-int.c index e40bd91d8f990..30a6db280d410 100644 --- a/test/CodeGen/pointer-to-int.c +++ b/test/CodeGen/pointer-to-int.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - int test(void* i) { diff --git a/test/CodeGen/pragma-pack-1.c b/test/CodeGen/pragma-pack-1.c index bcfcd5ac3ab9f..f5d301639e056 100644 --- a/test/CodeGen/pragma-pack-1.c +++ b/test/CodeGen/pragma-pack-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - +// RUN: %clang_cc1 -emit-llvm -o - // PR4610 #pragma pack(4) diff --git a/test/CodeGen/pragma-pack-2.c b/test/CodeGen/pragma-pack-2.c index bfc5dc943c5eb..bfb34d7c688d7 100644 --- a/test/CodeGen/pragma-pack-2.c +++ b/test/CodeGen/pragma-pack-2.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s // CHECK-X32: %struct.s0 = type { i64, i64, i32, [12 x i32] } // CHECK-X32: %struct.s1 = type { [15 x i32], %struct.s0 } -// RUN: clang-cc -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s // CHECK-X64: %struct.s0 = type <{ i64, i64, i32, [12 x i32] }> // CHECK-X64: %struct.s1 = type <{ [15 x i32], %struct.s0 }> diff --git a/test/CodeGen/pragma-pack-3.c b/test/CodeGen/pragma-pack-3.c index 56a6be3874fab..676f0d77eba3c 100644 --- a/test/CodeGen/pragma-pack-3.c +++ b/test/CodeGen/pragma-pack-3.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s // CHECK-X32: %struct.menu = type <{ i8*, i8, i8 }> // CHECK-X32: %union.command = type <{ i8*, [2 x i8] }> -// RUN: clang-cc -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s // CHECK-X64: %struct.menu = type <{ i8*, i8, i8 }> // CHECK-X64: %union.command = type <{ i8*, [2 x i8] }> diff --git a/test/CodeGen/pragma-weak.c b/test/CodeGen/pragma-weak.c index 497039a8f42c3..5c2866e3d35f4 100644 --- a/test/CodeGen/pragma-weak.c +++ b/test/CodeGen/pragma-weak.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -verify | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -verify | FileCheck %s // CHECK: @weakvar = weak global // CHECK: @__weakvar_alias = common global diff --git a/test/CodeGen/predefined-expr.c b/test/CodeGen/predefined-expr.c index 1a5dcb4fc6ff9..9be5754114bfc 100644 --- a/test/CodeGen/predefined-expr.c +++ b/test/CodeGen/predefined-expr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // CHECK: @__func__.plainFunction = private constant [14 x i8] c"plainFunction\00" // CHECK: @__PRETTY_FUNCTION__.plainFunction = private constant [21 x i8] c"void plainFunction()\00" diff --git a/test/CodeGen/private-extern.c b/test/CodeGen/private-extern.c index a9bb28bfad4e4..2d34d543213d9 100644 --- a/test/CodeGen/private-extern.c +++ b/test/CodeGen/private-extern.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep '@g0 = external hidden constant i32' %t // RUN: grep '@g1 = hidden constant i32 1' %t diff --git a/test/CodeGen/rdr-6098585-default-after-caserange.c b/test/CodeGen/rdr-6098585-default-after-caserange.c index 2c58548744d62..3a89aa39a0d7f 100644 --- a/test/CodeGen/rdr-6098585-default-after-caserange.c +++ b/test/CodeGen/rdr-6098585-default-after-caserange.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t // RUN: grep "ret i32" %t | count 1 // RUN: grep "ret i32 10" %t | count 1 diff --git a/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c b/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c index 257a9d7f8acdf..ba41b519fcca4 100644 --- a/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c +++ b/test/CodeGen/rdr-6098585-default-fallthrough-to-caserange.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t // RUN: grep "ret i32 10" %t // Ensure that this doesn't compile to infinite loop in g() due to diff --git a/test/CodeGen/rdr-6098585-empty-case-range.c b/test/CodeGen/rdr-6098585-empty-case-range.c index 2dd1eaac9df81..1cf77ac6aa562 100644 --- a/test/CodeGen/rdr-6098585-empty-case-range.c +++ b/test/CodeGen/rdr-6098585-empty-case-range.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t // RUN: grep "ret i32" %t | count 2 // RUN: grep "ret i32 3" %t | count 2 diff --git a/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c b/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c index c12cf82ba0cce..48a6cc2285585 100644 --- a/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c +++ b/test/CodeGen/rdr-6098585-fallthrough-to-empty-range.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t // RUN: grep "ret i32 %" %t // Make sure return is not constant (if empty range is skipped or miscompiled) diff --git a/test/CodeGen/rdr-6098585-unsigned-caserange.c b/test/CodeGen/rdr-6098585-unsigned-caserange.c index a2b85d9895305..6f577df188c5f 100644 --- a/test/CodeGen/rdr-6098585-unsigned-caserange.c +++ b/test/CodeGen/rdr-6098585-unsigned-caserange.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t // RUN: grep "ret i32" %t | count 1 // RUN: grep "ret i32 3" %t | count 1 diff --git a/test/CodeGen/rdr-6732143-dangling-block-reference.m b/test/CodeGen/rdr-6732143-dangling-block-reference.m index 90641dd083cb5..b4d21a3f8fccd 100644 --- a/test/CodeGen/rdr-6732143-dangling-block-reference.m +++ b/test/CodeGen/rdr-6732143-dangling-block-reference.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm %s -o - +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm %s -o - void f0(id x) { @synchronized (x) { diff --git a/test/CodeGen/regparm.c b/test/CodeGen/regparm.c index 28dfae7f628b7..ac3797547d999 100644 --- a/test/CodeGen/regparm.c +++ b/test/CodeGen/regparm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep inreg | count 2 +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | grep inreg | count 2 #define FASTCALL __attribute__((regparm(2))) diff --git a/test/CodeGen/shared-string-literals.c b/test/CodeGen/shared-string-literals.c index a05975b4aeb77..00636b0f55aa2 100644 --- a/test/CodeGen/shared-string-literals.c +++ b/test/CodeGen/shared-string-literals.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t char *globalString = "abc"; char *globalStringArray[5] = { "123", "abc" }; diff --git a/test/CodeGen/sizeof-vla.c b/test/CodeGen/sizeof-vla.c index af5088553e487..b0c514fd0161c 100644 --- a/test/CodeGen/sizeof-vla.c +++ b/test/CodeGen/sizeof-vla.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s // PR3442 diff --git a/test/CodeGen/stack-protector.c b/test/CodeGen/stack-protector.c index 57635976d05f7..eb4cea211779c 100644 --- a/test/CodeGen/stack-protector.c +++ b/test/CodeGen/stack-protector.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s +// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s // NOSSP: define void @test1(i8* %msg) nounwind { -// RUN: clang-cc -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s +// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s // WITHSSP: define void @test1(i8* %msg) nounwind ssp { -// RUN: clang-cc -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s +// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s // SSPREQ: define void @test1(i8* %msg) nounwind sspreq { int printf(const char * _Format, ...); diff --git a/test/CodeGen/statements.c b/test/CodeGen/statements.c index 45bbd9ac024fb..e3835f062a690 100644 --- a/test/CodeGen/statements.c +++ b/test/CodeGen/statements.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm +// RUN: %clang_cc1 < %s -emit-llvm void test1(int x) { switch (x) { diff --git a/test/CodeGen/static-forward-decl-fun.c b/test/CodeGen/static-forward-decl-fun.c index a945df3d3b384..e33ee621b3451 100644 --- a/test/CodeGen/static-forward-decl-fun.c +++ b/test/CodeGen/static-forward-decl-fun.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t static int staticfun(void); int (*staticuse1)(void) = staticfun; diff --git a/test/CodeGen/static-forward-decl.c b/test/CodeGen/static-forward-decl.c index f12c22fb41af7..0d35061279c38 100644 --- a/test/CodeGen/static-forward-decl.c +++ b/test/CodeGen/static-forward-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10" +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10" static int i; int*j=&i; diff --git a/test/CodeGen/static-local-union.c b/test/CodeGen/static-local-union.c index f276b200eb107..bd32519e43e9e 100644 --- a/test/CodeGen/static-local-union.c +++ b/test/CodeGen/static-local-union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s +// RUN: %clang_cc1 -emit-llvm < %s int a() {static union{int a;} r[2] = {1,2};return r[1].a;} diff --git a/test/CodeGen/static-order.c b/test/CodeGen/static-order.c index 58340b6913020..e7f9814261ccc 100644 --- a/test/CodeGen/static-order.c +++ b/test/CodeGen/static-order.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s // CHECK: ModuleID // CHECK-NOT: zeroinitializer // CHECK: define i8* @f diff --git a/test/CodeGen/staticinit.c b/test/CodeGen/staticinit.c index 8b87ccd6b9057..cd1f059e570af 100644 --- a/test/CodeGen/staticinit.c +++ b/test/CodeGen/staticinit.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s // RUN: grep "g.b = internal global i8. getelementptr" %t struct AStruct { diff --git a/test/CodeGen/stdcall-fastcall.c b/test/CodeGen/stdcall-fastcall.c index 11b652178ca85..838ccfb48c566 100644 --- a/test/CodeGen/stdcall-fastcall.c +++ b/test/CodeGen/stdcall-fastcall.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-llvm < %s | grep 'fastcallcc' | count 4 -// RUN: clang-cc -emit-llvm < %s | grep 'stdcallcc' | count 4 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'fastcallcc' | count 4 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'stdcallcc' | count 4 void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); diff --git a/test/CodeGen/string-literal.c b/test/CodeGen/string-literal.c index a4011938c1066..22a81e7185518 100644 --- a/test/CodeGen/string-literal.c +++ b/test/CodeGen/string-literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - int main() { char a[10] = "abc"; diff --git a/test/CodeGen/struct-comma.c b/test/CodeGen/struct-comma.c index d7f50da131221..e5b51514384ab 100644 --- a/test/CodeGen/struct-comma.c +++ b/test/CodeGen/struct-comma.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - struct S {int a, b;} x; void a(struct S* b) {*b = (r(), x);} diff --git a/test/CodeGen/struct-copy.c b/test/CodeGen/struct-copy.c index 62c29aba6c9cf..6f3b6643f09a5 100644 --- a/test/CodeGen/struct-copy.c +++ b/test/CodeGen/struct-copy.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep 'call.*llvm.memcpy' +// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'call.*llvm.memcpy' struct x { int a[100]; }; diff --git a/test/CodeGen/struct-init.c b/test/CodeGen/struct-init.c index cb84fef4d1c15..88b57a26478a4 100644 --- a/test/CodeGen/struct-init.c +++ b/test/CodeGen/struct-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - typedef struct _zend_ini_entry zend_ini_entry; struct _zend_ini_entry { diff --git a/test/CodeGen/struct-passing.c b/test/CodeGen/struct-passing.c index 772077a5964f9..b351d8148e910 100644 --- a/test/CodeGen/struct-passing.c +++ b/test/CodeGen/struct-passing.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s // RUN: grep 'declare i32 @f0() readnone$' %t // RUN: grep 'declare i32 @f1() readonly$' %t // RUN: grep 'declare void @f2(.* noalias sret)$' %t diff --git a/test/CodeGen/struct-x86-darwin.c b/test/CodeGen/struct-x86-darwin.c index e7822f073d2a3..afdcb8a39a068 100644 --- a/test/CodeGen/struct-x86-darwin.c +++ b/test/CodeGen/struct-x86-darwin.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -emit-llvm > %t1 -triple=i686-apple-darwin9 +// RUN: %clang_cc1 < %s -emit-llvm > %t1 -triple=i686-apple-darwin9 // RUN: grep "STest1 = type { i32, \[4 x i16\], double }" %t1 // RUN: grep "STest2 = type { i16, i16, i32, i32 }" %t1 // RUN: grep "STest3 = type { i8, i16, i32 }" %t1 diff --git a/test/CodeGen/struct.c b/test/CodeGen/struct.c index d1e58a2445613..25477a052e8a8 100644 --- a/test/CodeGen/struct.c +++ b/test/CodeGen/struct.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - struct { int x; diff --git a/test/CodeGen/switch.c b/test/CodeGen/switch.c index 96118f6e6fc39..519ccbac01596 100644 --- a/test/CodeGen/switch.c +++ b/test/CodeGen/switch.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -O3 %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 %s -emit-llvm -o - | FileCheck %s int foo(int i) { int j = 0; diff --git a/test/CodeGen/target-data.c b/test/CodeGen/target-data.c index 26775f98117c0..8139a4efc599d 100644 --- a/test/CodeGen/target-data.c +++ b/test/CodeGen/target-data.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple i686-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o %t %s // RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"' %t -// RUN: clang-cc -triple i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"' %t -// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s // RUN: grep 'target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"' %t diff --git a/test/CodeGen/tentative-decls.c b/test/CodeGen/tentative-decls.c index b72c5850ac2c5..d88c346d7c525 100644 --- a/test/CodeGen/tentative-decls.c +++ b/test/CodeGen/tentative-decls.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t diff --git a/test/CodeGen/thread-specifier.c b/test/CodeGen/thread-specifier.c index 456f7a6d9761e..b1e1ed84647fc 100644 --- a/test/CodeGen/thread-specifier.c +++ b/test/CodeGen/thread-specifier.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-pc-linux-gnu -emit-llvm -o - %s | grep thread_local | count 4 +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | grep thread_local | count 4 __thread int a; extern __thread int b; diff --git a/test/CodeGen/trapv.c b/test/CodeGen/trapv.c index 6045ed908d0e8..d10d6176bf943 100644 --- a/test/CodeGen/trapv.c +++ b/test/CodeGen/trapv.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -ftrapv %s -emit-llvm -o %t +// RUN: %clang_cc1 -ftrapv %s -emit-llvm -o %t // RUN: grep "__overflow_handler" %t | count 2 unsigned int ui, uj, uk; diff --git a/test/CodeGen/typedef-func.c b/test/CodeGen/typedef-func.c index a64426ddb274d..bc08b359d70f6 100644 --- a/test/CodeGen/typedef-func.c +++ b/test/CodeGen/typedef-func.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s +// RUN: %clang_cc1 -emit-llvm < %s // PR2414 struct mad_frame{}; diff --git a/test/CodeGen/typedef.c b/test/CodeGen/typedef.c index 3bdd52f6c572d..4af9d819f026f 100644 --- a/test/CodeGen/typedef.c +++ b/test/CodeGen/typedef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - typedef struct { int i; } Value; typedef Value *PValue; diff --git a/test/CodeGen/types.c b/test/CodeGen/types.c index 75cb851c25994..55b806c93a253 100644 --- a/test/CodeGen/types.c +++ b/test/CodeGen/types.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm <%s +// RUN: %clang_cc1 -emit-llvm <%s struct FileName { struct FileName *next; diff --git a/test/CodeGen/uint128_t.c b/test/CodeGen/uint128_t.c index b3bf7279623f8..92cb5faba4a01 100644 --- a/test/CodeGen/uint128_t.c +++ b/test/CodeGen/uint128_t.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9 typedef unsigned long long uint64_t; extern uint64_t numer; diff --git a/test/CodeGen/union-init.c b/test/CodeGen/union-init.c index f4e9e9a08f4d5..60906b533d65b 100644 --- a/test/CodeGen/union-init.c +++ b/test/CodeGen/union-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o - +// RUN: %clang_cc1 -emit-llvm < %s -o - // A nice and complicated initialization example with unions from Python typedef int Py_ssize_t; diff --git a/test/CodeGen/union-init2.c b/test/CodeGen/union-init2.c index e782425cf2b11..ac469cd4b5125 100644 --- a/test/CodeGen/union-init2.c +++ b/test/CodeGen/union-init2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple i686-pc-linux-gnu | grep "bitcast (%0\* @r to %union.x\*), \[4 x i8\] undef" +// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | grep "bitcast (%0\* @r to %union.x\*), \[4 x i8\] undef" // Make sure we generate something sane instead of a ptrtoint union x {long long b;union x* a;} r = {.a = &r}; diff --git a/test/CodeGen/union.c b/test/CodeGen/union.c index 4884690f3fdc1..b40a405597ac5 100644 --- a/test/CodeGen/union.c +++ b/test/CodeGen/union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - union u_tag { int a; diff --git a/test/CodeGen/unreachable.c b/test/CodeGen/unreachable.c index 3f39a27def976..5e9fa6a5456d4 100644 --- a/test/CodeGen/unreachable.c +++ b/test/CodeGen/unreachable.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep '@unreachable' %t | count 0 extern void abort() __attribute__((noreturn)); diff --git a/test/CodeGen/unwind-attr.c b/test/CodeGen/unwind-attr.c index 1148ba10315ee..ee3199d274ddf 100644 --- a/test/CodeGen/unwind-attr.c +++ b/test/CodeGen/unwind-attr.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fexceptions -emit-llvm -o - %s | grep "@foo()" | not grep nounwind -// RUN: clang-cc -emit-llvm -o - %s | grep "@foo()" | grep nounwind +// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | grep "@foo()" | not grep nounwind +// RUN: %clang_cc1 -emit-llvm -o - %s | grep "@foo()" | grep nounwind int foo(void) { return 0; diff --git a/test/CodeGen/var-align.c b/test/CodeGen/var-align.c index b0b62ae264737..fefd35ab634d1 100644 --- a/test/CodeGen/var-align.c +++ b/test/CodeGen/var-align.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | grep "align 16" | count 2 +// RUN: %clang_cc1 -emit-llvm %s -o - | grep "align 16" | count 2 __attribute((aligned(16))) float a[128]; union {int a[4]; __attribute((aligned(16))) float b[4];} u; diff --git a/test/CodeGen/variable-array.c b/test/CodeGen/variable-array.c index f5621c289d7a5..80ca78d5cf5f1 100644 --- a/test/CodeGen/variable-array.c +++ b/test/CodeGen/variable-array.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep puts | count 4 +// RUN: %clang_cc1 -emit-llvm < %s | grep puts | count 4 // PR3248 int a(int x) diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c index 21a03d0593d60..c16d65bebec20 100644 --- a/test/CodeGen/vector.c +++ b/test/CodeGen/vector.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -mcpu pentium4 -g -emit-llvm %s -o - +// RUN: %clang_cc1 -triple i386-apple-darwin9 -target-cpu pentium4 -g -emit-llvm %s -o - typedef short __v4hi __attribute__ ((__vector_size__ (8))); void test1() { diff --git a/test/CodeGen/vfprintf.c b/test/CodeGen/vfprintf.c index 89261c7469c65..7c583b58852d7 100644 --- a/test/CodeGen/vfprintf.c +++ b/test/CodeGen/vfprintf.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s typedef struct _IO_FILE FILE; int vfprintf(FILE*restrict,const char*restrict, __builtin_va_list); diff --git a/test/CodeGen/visibility.c b/test/CodeGen/visibility.c index c19004a5a2cb4..8f81c8f3a9900 100644 --- a/test/CodeGen/visibility.c +++ b/test/CodeGen/visibility.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-unknown-unknown -fvisibility default -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -fvisibility default -emit-llvm -o %t %s // RUN: grep '@g_com = common global i32 0' %t // RUN: grep '@g_def = global i32 0' %t // RUN: grep '@g_ext = external global i32' %t @@ -6,7 +6,7 @@ // RUN: grep 'declare void @f_ext()' %t // RUN: grep 'define internal void @f_deferred()' %t // RUN: grep 'define i32 @f_def()' %t -// RUN: clang-cc -triple i386-unknown-unknown -fvisibility protected -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -fvisibility protected -emit-llvm -o %t %s // RUN: grep '@g_com = common protected global i32 0' %t // RUN: grep '@g_def = protected global i32 0' %t // RUN: grep '@g_ext = external global i32' %t @@ -14,7 +14,7 @@ // RUN: grep 'declare void @f_ext()' %t // RUN: grep 'define internal void @f_deferred()' %t // RUN: grep 'define protected i32 @f_def()' %t -// RUN: clang-cc -triple i386-unknown-unknown -fvisibility hidden -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -fvisibility hidden -emit-llvm -o %t %s // RUN: grep '@g_com = common hidden global i32 0' %t // RUN: grep '@g_def = hidden global i32 0' %t // RUN: grep '@g_ext = external global i32' %t diff --git a/test/CodeGen/vla.c b/test/CodeGen/vla.c index 844e49e72c46a..0c539003842a1 100644 --- a/test/CodeGen/vla.c +++ b/test/CodeGen/vla.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int b(char* x); diff --git a/test/CodeGen/volatile-1.c b/test/CodeGen/volatile-1.c index 3203326ecebf8..e0c672b41eaea 100644 --- a/test/CodeGen/volatile-1.c +++ b/test/CodeGen/volatile-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Wno-unused-value -emit-llvm < %s -o %t +// RUN: %clang_cc1 -Wno-unused-value -emit-llvm < %s -o %t // RUN: grep volatile %t | count 145 // RUN: grep memcpy %t | count 4 diff --git a/test/CodeGen/volatile.c b/test/CodeGen/volatile.c index a0cc891ccd888..db87a375152a6 100644 --- a/test/CodeGen/volatile.c +++ b/test/CodeGen/volatile.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s -o %t +// RUN: %clang_cc1 -emit-llvm < %s -o %t // RUN: grep volatile %t | count 29 // RUN: grep memcpy %t | count 7 diff --git a/test/CodeGen/weak-global.c b/test/CodeGen/weak-global.c index d4ee52f48956f..f972cea912005 100644 --- a/test/CodeGen/weak-global.c +++ b/test/CodeGen/weak-global.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm < %s | grep common +// RUN: %clang_cc1 -emit-llvm < %s | grep common int i; diff --git a/test/CodeGen/weak-incomplete.c b/test/CodeGen/weak-incomplete.c index a15dbac03cb7a..af91ae7eb5cc5 100644 --- a/test/CodeGen/weak-incomplete.c +++ b/test/CodeGen/weak-incomplete.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm < %s | grep 'extern_weak' | count 1 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'extern_weak' | count 1 struct S; void __attribute__((weak)) foo1(struct S); diff --git a/test/CodeGen/whilestmt.c b/test/CodeGen/whilestmt.c index 95e18f4d21ff1..3973b2860db98 100644 --- a/test/CodeGen/whilestmt.c +++ b/test/CodeGen/whilestmt.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - int bar(); int foo() { diff --git a/test/CodeGen/writable-strings.c b/test/CodeGen/writable-strings.c index c8b70d5f0540c..693fa5ea24baa 100644 --- a/test/CodeGen/writable-strings.c +++ b/test/CodeGen/writable-strings.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - -fwritable-strings %s +// RUN: %clang_cc1 -emit-llvm -o - -fwritable-strings %s int main() { char *str = "abc"; diff --git a/test/CodeGen/x86.c b/test/CodeGen/x86.c index 0420a4cd97de6..e97d537d331be 100644 --- a/test/CodeGen/x86.c +++ b/test/CodeGen/x86.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1 +// RUN: %clang_cc1 %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1 // RUN: grep "ax" %t1 // RUN: grep "bx" %t1 // RUN: grep "cx" %t1 diff --git a/test/CodeGen/x86_32-arguments.c b/test/CodeGen/x86_32-arguments.c index 33f635c31ae19..eb98e1a2282a8 100644 --- a/test/CodeGen/x86_32-arguments.c +++ b/test/CodeGen/x86_32-arguments.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fblocks -triple i386-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin9 -emit-llvm -o %t %s // RUN: grep 'define signext i8 @f0()' %t // RUN: grep 'define signext i16 @f1()' %t // RUN: grep 'define i32 @f2()' %t diff --git a/test/CodeGen/x86_64-arguments.c b/test/CodeGen/x86_64-arguments.c index 1a848ead356f7..d6b9b2936045f 100644 --- a/test/CodeGen/x86_64-arguments.c +++ b/test/CodeGen/x86_64-arguments.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s // RUN: grep 'define signext i8 @f0()' %t // RUN: grep 'define signext i16 @f1()' %t // RUN: grep 'define i32 @f2()' %t diff --git a/test/CodeGenCXX/PR4827-cast.cpp b/test/CodeGenCXX/PR4827-cast.cpp index 958798d77f605..34a840cbdf5b9 100644 --- a/test/CodeGenCXX/PR4827-cast.cpp +++ b/test/CodeGenCXX/PR4827-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s struct A; struct B; extern A *f(); diff --git a/test/CodeGenCXX/PR4890-debug-info-dtor.cpp b/test/CodeGenCXX/PR4890-debug-info-dtor.cpp index a0d3a8ddac235..bcaf1b96274e1 100644 --- a/test/CodeGenCXX/PR4890-debug-info-dtor.cpp +++ b/test/CodeGenCXX/PR4890-debug-info-dtor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -g %s +// RUN: %clang_cc1 -emit-llvm-only -g %s struct X { ~X(); }; diff --git a/test/CodeGenCXX/PR4983-constructor-conversion.cpp b/test/CodeGenCXX/PR4983-constructor-conversion.cpp index 31eae2e791f69..797a1baa49e0d 100644 --- a/test/CodeGenCXX/PR4983-constructor-conversion.cpp +++ b/test/CodeGenCXX/PR4983-constructor-conversion.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s struct A { A(const char *s){} diff --git a/test/CodeGenCXX/PR5050-constructor-conversion.cpp b/test/CodeGenCXX/PR5050-constructor-conversion.cpp index c0b53d5f6e55e..9103b8321f843 100644 --- a/test/CodeGenCXX/PR5050-constructor-conversion.cpp +++ b/test/CodeGenCXX/PR5050-constructor-conversion.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s struct A { A(const A&, int i1 = 1); }; @@ -11,7 +11,7 @@ A f(const B &b) { return b; } -// CHECK-LP64: call __ZN1AC1ERKS_i +// CHECK-LP64: callq __ZN1AC1ERKS_i // CHECK-LP32: call L__ZN1AC1ERKS_i diff --git a/test/CodeGenCXX/PR5093-static-member-function.cpp b/test/CodeGenCXX/PR5093-static-member-function.cpp index a27b08f6ada7a..ceab8528e8bcb 100644 --- a/test/CodeGenCXX/PR5093-static-member-function.cpp +++ b/test/CodeGenCXX/PR5093-static-member-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct a { static void f(); }; diff --git a/test/CodeGenCXX/PR5834-constructor-conversion.cpp b/test/CodeGenCXX/PR5834-constructor-conversion.cpp new file mode 100644 index 0000000000000..044d8e555d7c2 --- /dev/null +++ b/test/CodeGenCXX/PR5834-constructor-conversion.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -emit-llvm -o - %s + +// PR5834 +struct ASTMultiMover {}; +struct ASTMultiPtr { + ASTMultiPtr(); + ASTMultiPtr(ASTMultiPtr&); + ASTMultiPtr(ASTMultiMover mover); + operator ASTMultiMover(); +}; +void f1() { + extern void f0(ASTMultiPtr); + f0(ASTMultiPtr()); +} diff --git a/test/CodeGenCXX/__null.cpp b/test/CodeGenCXX/__null.cpp index 476b0ad083bc2..8a1779788395e 100644 --- a/test/CodeGenCXX/__null.cpp +++ b/test/CodeGenCXX/__null.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t int* a = __null; int b = __null; diff --git a/test/CodeGenCXX/address-of-fntemplate.cpp b/test/CodeGenCXX/address-of-fntemplate.cpp index 1f0c8f38630b8..c5fa89d86d41b 100644 --- a/test/CodeGenCXX/address-of-fntemplate.cpp +++ b/test/CodeGenCXX/address-of-fntemplate.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s template <typename T> void f(T) {} template <typename T> void f() { } diff --git a/test/CodeGenCXX/anonymous-namespaces.cpp b/test/CodeGenCXX/anonymous-namespaces.cpp index dcfd518d684b5..7689c941e1035 100644 --- a/test/CodeGenCXX/anonymous-namespaces.cpp +++ b/test/CodeGenCXX/anonymous-namespaces.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s namespace { // CHECK: @_ZN12_GLOBAL__N_11aE = internal global i32 0 diff --git a/test/CodeGenCXX/anonymous-union-member-initializer.cpp b/test/CodeGenCXX/anonymous-union-member-initializer.cpp index 2030f4053c90a..ea3eafc995532 100644 --- a/test/CodeGenCXX/anonymous-union-member-initializer.cpp +++ b/test/CodeGenCXX/anonymous-union-member-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s struct A { union { diff --git a/test/CodeGenCXX/array-construction.cpp b/test/CodeGenCXX/array-construction.cpp index 2f82872d6c9ef..ab46be72d8798 100644 --- a/test/CodeGenCXX/array-construction.cpp +++ b/test/CodeGenCXX/array-construction.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -30,7 +30,7 @@ int main() { h, i, j, array[h][i][j].i, array[h][i][j].f); } -// CHECK-LP64: call __ZN4xptoC1Ev +// CHECK-LP64: callq __ZN4xptoC1Ev // CHECK-LP32: call L__ZN4xptoC1Ev diff --git a/test/CodeGenCXX/array-operator-delete-call.cpp b/test/CodeGenCXX/array-operator-delete-call.cpp index c23d33632a38b..acb85d23b3d93 100644 --- a/test/CodeGenCXX/array-operator-delete-call.cpp +++ b/test/CodeGenCXX/array-operator-delete-call.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -57,7 +57,7 @@ int main() } COST c2; -// CHECK-LP64: call __ZdaPv +// CHECK-LP64: callq __ZdaPv // CHECK-LP32: call L__ZdaPv diff --git a/test/CodeGenCXX/array-pointer-decay.cpp b/test/CodeGenCXX/array-pointer-decay.cpp index 5751b67b74916..3fe6b72a54196 100644 --- a/test/CodeGenCXX/array-pointer-decay.cpp +++ b/test/CodeGenCXX/array-pointer-decay.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - void f(const char*); diff --git a/test/CodeGenCXX/array-value-initialize.cpp b/test/CodeGenCXX/array-value-initialize.cpp index f041bc584b129..5fe6c2022d8f0 100644 --- a/test/CodeGenCXX/array-value-initialize.cpp +++ b/test/CodeGenCXX/array-value-initialize.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // PR5463 extern "C" int printf(...); diff --git a/test/CodeGenCXX/assign-operator.cpp b/test/CodeGenCXX/assign-operator.cpp index 3e0be45194382..cb8867f2f6a3d 100644 --- a/test/CodeGenCXX/assign-operator.cpp +++ b/test/CodeGenCXX/assign-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only -verify +// RUN: %clang_cc1 %s -emit-llvm-only -verify class x { int operator=(int); diff --git a/test/CodeGenCXX/attr.cpp b/test/CodeGenCXX/attr.cpp index 695e9e72f1a1c..8fd86414862c1 100644 --- a/test/CodeGenCXX/attr.cpp +++ b/test/CodeGenCXX/attr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -O0 -S %s -o %t.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -O0 -S %s -o %t.s // RUN: FileCheck --input-file=%t.s %s int foo() __attribute__((aligned(1024))); diff --git a/test/CodeGenCXX/call-arg-zero-temp.cpp b/test/CodeGenCXX/call-arg-zero-temp.cpp index e066927ad7026..ed8118e07d929 100644 --- a/test/CodeGenCXX/call-arg-zero-temp.cpp +++ b/test/CodeGenCXX/call-arg-zero-temp.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s @@ -17,6 +17,6 @@ int main() { foo(obj()); } -// CHECK-LP64: call __Z3foo3obj +// CHECK-LP64: callq __Z3foo3obj // CHECK-LP32: call __Z3foo3obj diff --git a/test/CodeGenCXX/cast-conversion.cpp b/test/CodeGenCXX/cast-conversion.cpp index fa8487ac66b9a..6dc6de6018485 100644 --- a/test/CodeGenCXX/cast-conversion.cpp +++ b/test/CodeGenCXX/cast-conversion.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s struct A { @@ -17,12 +17,12 @@ int main () { static_cast<B>(10); } -// CHECK-LP64: call __ZN1AC1Ei -// CHECK-LP64: call __ZN1BC1E1A -// CHECK-LP64: call __ZN1AC1Ei -// CHECK-LP64: call __ZN1BC1E1A -// CHECK-LP64: call __ZN1AC1Ei -// CHECK-LP64: call __ZN1BC1E1A +// CHECK-LP64: callq __ZN1AC1Ei +// CHECK-LP64: callq __ZN1BC1E1A +// CHECK-LP64: callq __ZN1AC1Ei +// CHECK-LP64: callq __ZN1BC1E1A +// CHECK-LP64: callq __ZN1AC1Ei +// CHECK-LP64: callq __ZN1BC1E1A // CHECK-LP32: call L__ZN1AC1Ei // CHECK-LP32: call L__ZN1BC1E1A diff --git a/test/CodeGenCXX/casts.cpp b/test/CodeGenCXX/casts.cpp index 045f2d4fe031c..436b722e69d27 100644 --- a/test/CodeGenCXX/casts.cpp +++ b/test/CodeGenCXX/casts.cpp @@ -1,10 +1,12 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t // PR5248 namespace PR5248 { struct A { void copyFrom(const A &src); void addRef(void); + + A& operator=(int); }; void A::copyFrom(const A &src) { @@ -12,3 +14,7 @@ void A::copyFrom(const A &src) { } } +// reinterpret_cast to self +void test(PR5248::A* a) { + reinterpret_cast<PR5248::A&>(*a) = 17; +} diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp index d4fc627082d25..31091c5f45431 100644 --- a/test/CodeGenCXX/class-layout.cpp +++ b/test/CodeGenCXX/class-layout.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // An extra byte shoudl be allocated for an empty class. // CHECK: %struct.A = type { i8 } @@ -7,3 +7,7 @@ struct A { } a; // No need to add tail padding here. // CHECK: %struct.B = type { i8*, i32 } struct B { void *a; int b; } b; + +// C should have a vtable pointer. +// CHECK: %struct.C = type { i8**, i32 } +struct C { virtual void f(); int a; } *c; diff --git a/test/CodeGenCXX/condition.cpp b/test/CodeGenCXX/condition.cpp index a6b74efff3892..eca07d866bfce 100644 --- a/test/CodeGenCXX/condition.cpp +++ b/test/CodeGenCXX/condition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s void *f(); template <typename T> T* g() { diff --git a/test/CodeGenCXX/conditional-expr-lvalue.cpp b/test/CodeGenCXX/conditional-expr-lvalue.cpp index 7b3233a5bed07..a0843c40f071d 100644 --- a/test/CodeGenCXX/conditional-expr-lvalue.cpp +++ b/test/CodeGenCXX/conditional-expr-lvalue.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s void f(bool flag) { int a = 1; int b = 2; diff --git a/test/CodeGenCXX/conditional-temporaries.cpp b/test/CodeGenCXX/conditional-temporaries.cpp index f6c466a931350..0eac10b43cfd1 100644 --- a/test/CodeGenCXX/conditional-temporaries.cpp +++ b/test/CodeGenCXX/conditional-temporaries.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct I { int i; diff --git a/test/CodeGenCXX/const-base-cast.cpp b/test/CodeGenCXX/const-base-cast.cpp new file mode 100644 index 0000000000000..ed47069d24159 --- /dev/null +++ b/test/CodeGenCXX/const-base-cast.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -O1 -emit-llvm %s -o - | FileCheck %s + +// Check that the following construct, which is similar to one which occurs +// in Firefox, is not misfolded (folding it correctly would be a bonus, but +// that doesn't work at the moment, hence the -O1 in the runline). +struct A { char x; }; +struct B { char y; }; +struct C : A,B {}; +unsigned char x = ((char*)(B*)(C*)0x1000) - (char*)0x1000; + +// CHECK: @x = global i8 1 diff --git a/test/CodeGenCXX/const-global-linkage.cpp b/test/CodeGenCXX/const-global-linkage.cpp index f12c569d9428b..f88bc808a7c6e 100644 --- a/test/CodeGenCXX/const-global-linkage.cpp +++ b/test/CodeGenCXX/const-global-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s const int x = 10; const int y = 20; diff --git a/test/CodeGenCXX/const-init.cpp b/test/CodeGenCXX/const-init.cpp index 42da6346daf3b..874b5f64e2ba0 100644 --- a/test/CodeGenCXX/const-init.cpp +++ b/test/CodeGenCXX/const-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s // CHECK: @a = global i32 10 int a = 10; diff --git a/test/CodeGenCXX/constructor-conversion.cpp b/test/CodeGenCXX/constructor-conversion.cpp index dcc9535315ab2..f135da5e85db3 100644 --- a/test/CodeGenCXX/constructor-conversion.cpp +++ b/test/CodeGenCXX/constructor-conversion.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -45,9 +45,9 @@ int main() { g(3); // g(X(3)) } -// CHECK-LP64: call __ZN1XC1Ei -// CHECK-LP64: call __ZN1XC1EPKci -// CHECK-LP64: call __ZN1XC1Ev +// CHECK-LP64: callq __ZN1XC1Ei +// CHECK-LP64: callq __ZN1XC1EPKci +// CHECK-LP64: callq __ZN1XC1Ev // CHECK-LP32: call L__ZN1XC1Ei // CHECK-LP32: call L__ZN1XC1EPKci diff --git a/test/CodeGenCXX/constructor-convert.cpp b/test/CodeGenCXX/constructor-convert.cpp index 6fa6d556dc502..7de07724bf17f 100644 --- a/test/CodeGenCXX/constructor-convert.cpp +++ b/test/CodeGenCXX/constructor-convert.cpp @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o - %s +// RUN: %clang -emit-llvm -S -o - %s // PR5775 class Twine { diff --git a/test/CodeGenCXX/constructor-default-arg.cpp b/test/CodeGenCXX/constructor-default-arg.cpp index c494149d11105..ec0b8da69b3de 100644 --- a/test/CodeGenCXX/constructor-default-arg.cpp +++ b/test/CodeGenCXX/constructor-default-arg.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -30,9 +30,9 @@ int main() { X d(a, 5, 6); } -// CHECK-LP64: call __ZN1XC1ERKS_iii -// CHECK-LP64: call __ZN1XC1ERKS_iii -// CHECK-LP64: call __ZN1XC1ERKS_iii +// CHECK-LP64: callq __ZN1XC1ERKS_iii +// CHECK-LP64: callq __ZN1XC1ERKS_iii +// CHECK-LP64: callq __ZN1XC1ERKS_iii // CHECK-LP32: call L__ZN1XC1ERKS_iii // CHECK-LP32: call L__ZN1XC1ERKS_iii diff --git a/test/CodeGenCXX/constructor-for-array-members.cpp b/test/CodeGenCXX/constructor-for-array-members.cpp index 5160a89754889..b981da4973641 100644 --- a/test/CodeGenCXX/constructor-for-array-members.cpp +++ b/test/CodeGenCXX/constructor-for-array-members.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -38,6 +38,6 @@ int main() { m1.pr(); } -// CHECK-LP64: call __ZN1SC1Ev +// CHECK-LP64: callq __ZN1SC1Ev // CHECK-LP32: call L__ZN1SC1Ev diff --git a/test/CodeGenCXX/constructor-init-reference.cpp b/test/CodeGenCXX/constructor-init-reference.cpp index 040441fde0f82..c2f41e1f0cbf3 100644 --- a/test/CodeGenCXX/constructor-init-reference.cpp +++ b/test/CodeGenCXX/constructor-init-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | grep "store i32\* @x, i32\*\*" +// RUN: %clang_cc1 -emit-llvm -o - %s | grep "store i32\* @x, i32\*\*" int x; class A { diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp index 1b025126a3454..a0a35fa16f1bd 100644 --- a/test/CodeGenCXX/constructor-init.cpp +++ b/test/CodeGenCXX/constructor-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -emit-llvm -o - | FileCheck %s extern "C" int printf(...); @@ -59,3 +59,24 @@ int main() { n1.PR(); } +// PR5826 +template <class T> struct A { + A() {} + A(int) {} + A(const A&) {} + ~A() {} + operator int() {return 0;} +}; + +// CHECK: define void @_Z1fv() +void f() { + // CHECK: call void @_ZN1AIsEC1Ei + A<short> a4 = 97; + + // CHECK-NEXT: store i32 17 + int i = 17; + + // CHECK-NEXT: call void @_ZN1AIsED1Ev + // CHECK-NOT: call void @_ZN1AIsED1Ev + // CHECK: ret void +} diff --git a/test/CodeGenCXX/constructor-template.cpp b/test/CodeGenCXX/constructor-template.cpp index 1142aac30e24b..a3576fdc72fe9 100644 --- a/test/CodeGenCXX/constructor-template.cpp +++ b/test/CodeGenCXX/constructor-template.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s // PR4826 diff --git a/test/CodeGenCXX/conversion-function.cpp b/test/CodeGenCXX/conversion-function.cpp index c93587675ba1e..fccb6f094e078 100644 --- a/test/CodeGenCXX/conversion-function.cpp +++ b/test/CodeGenCXX/conversion-function.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -12,6 +12,9 @@ S::operator int() { return 10; } +int f(S s) { + return s; +} class X { // ... public: operator int() { printf("operator int()\n"); return iX; } @@ -94,15 +97,18 @@ void f(Yb& a) { char ch = a; // OK. calls Yb::operator char(); } +struct A { + operator int() const; +}; // CHECK-LP64: .globl __ZN1ScviEv // CHECK-LP64-NEXT: __ZN1ScviEv: -// CHECK-LP64: call __ZN1Ycv1ZEv -// CHECK-LP64: call __ZN1Zcv1XEv -// CHECK-LP64: call __ZN1XcviEv -// CHECK-LP64: call __ZN1XcvfEv -// CHECK-LP64: call __ZN2XBcviEv -// CHECK-LP64: call __ZN2YbcvcEv +// CHECK-LP64: callq __ZN1Ycv1ZEv +// CHECK-LP64: callq __ZN1Zcv1XEv +// CHECK-LP64: callq __ZN1XcviEv +// CHECK-LP64: callq __ZN1XcvfEv +// CHECK-LP64: callq __ZN2XBcviEv +// CHECK-LP64: callq __ZN2YbcvcEv // CHECK-LP32: .globl __ZN1ScviEv // CHECK-LP32-NEXT: __ZN1ScviEv: diff --git a/test/CodeGenCXX/conversion-operator-base.cpp b/test/CodeGenCXX/conversion-operator-base.cpp index 49796d08a87f6..8fbeadf14916a 100644 --- a/test/CodeGenCXX/conversion-operator-base.cpp +++ b/test/CodeGenCXX/conversion-operator-base.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s -verify +// RUN: %clang_cc1 -emit-llvm-only %s -verify // PR5730 struct A { operator int(); float y; }; diff --git a/test/CodeGenCXX/convert-to-fptr.cpp b/test/CodeGenCXX/convert-to-fptr.cpp index 7cc8c08444aa9..dc49401af9295 100644 --- a/test/CodeGenCXX/convert-to-fptr.cpp +++ b/test/CodeGenCXX/convert-to-fptr.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -38,8 +38,8 @@ int main() return 0; } -// CHECK-LP64: call __ZN1AcvPFiiEEv -// CHECK-LP64: call __ZN1BcvRFiiEEv +// CHECK-LP64: callq __ZN1AcvPFiiEEv +// CHECK-LP64: callq __ZN1BcvRFiiEEv // CHECK-LP32: call L__ZN1AcvPFiiEEv // CHECK-LP32: call L__ZN1BcvRFiiEEv diff --git a/test/CodeGenCXX/copy-assign-synthesis-1.cpp b/test/CodeGenCXX/copy-assign-synthesis-1.cpp index 14fbe30703d30..eb761c27367d5 100644 --- a/test/CodeGenCXX/copy-assign-synthesis-1.cpp +++ b/test/CodeGenCXX/copy-assign-synthesis-1.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); diff --git a/test/CodeGenCXX/copy-assign-synthesis-2.cpp b/test/CodeGenCXX/copy-assign-synthesis-2.cpp index 60d52f57de98d..c25e0467fad5b 100644 --- a/test/CodeGenCXX/copy-assign-synthesis-2.cpp +++ b/test/CodeGenCXX/copy-assign-synthesis-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s struct A {}; A& (A::*x)(const A&) = &A::operator=; // CHECK: define linkonce_odr %struct.A* @_ZN1AaSERKS_ diff --git a/test/CodeGenCXX/copy-assign-synthesis-3.cpp b/test/CodeGenCXX/copy-assign-synthesis-3.cpp index 3dab0f2a81b35..0c876d02ec569 100644 --- a/test/CodeGenCXX/copy-assign-synthesis-3.cpp +++ b/test/CodeGenCXX/copy-assign-synthesis-3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s struct A { A& operator=(const A&); diff --git a/test/CodeGenCXX/copy-assign-synthesis.cpp b/test/CodeGenCXX/copy-assign-synthesis.cpp index 65a84f414a931..e9fc0c337c105 100644 --- a/test/CodeGenCXX/copy-assign-synthesis.cpp +++ b/test/CodeGenCXX/copy-assign-synthesis.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep "_ZN1XaSERK1X" %t | count 0 extern "C" int printf(...); diff --git a/test/CodeGenCXX/copy-constructor-elim-2.cpp b/test/CodeGenCXX/copy-constructor-elim-2.cpp new file mode 100644 index 0000000000000..3a06c10ff1862 --- /dev/null +++ b/test/CodeGenCXX/copy-constructor-elim-2.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s + +struct A { int x; A(int); ~A(); }; +A f() { return A(0); } +// CHECK: define void @_Z1fv +// CHECK: call void @_ZN1AC1Ei +// CHECK-NEXT: ret void diff --git a/test/CodeGenCXX/copy-constructor-elim.cpp b/test/CodeGenCXX/copy-constructor-elim.cpp index 953effe77af18..c883584fe02f3 100644 --- a/test/CodeGenCXX/copy-constructor-elim.cpp +++ b/test/CodeGenCXX/copy-constructor-elim.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep "_ZN1CC1ERK1C" %t | count 0 // RUN: grep "_ZN1SC1ERK1S" %t | count 0 diff --git a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp index b4add46db85a8..2f7c79b903033 100644 --- a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp +++ b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s struct A { virtual void a(); }; A x(A& y) { return y; } diff --git a/test/CodeGenCXX/copy-constructor-synthesis.cpp b/test/CodeGenCXX/copy-constructor-synthesis.cpp index 2e950eb9e9b2f..ae8eefa7fe40d 100644 --- a/test/CodeGenCXX/copy-constructor-synthesis.cpp +++ b/test/CodeGenCXX/copy-constructor-synthesis.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); diff --git a/test/CodeGenCXX/debug-info.cpp b/test/CodeGenCXX/debug-info.cpp index c5e3c79b0aabe..705491e3a9b4e 100644 --- a/test/CodeGenCXX/debug-info.cpp +++ b/test/CodeGenCXX/debug-info.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -g +// RUN: %clang_cc1 -emit-llvm-only -g template<typename T> struct Identity { typedef T Type; }; diff --git a/test/CodeGenCXX/decl-ref-init.cpp b/test/CodeGenCXX/decl-ref-init.cpp index fd93b7b21e047..c215b1b9be679 100644 --- a/test/CodeGenCXX/decl-ref-init.cpp +++ b/test/CodeGenCXX/decl-ref-init.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s struct A {}; @@ -23,8 +23,8 @@ int main() { const A& rca2 = d(); } -// CHECK-LP64: call __ZN1BcvR1AEv -// CHECK-LP64: call __ZN1BcvR1AEv +// CHECK-LP64: callq __ZN1BcvR1AEv +// CHECK-LP64: callq __ZN1BcvR1AEv // CHECK-LP32: call L__ZN1BcvR1AEv // CHECK-LP32: call L__ZN1BcvR1AEv diff --git a/test/CodeGenCXX/default-arg-temps.cpp b/test/CodeGenCXX/default-arg-temps.cpp index 0ec5b582c95ba..e523eb0cfd233 100644 --- a/test/CodeGenCXX/default-arg-temps.cpp +++ b/test/CodeGenCXX/default-arg-temps.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 struct T { T(); diff --git a/test/CodeGenCXX/default-arguments.cpp b/test/CodeGenCXX/default-arguments.cpp index 71d4baa47566b..282e5d0d50422 100644 --- a/test/CodeGenCXX/default-arguments.cpp +++ b/test/CodeGenCXX/default-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // PR5484 namespace PR5484 { diff --git a/test/CodeGenCXX/default-constructor-default-argument.cpp b/test/CodeGenCXX/default-constructor-default-argument.cpp index f53732e471fef..971757d241b44 100644 --- a/test/CodeGenCXX/default-constructor-default-argument.cpp +++ b/test/CodeGenCXX/default-constructor-default-argument.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Check that call to constructor for struct A is generated correctly. struct A { A(int x = 2); }; diff --git a/test/CodeGenCXX/default-constructor-for-members.cpp b/test/CodeGenCXX/default-constructor-for-members.cpp index d972d63d3cbcb..1f177460236c4 100644 --- a/test/CodeGenCXX/default-constructor-for-members.cpp +++ b/test/CodeGenCXX/default-constructor-for-members.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -18,6 +18,6 @@ int main() { M m1; } -// CHECK-LP64: call __ZN1SC1Ev +// CHECK-LP64: callq __ZN1SC1Ev // CHECK-LP32: call L__ZN1SC1Ev diff --git a/test/CodeGenCXX/default-constructor-template-member.cpp b/test/CodeGenCXX/default-constructor-template-member.cpp index e0a17e0e4f71f..e74fb6da69a6f 100644 --- a/test/CodeGenCXX/default-constructor-template-member.cpp +++ b/test/CodeGenCXX/default-constructor-template-member.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s template <class T> struct A { A(); }; struct B { A<int> x; }; diff --git a/test/CodeGenCXX/default-destructor-synthesis.cpp b/test/CodeGenCXX/default-destructor-synthesis.cpp index fef9c03d7ac12..098458d35d5c6 100644 --- a/test/CodeGenCXX/default-destructor-synthesis.cpp +++ b/test/CodeGenCXX/default-destructor-synthesis.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -O0 -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -O0 -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 -input-file=%t-32.s %s extern "C" int printf(...); @@ -45,8 +45,8 @@ M gm; int main() {M m1;} -// CHECK-LP64: call __ZN1MC1Ev -// CHECK-LP64: call __ZN1MD1Ev +// CHECK-LP64: callq __ZN1MC1Ev +// CHECK-LP64: callq __ZN1MD1Ev // CHECK-LP64: .globl __ZN1MD1Ev // CHECK-LP64-NEXT: .weak_definition __ZN1MD1Ev // CHECK-LP64-NEXT: __ZN1MD1Ev: diff --git a/test/CodeGenCXX/delete-two-arg.cpp b/test/CodeGenCXX/delete-two-arg.cpp index a5b18ba06fc35..d6bdb098844f3 100644 --- a/test/CodeGenCXX/delete-two-arg.cpp +++ b/test/CodeGenCXX/delete-two-arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s +// RUN: %clang_cc1 -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s struct A { void operator delete(void*,__typeof(sizeof(int))); int x; }; void a(A* x) { delete x; } diff --git a/test/CodeGenCXX/delete.cpp b/test/CodeGenCXX/delete.cpp index 78c83cf0df62f..7cc264f5c5f5e 100644 --- a/test/CodeGenCXX/delete.cpp +++ b/test/CodeGenCXX/delete.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t void t1(int *a) { delete a; diff --git a/test/CodeGenCXX/derived-to-base-conv.cpp b/test/CodeGenCXX/derived-to-base-conv.cpp index 70948b0ff933c..c1a0caa7584f5 100644 --- a/test/CodeGenCXX/derived-to-base-conv.cpp +++ b/test/CodeGenCXX/derived-to-base-conv.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s extern "C" int printf(...); @@ -65,12 +65,12 @@ void foo(Base) {} void test(Derived bb) { - // CHECK-LP64-NOT: call __ZN4BasecvR7DerivedEv - // CHECK-LP32-NOT: call L__ZN4BasecvR7DerivedEv + // CHECK-LP64-NOT: callq __ZN4BasecvR7DerivedEv + // CHECK-LP32-NOT: callq L__ZN4BasecvR7DerivedEv foo(bb); } -// CHECK-LP64: call __ZN1XcvR1BEv -// CHECK-LP64: call __ZN1AC1ERKS_ +// CHECK-LP64: callq __ZN1XcvR1BEv +// CHECK-LP64: callq __ZN1AC1ERKS_ // CHECK-LP32: call L__ZN1XcvR1BEv // CHECK-LP32: call L__ZN1AC1ERKS_ diff --git a/test/CodeGenCXX/derived-to-base.cpp b/test/CodeGenCXX/derived-to-base.cpp index 63492d604d17b..45728b7c01226 100644 --- a/test/CodeGenCXX/derived-to-base.cpp +++ b/test/CodeGenCXX/derived-to-base.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - +// RUN: %clang_cc1 -emit-llvm %s -o - struct A { void f(); diff --git a/test/CodeGenCXX/destructor-calls.cpp b/test/CodeGenCXX/destructor-calls.cpp index 3f0288b85c14f..4da46a4358a6f 100644 --- a/test/CodeGenCXX/destructor-calls.cpp +++ b/test/CodeGenCXX/destructor-calls.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t extern "C" int printf(...); diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp index a196c13f8f420..0a7e1e5505ede 100644 --- a/test/CodeGenCXX/destructors.cpp +++ b/test/CodeGenCXX/destructors.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - +// RUN: %clang_cc1 %s -emit-llvm -o - struct A { int a; diff --git a/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp b/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp index cbf55ad613318..74795b5dfb0ef 100644 --- a/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp +++ b/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct A { virtual void f(); diff --git a/test/CodeGenCXX/dynamic-cast.cpp b/test/CodeGenCXX/dynamic-cast.cpp new file mode 100644 index 0000000000000..aeb2a64157b4e --- /dev/null +++ b/test/CodeGenCXX/dynamic-cast.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -emit-llvm-only + +struct A { virtual void f(); }; +struct B : A { }; + +const B& f(A *a) { + return dynamic_cast<const B&>(*a); +} diff --git a/test/CodeGenCXX/dyncast.cpp b/test/CodeGenCXX/dyncast.cpp index 0f78fb0deb60a..a2d116a898726 100644 --- a/test/CodeGenCXX/dyncast.cpp +++ b/test/CodeGenCXX/dyncast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -I%S -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll +// RUN: %clang_cc1 -I%S -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll // RUN: FileCheck -check-prefix LL --input-file=%t.ll %s #include <typeinfo> @@ -97,7 +97,7 @@ void test1() { // CHECK-LL-NEXT: br i1 %4, label %5, label %9 // CHECK-LL: ; <label>:5 // CHECK-LL-NEXT: %6 = bitcast %class.test1_A* %tmp to i8* -// CHECK-LL-NEXT: %7 = call i8* @__dynamic_cast(i8* %6, i8* bitcast ({{.*}} @_ZTI7test1_B to i8*), i8* bitcast (i8** @_ZTI7test1_D to i8*), i64 -1) +// CHECK-LL-NEXT: %7 = call i8* @__dynamic_cast(i8* %6, i8* bitcast (%0* @_ZTI7test1_B to i8*), i8* bitcast (%1* @_ZTI7test1_D to i8*), i64 -1) ; <i8*> [#uses=1] // CHECK-LL-NEXT: %8 = bitcast i8* %7 to %class.test1_D* // CHECK-LL-NEXT: br label %10 // CHECK-LL: ; <label>:9 diff --git a/test/CodeGenCXX/eh.cpp b/test/CodeGenCXX/eh.cpp index 5570fb44c24c3..dd798f4ca32ec 100644 --- a/test/CodeGenCXX/eh.cpp +++ b/test/CodeGenCXX/eh.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll // RUN: FileCheck --input-file=%t.ll %s struct test1_D { diff --git a/test/CodeGenCXX/elide-call-reference.cpp b/test/CodeGenCXX/elide-call-reference.cpp index 863e69c9cc022..c82eee70c8405 100644 --- a/test/CodeGenCXX/elide-call-reference.cpp +++ b/test/CodeGenCXX/elide-call-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // PR5695 struct A { A(const A&); ~A(); }; diff --git a/test/CodeGenCXX/empty-union.cpp b/test/CodeGenCXX/empty-union.cpp index fdd97415a2037..118a0d29b47dd 100644 --- a/test/CodeGenCXX/empty-union.cpp +++ b/test/CodeGenCXX/empty-union.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s union sigval { }; diff --git a/test/CodeGenCXX/enum.cpp b/test/CodeGenCXX/enum.cpp index 6ce04a3a532b9..cfcd264bd347a 100644 --- a/test/CodeGenCXX/enum.cpp +++ b/test/CodeGenCXX/enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s enum A { a } __attribute((packed)); int func(A x) { return x==a; } diff --git a/test/CodeGenCXX/eval-recursive-constant.cpp b/test/CodeGenCXX/eval-recursive-constant.cpp index b60070fa1f4ee..608c95d828ed7 100644 --- a/test/CodeGenCXX/eval-recursive-constant.cpp +++ b/test/CodeGenCXX/eval-recursive-constant.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only +// RUN: %clang_cc1 %s -emit-llvm-only extern const int a,b; const int a=b,b=a; diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp index 396ff441ef9ac..4d8fb809ab9c0 100644 --- a/test/CodeGenCXX/exceptions.cpp +++ b/test/CodeGenCXX/exceptions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fexceptions +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fexceptions struct allocator { allocator(); diff --git a/test/CodeGenCXX/explicit-instantiation.cpp b/test/CodeGenCXX/explicit-instantiation.cpp index b33ba85cf6606..ab9174e8f406d 100644 --- a/test/CodeGenCXX/explicit-instantiation.cpp +++ b/test/CodeGenCXX/explicit-instantiation.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -triple i686-pc-linux-gnu -o %t %s +// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o %t %s // RUN: grep "define i32 @_ZNK4plusIillEclERKiRKl" %t | count 1 template<typename T, typename U, typename Result> diff --git a/test/CodeGenCXX/expr.cpp b/test/CodeGenCXX/expr.cpp index 4dc97c47aa265..6d641dcb622db 100644 --- a/test/CodeGenCXX/expr.cpp +++ b/test/CodeGenCXX/expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -x c++ < %s +// RUN: %clang_cc1 -emit-llvm -x c++ < %s void test0(int x) { if (x != 0) return; diff --git a/test/CodeGenCXX/extern-c.cpp b/test/CodeGenCXX/extern-c.cpp index 3af8f3adb54f6..427a45aebb1ec 100644 --- a/test/CodeGenCXX/extern-c.cpp +++ b/test/CodeGenCXX/extern-c.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t namespace foo { // RUN: not grep "@a = global i32" %t diff --git a/test/CodeGenCXX/function-template-explicit-specialization.cpp b/test/CodeGenCXX/function-template-explicit-specialization.cpp index 046bc325a5d94..21f0127ab4898 100644 --- a/test/CodeGenCXX/function-template-explicit-specialization.cpp +++ b/test/CodeGenCXX/function-template-explicit-specialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s template<typename T> void a(T); template<> void a(int) {} diff --git a/test/CodeGenCXX/function-template-specialization.cpp b/test/CodeGenCXX/function-template-specialization.cpp index 677be4cc0f9a9..4a79fb1d6747b 100644 --- a/test/CodeGenCXX/function-template-specialization.cpp +++ b/test/CodeGenCXX/function-template-specialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s template<typename T, typename U> T* next(T* ptr, const U& diff); diff --git a/test/CodeGenCXX/global-array-destruction.cpp b/test/CodeGenCXX/global-array-destruction.cpp index ebea9c156e279..c77551cb32d1f 100644 --- a/test/CodeGenCXX/global-array-destruction.cpp +++ b/test/CodeGenCXX/global-array-destruction.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s extern "C" int printf(...); @@ -23,11 +23,11 @@ static S sarr1[4]; S s2; S arr3[3]; -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit -// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit +// CHECK-LP64: callq ___cxa_atexit diff --git a/test/CodeGenCXX/global-init.cpp b/test/CodeGenCXX/global-init.cpp index ae450e17e85eb..b375aef4c8e0a 100644 --- a/test/CodeGenCXX/global-init.cpp +++ b/test/CodeGenCXX/global-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple=x86_64-apple-darwin10 -emit-llvm %s -o - |FileCheck %s +// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - |FileCheck %s struct A { A(); diff --git a/test/CodeGenCXX/global-llvm-constant.cpp b/test/CodeGenCXX/global-llvm-constant.cpp index bd4319667e8f0..e799231ab7446 100644 --- a/test/CodeGenCXX/global-llvm-constant.cpp +++ b/test/CodeGenCXX/global-llvm-constant.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s struct A { A() { x = 10; } diff --git a/test/CodeGenCXX/implicit-instantiation-1.cpp b/test/CodeGenCXX/implicit-instantiation-1.cpp index cc86ef4cb5025..0c826e4b20d12 100644 --- a/test/CodeGenCXX/implicit-instantiation-1.cpp +++ b/test/CodeGenCXX/implicit-instantiation-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t template<typename T> struct X { diff --git a/test/CodeGenCXX/init-incomplete-type.cpp b/test/CodeGenCXX/init-incomplete-type.cpp index 402b86ea8cb47..3312d3e04b715 100644 --- a/test/CodeGenCXX/init-incomplete-type.cpp +++ b/test/CodeGenCXX/init-incomplete-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only -verify +// RUN: %clang_cc1 %s -emit-llvm-only -verify // PR5489 template<typename E> diff --git a/test/CodeGenCXX/inline-functions.cpp b/test/CodeGenCXX/inline-functions.cpp index 9af4c6e5bec77..8d046a2f4a9b5 100644 --- a/test/CodeGenCXX/inline-functions.cpp +++ b/test/CodeGenCXX/inline-functions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // CHECK: ; ModuleID struct A { diff --git a/test/CodeGenCXX/instantiate-init-list.cpp b/test/CodeGenCXX/instantiate-init-list.cpp index 7d5458af1f55e..676d2994e7ed4 100644 --- a/test/CodeGenCXX/instantiate-init-list.cpp +++ b/test/CodeGenCXX/instantiate-init-list.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only -verify +// RUN: %clang_cc1 %s -emit-llvm-only -verify struct F { void (*x)(); diff --git a/test/CodeGenCXX/key-function-vtable.cpp b/test/CodeGenCXX/key-function-vtable.cpp index e61f33a4cfc3a..251a14e28f2a6 100644 --- a/test/CodeGenCXX/key-function-vtable.cpp +++ b/test/CodeGenCXX/key-function-vtable.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // Simple key function test struct testa { virtual void a(); }; diff --git a/test/CodeGenCXX/mangle-extern-local.cpp b/test/CodeGenCXX/mangle-extern-local.cpp index 7c25859a9a6cd..ed91da4e2e37a 100644 --- a/test/CodeGenCXX/mangle-extern-local.cpp +++ b/test/CodeGenCXX/mangle-extern-local.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // CHECK: @var1 = external global i32 // CHECK: @_ZN1N4var2E = external global i32 diff --git a/test/CodeGenCXX/mangle-extreme.cpp b/test/CodeGenCXX/mangle-extreme.cpp index 77558d29d824f..ef2d466e416cc 100644 --- a/test/CodeGenCXX/mangle-extreme.cpp +++ b/test/CodeGenCXX/mangle-extreme.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct X { }; diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp index a2994c4abf238..913c8f101b54d 100644 --- a/test/CodeGenCXX/mangle-subst-std.cpp +++ b/test/CodeGenCXX/mangle-subst-std.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s namespace std { struct A { A(); }; diff --git a/test/CodeGenCXX/mangle-subst.cpp b/test/CodeGenCXX/mangle-subst.cpp index a940f4f447b6d..bd06869ff7f97 100644 --- a/test/CodeGenCXX/mangle-subst.cpp +++ b/test/CodeGenCXX/mangle-subst.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct X {}; diff --git a/test/CodeGenCXX/mangle-system-header.cpp b/test/CodeGenCXX/mangle-system-header.cpp index 8c642bd075331..cb68bc197600a 100644 --- a/test/CodeGenCXX/mangle-system-header.cpp +++ b/test/CodeGenCXX/mangle-system-header.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s // PR5420 diff --git a/test/CodeGenCXX/mangle-template.cpp b/test/CodeGenCXX/mangle-template.cpp index 32ce33da952cd..c8296f3c4bd7a 100644 --- a/test/CodeGenCXX/mangle-template.cpp +++ b/test/CodeGenCXX/mangle-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s namespace test1 { int x; diff --git a/test/CodeGenCXX/mangle-unnamed.cpp b/test/CodeGenCXX/mangle-unnamed.cpp index 66c81e5932254..4aec7dbf4a76f 100644 --- a/test/CodeGenCXX/mangle-unnamed.cpp +++ b/test/CodeGenCXX/mangle-unnamed.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s struct S { virtual ~S() { } diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 62d8c6cc1e48a..e8770dfec3e8e 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks | FileCheck %s struct X { }; struct Y { }; @@ -141,7 +141,7 @@ int f(struct a *x) { // PR5017 extern "C" { struct Debug { - const Debug& operator<< (unsigned a) const { } + const Debug& operator<< (unsigned a) const { return *this; } }; Debug dbg; // CHECK: @_ZNK5DebuglsEj @@ -229,6 +229,22 @@ template void ft8<int>(); // CHECK: @_Z3ft8IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv template void ft8<void*>(); +// PR5796 +namespace PR5796 { +template<typename> struct __is_scalar { + enum { __value = 0 }; +}; + +template<bool, typename> struct __enable_if {}; +template<typename T> struct __enable_if<true, T> { typedef T __type; }; +template<typename T> + +// CHECK: define linkonce_odr void @_ZN6PR57968__fill_aIiEENS_11__enable_ifIXntsrNS_11__is_scalarIT_EE7__valueEvE6__typeEv +typename __enable_if<!__is_scalar<T>::__value, void>::__type __fill_a() { }; + +void f() { __fill_a<int>(); } +} + namespace Expressions { // Unary operators. @@ -254,5 +270,42 @@ template void f4<1>(int (*)[4]); // CHECK: define void @_ZN11Expressions2f4ILb1EEEvPAquT_Li1ELi2E_i template <bool b> void f4(int (*)[b ? 1 : 2]) { }; template void f4<true>(int (*)[1]); +} + +struct Ops { + Ops& operator+(const Ops&); + Ops& operator-(const Ops&); + Ops& operator&(const Ops&); + Ops& operator*(const Ops&); + + void *v; +}; +// CHECK: define %struct.Ops* @_ZN3OpsplERKS_ +Ops& Ops::operator+(const Ops&) { return *this; } +// CHECK: define %struct.Ops* @_ZN3OpsmiERKS_ +Ops& Ops::operator-(const Ops&) { return *this; } +// CHECK: define %struct.Ops* @_ZN3OpsanERKS_ +Ops& Ops::operator&(const Ops&) { return *this; } +// CHECK: define %struct.Ops* @_ZN3OpsmlERKS_ +Ops& Ops::operator*(const Ops&) { return *this; } + +// PR5861 +namespace PR5861 { +template<bool> class P; +template<> class P<true> {}; + +template<template <bool> class, bool> +struct Policy { }; + +template<typename T, typename = Policy<P, true> > class Alloc +{ + T *allocate(int, const void*) { return 0; } +}; + +// CHECK: define i8* @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv +template class Alloc<char>; } + +// CHECK: define void @_Z1fU13block_pointerFiiiE +void f(int (^)(int, int)) { }
\ No newline at end of file diff --git a/test/CodeGenCXX/member-call-parens.cpp b/test/CodeGenCXX/member-call-parens.cpp index 0b808e0444599..2054137fe9411 100644 --- a/test/CodeGenCXX/member-call-parens.cpp +++ b/test/CodeGenCXX/member-call-parens.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s struct A { int a(); }; typedef int B; diff --git a/test/CodeGenCXX/member-expressions.cpp b/test/CodeGenCXX/member-expressions.cpp index a38d5f9eaa2cf..720a9a70d07bb 100644 --- a/test/CodeGenCXX/member-expressions.cpp +++ b/test/CodeGenCXX/member-expressions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s // PR5392 namespace PR5392 { diff --git a/test/CodeGenCXX/member-function-pointers.cpp b/test/CodeGenCXX/member-function-pointers.cpp index 491ca5345afad..149b5603ad7ce 100644 --- a/test/CodeGenCXX/member-function-pointers.cpp +++ b/test/CodeGenCXX/member-function-pointers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct A { int a; void f(); virtual void vf(); }; struct B { int b; virtual void g(); }; diff --git a/test/CodeGenCXX/member-functions.cpp b/test/CodeGenCXX/member-functions.cpp index 0dfaedff931c7..087e62c5bb370 100644 --- a/test/CodeGenCXX/member-functions.cpp +++ b/test/CodeGenCXX/member-functions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -triple x86_64-apple-darwin9 -o %t +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-apple-darwin9 -o %t struct C { void f(); void g(int, ...); @@ -58,6 +58,6 @@ struct T { void test3() { T t1, t2; - // RUN: grep "call void @_ZN1TpsERKS_" %t + // RUN: grep "call i64 @_ZN1TplERKS_" %t T result = t1 + t2; } diff --git a/test/CodeGenCXX/member-init-struct.cpp b/test/CodeGenCXX/member-init-struct.cpp index 9c0c3919794ea..688d92d74b8ea 100644 --- a/test/CodeGenCXX/member-init-struct.cpp +++ b/test/CodeGenCXX/member-init-struct.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only -verify +// RUN: %clang_cc1 %s -emit-llvm-only -verify struct A {int a;}; struct B {float a;}; diff --git a/test/CodeGenCXX/member-init-union.cpp b/test/CodeGenCXX/member-init-union.cpp index 334d5fd1f1c49..2c50e18b6ffa8 100644 --- a/test/CodeGenCXX/member-init-union.cpp +++ b/test/CodeGenCXX/member-init-union.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only -verify +// RUN: %clang_cc1 %s -emit-llvm-only -verify union x { int a; diff --git a/test/CodeGenCXX/member-pointer-cast.cpp b/test/CodeGenCXX/member-pointer-cast.cpp index 794996881e2fc..4937b037de536 100644 --- a/test/CodeGenCXX/member-pointer-cast.cpp +++ b/test/CodeGenCXX/member-pointer-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct A { int a; }; struct B { int b; }; diff --git a/test/CodeGenCXX/member-pointer-type-convert.cpp b/test/CodeGenCXX/member-pointer-type-convert.cpp index 290daf2b4f12c..16c14692f66dc 100644 --- a/test/CodeGenCXX/member-pointer-type-convert.cpp +++ b/test/CodeGenCXX/member-pointer-type-convert.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s struct A; typedef int A::*param_t; diff --git a/test/CodeGenCXX/member-pointers-zero-init.cpp b/test/CodeGenCXX/member-pointers-zero-init.cpp index caf31bd0621ac..18a2ead1ede55 100644 --- a/test/CodeGenCXX/member-pointers-zero-init.cpp +++ b/test/CodeGenCXX/member-pointers-zero-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 struct A { int i; diff --git a/test/CodeGenCXX/member-templates.cpp b/test/CodeGenCXX/member-templates.cpp index c8494c42cef9e..355ba20e171f6 100644 --- a/test/CodeGenCXX/member-templates.cpp +++ b/test/CodeGenCXX/member-templates.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // CHECK: ; ModuleID struct A { diff --git a/test/CodeGenCXX/namespace-aliases.cpp b/test/CodeGenCXX/namespace-aliases.cpp index 5baea8791ef99..74b8ebab4a54d 100644 --- a/test/CodeGenCXX/namespace-aliases.cpp +++ b/test/CodeGenCXX/namespace-aliases.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s namespace A { } namespace B = A; diff --git a/test/CodeGenCXX/nested-base-member-access.cpp b/test/CodeGenCXX/nested-base-member-access.cpp index 308f952c6dc23..f1c7dd9a867e5 100644 --- a/test/CodeGenCXX/nested-base-member-access.cpp +++ b/test/CodeGenCXX/nested-base-member-access.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o %t extern "C" int printf(...); diff --git a/test/CodeGenCXX/new-operator-phi.cpp b/test/CodeGenCXX/new-operator-phi.cpp index a5eed28ccf951..38467ad31f9bc 100644 --- a/test/CodeGenCXX/new-operator-phi.cpp +++ b/test/CodeGenCXX/new-operator-phi.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s // PR5454 #include <stddef.h> diff --git a/test/CodeGenCXX/new-with-default-arg.cpp b/test/CodeGenCXX/new-with-default-arg.cpp index b73b7f0865ec3..248cc9e0b9309 100644 --- a/test/CodeGenCXX/new-with-default-arg.cpp +++ b/test/CodeGenCXX/new-with-default-arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // pr5547 struct A { diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp index 13f26b253cd98..6ea12eb5f6bad 100644 --- a/test/CodeGenCXX/new.cpp +++ b/test/CodeGenCXX/new.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s #include <stddef.h> void t1() { @@ -90,3 +90,9 @@ A* t10() { return new(1, 2, 3.45, 100) A; } +struct B { }; +void t11() { + // CHECK: call noalias i8* @_Znwm + // CHECK: call void @llvm.memset.i64( + B* b = new B(); +} diff --git a/test/CodeGenCXX/nullptr.cpp b/test/CodeGenCXX/nullptr.cpp index 7bc52ad5210a6..31bd47522ed44 100644 --- a/test/CodeGenCXX/nullptr.cpp +++ b/test/CodeGenCXX/nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -std=c++0x %s -emit-llvm -o %t +// RUN: %clang_cc1 -std=c++0x %s -emit-llvm -o %t int* a = nullptr; diff --git a/test/CodeGenCXX/operator-new.cpp b/test/CodeGenCXX/operator-new.cpp new file mode 100644 index 0000000000000..da64fc1b2d4e0 --- /dev/null +++ b/test/CodeGenCXX/operator-new.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o %t-1.ll %s +// RUN: FileCheck -check-prefix SANE --input-file=%t-1.ll %s +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -fno-assume-sane-operator-new -o %t-2.ll %s +// RUN: FileCheck -check-prefix SANENOT --input-file=%t-2.ll %s + + +class teste { + int A; + teste() : A(2) {} +}; + +void f1() { + // CHECK-SANE: declare noalias i8* @_Znwj( + // CHECK-SANENOT: declare i8* @_Znwj( + new teste(); +} diff --git a/test/CodeGenCXX/overload-binop-implicitconvert.cpp b/test/CodeGenCXX/overload-binop-implicitconvert.cpp index f17a4585e69f6..0eb7a0609612c 100644 --- a/test/CodeGenCXX/overload-binop-implicitconvert.cpp +++ b/test/CodeGenCXX/overload-binop-implicitconvert.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only +// RUN: %clang_cc1 %s -emit-llvm-only class T {}; diff --git a/test/CodeGenCXX/predefined-expr-sizeof.cpp b/test/CodeGenCXX/predefined-expr-sizeof.cpp index e318fbec18ae3..f74cfb38fd133 100644 --- a/test/CodeGenCXX/predefined-expr-sizeof.cpp +++ b/test/CodeGenCXX/predefined-expr-sizeof.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // CHECK: store i32 49, i32* %size // CHECK: store i32 52, i32* %size diff --git a/test/CodeGenCXX/predefined-expr.cpp b/test/CodeGenCXX/predefined-expr.cpp index 45b4e9f5402f0..f5e5ca95282d4 100644 --- a/test/CodeGenCXX/predefined-expr.cpp +++ b/test/CodeGenCXX/predefined-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // CHECK: private constant [15 x i8] c"externFunction\00" // CHECK: private constant [26 x i8] c"void NS::externFunction()\00" @@ -11,6 +11,15 @@ // CHECK: private constant [45 x i8] c"void NS::Base::functionTemplate1(NS::Base *)\00" // CHECK: private constant [38 x i8] c"void NS::Base::functionTemplate1(int)\00" +// CHECK: private constant [23 x i8] c"anonymousUnionFunction\00" +// CHECK: private constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous union>::anonymousUnionFunction()\00" + +// CHECK: private constant [24 x i8] c"anonymousStructFunction\00" +// CHECK: private constant [85 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous struct>::anonymousStructFunction()\00" + +// CHECK: private constant [23 x i8] c"anonymousClassFunction\00" +// CHECK: private constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous class>::anonymousClassFunction()\00" + // CHECK: private constant [12 x i8] c"~Destructor\00" // CHECK: private constant [30 x i8] c"NS::Destructor::~Destructor()\00" @@ -22,6 +31,15 @@ // CHECK: private constant [16 x i8] c"virtualFunction\00" // CHECK: private constant [44 x i8] c"virtual void NS::Derived::virtualFunction()\00" +// CHECK: private constant [22 x i8] c"constVolatileFunction\00" +// CHECK: private constant [54 x i8] c"void NS::Base::constVolatileFunction() const volatile\00" + +// CHECK: private constant [17 x i8] c"volatileFunction\00" +// CHECK: private constant [43 x i8] c"void NS::Base::volatileFunction() volatile\00" + +// CHECK: private constant [14 x i8] c"constFunction\00" +// CHECK: private constant [37 x i8] c"void NS::Base::constFunction() const\00" + // CHECK: private constant [26 x i8] c"functionReturingTemplate2\00" // CHECK: private constant [64 x i8] c"ClassTemplate<NS::Base *> NS::Base::functionReturingTemplate2()\00" @@ -48,11 +66,42 @@ // CHECK: private constant [15 x i8] c"inlineFunction\00" // CHECK: private constant [32 x i8] c"void NS::Base::inlineFunction()\00" -// CHECK: private constant [11 x i8] c"staticFunc\00" -// CHECK: private constant [28 x i8] c"void NS::Base::staticFunc()\00" +// CHECK: private constant [15 x i8] c"staticFunction\00" +// CHECK: private constant [39 x i8] c"static void NS::Base::staticFunction()\00" + +// CHECK: private constant [26 x i8] c"topLevelNamespaceFunction\00" +// CHECK: private constant [59 x i8] c"void ClassInTopLevelNamespace::topLevelNamespaceFunction()\00" + +// CHECK: private constant [27 x i8] c"anonymousNamespaceFunction\00" +// CHECK: private constant [84 x i8] c"void <anonymous namespace>::ClassInAnonymousNamespace::anonymousNamespaceFunction()\00" + +// CHECK: private constant [19 x i8] c"localClassFunction\00" +// CHECK: private constant [59 x i8] c"void NS::localClass(int)::LocalClass::localClassFunction()\00" int printf(const char * _Format, ...); +class ClassInTopLevelNamespace { +public: + void topLevelNamespaceFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } +}; + +namespace { + + class ClassInAnonymousNamespace { + public: + void anonymousNamespaceFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + }; + +} // end anonymous namespace + namespace NS { template<typename T> @@ -67,7 +116,7 @@ public: class Base { public: - static void staticFunc() { + static void staticFunction() { printf("__func__ %s\n", __func__); printf("__FUNCTION__ %s\n", __FUNCTION__); printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); @@ -136,6 +185,24 @@ public: printf("__FUNCTION__ %s\n", __FUNCTION__); printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); } + + void constFunction() const { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + + void volatileFunction() volatile { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + + void constVolatileFunction() const volatile { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } }; class Derived : public Base { @@ -167,7 +234,6 @@ public: printf("__FUNCTION__ %s\n", __FUNCTION__); printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); } - }; class Destructor { @@ -179,17 +245,64 @@ public: } }; +class ContainerForAnonymousRecords { +public: + class { + public: + void anonymousClassFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + } anonymousClass; + + struct { + void anonymousStructFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + } anonymousStruct; + + union { + void anonymousUnionFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + } anonymousUnion; +}; + +void localClass(int) { + class LocalClass { + public: + void localClassFunction() { + printf("__func__ %s\n", __func__); + printf("__FUNCTION__ %s\n", __FUNCTION__); + printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); + } + }; + LocalClass lc; + lc.localClassFunction(); +} + extern void externFunction() { printf("__func__ %s\n", __func__); printf("__FUNCTION__ %s\n", __FUNCTION__); printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); } -} +} // end NS namespace int main() { - NS::Base::staticFunc(); + ClassInAnonymousNamespace anonymousNamespace; + anonymousNamespace.anonymousNamespaceFunction(); + + ClassInTopLevelNamespace topLevelNamespace; + topLevelNamespace.topLevelNamespaceFunction(); + NS::Base::staticFunction(); + NS::Base b; b.inlineFunction(); b.virtualFunction(); @@ -203,7 +316,10 @@ int main() { b.functionReturingTemplate2(); b.functionTemplate1<int>(0); b.functionTemplate1<NS::Base *>(0); - + b.constFunction(); + b.volatileFunction(); + b.constVolatileFunction(); + NS::Derived d; d.virtualFunction(); @@ -219,8 +335,15 @@ int main() { { NS::Destructor destructor; } - + + NS::ContainerForAnonymousRecords anonymous; + anonymous.anonymousClass.anonymousClassFunction(); + anonymous.anonymousStruct.anonymousStructFunction(); + anonymous.anonymousUnion.anonymousUnionFunction(); + + NS::localClass(0); + NS::externFunction(); - + return 0; } diff --git a/test/CodeGenCXX/ptr-to-datamember.cpp b/test/CodeGenCXX/ptr-to-datamember.cpp index ffaef32a13c9c..a6f523e2d7dd0 100644 --- a/test/CodeGenCXX/ptr-to-datamember.cpp +++ b/test/CodeGenCXX/ptr-to-datamember.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s extern "C" int printf(...); diff --git a/test/CodeGenCXX/ptr-to-member-function.cpp b/test/CodeGenCXX/ptr-to-member-function.cpp index 52190b9373772..e3912fe9081c9 100644 --- a/test/CodeGenCXX/ptr-to-member-function.cpp +++ b/test/CodeGenCXX/ptr-to-member-function.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s // 13.3.3.2 Ranking implicit conversion sequences @@ -63,8 +63,8 @@ int main() B1 c = B1(2); } -// CHECK-LP64: call __ZN1XcvM1BFvvEEv -// CHECK-LP64: call __Z1gM1CFvvE +// CHECK-LP64: callq __ZN1XcvM1BFvvEEv +// CHECK-LP64: callq __Z1gM1CFvvE // CHECK-LP32: call L__ZN1XcvM1BFvvEEv // CHECK-LP32: call __Z1gM1CFvvE diff --git a/test/CodeGenCXX/reference-bind-default-argument.cpp b/test/CodeGenCXX/reference-bind-default-argument.cpp new file mode 100644 index 0000000000000..acce962b1953f --- /dev/null +++ b/test/CodeGenCXX/reference-bind-default-argument.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 %s -emit-llvm-only -verify + +struct A {}; +struct B : A {}; +void a(const A& x = B()); +void b() { a(); } diff --git a/test/CodeGenCXX/reference-field.cpp b/test/CodeGenCXX/reference-field.cpp index 88d4c1f37e6ef..0312029259520 100644 --- a/test/CodeGenCXX/reference-field.cpp +++ b/test/CodeGenCXX/reference-field.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s -O2 | grep "@_Z1bv" +// RUN: %clang_cc1 -emit-llvm -o - %s -O2 | grep "@_Z1bv" // Make sure the call to b() doesn't get optimized out. extern struct x {char& x,y;}y; diff --git a/test/CodeGenCXX/reference-init.cpp b/test/CodeGenCXX/reference-init.cpp index 9baad94a96e76..1bfb28a66a03c 100644 --- a/test/CodeGenCXX/reference-init.cpp +++ b/test/CodeGenCXX/reference-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s struct XPTParamDescriptor {}; struct nsXPTParamInfo { diff --git a/test/CodeGenCXX/references.cpp b/test/CodeGenCXX/references.cpp index 74dc0ea6d7b02..6bec8bd8c3846 100644 --- a/test/CodeGenCXX/references.cpp +++ b/test/CodeGenCXX/references.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -verify -emit-llvm -o - %s | FileCheck %s void t1() { extern int& a; int b = a; diff --git a/test/CodeGenCXX/reinterpret-cast.cpp b/test/CodeGenCXX/reinterpret-cast.cpp index 58a980d5288c7..ff5679248c254 100644 --- a/test/CodeGenCXX/reinterpret-cast.cpp +++ b/test/CodeGenCXX/reinterpret-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s -std=c++0x +// RUN: %clang_cc1 -emit-llvm -o - %s -std=c++0x void *f1(unsigned long l) { return reinterpret_cast<void *>(l); } @@ -14,4 +14,4 @@ unsigned long f3(void *p) { void f4(int*&); void f5(void*& u) { f4(reinterpret_cast<int*&>(u)); -}
\ No newline at end of file +} diff --git a/test/CodeGenCXX/rtti-layout.cpp b/test/CodeGenCXX/rtti-layout.cpp new file mode 100644 index 0000000000000..1ad87fbc7ef78 --- /dev/null +++ b/test/CodeGenCXX/rtti-layout.cpp @@ -0,0 +1,191 @@ +// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | FileCheck %s +#include <typeinfo> + +// vtables. +extern "C" { + const void *_ZTVN10__cxxabiv123__fundamental_type_infoE; + const void *_ZTVN10__cxxabiv117__class_type_infoE; + const void *_ZTVN10__cxxabiv120__si_class_type_infoE; + const void *_ZTVN10__cxxabiv121__vmi_class_type_infoE; + const void *_ZTVN10__cxxabiv119__pointer_type_infoE; + const void *_ZTVN10__cxxabiv129__pointer_to_member_type_infoE; +}; +#define fundamental_type_info_vtable _ZTVN10__cxxabiv123__fundamental_type_infoE +#define class_type_info_vtable _ZTVN10__cxxabiv117__class_type_infoE +#define si_class_type_info_vtable _ZTVN10__cxxabiv120__si_class_type_infoE +#define vmi_class_type_info_vtable _ZTVN10__cxxabiv121__vmi_class_type_infoE +#define pointer_type_info_vtable _ZTVN10__cxxabiv119__pointer_type_infoE +#define pointer_to_member_type_info_vtable _ZTVN10__cxxabiv129__pointer_to_member_type_infoE + +class __pbase_type_info : public std::type_info { +public: + unsigned int __flags; + const std::type_info *__pointee; + + enum __masks { + __const_mask = 0x1, + __volatile_mask = 0x2, + __restrict_mask = 0x4, + __incomplete_mask = 0x8, + __incomplete_class_mask = 0x10 + }; +}; + +class __class_type_info : public std::type_info { }; + +class __si_class_type_info : public __class_type_info { +public: + const __class_type_info *__base_type; +}; + +struct __base_class_type_info { +public: + const __class_type_info *__base_type; + long __offset_flags; + + enum __offset_flags_masks { + __virtual_mask = 0x1, + __public_mask = 0x2, + __offset_shift = 8 + }; +}; + +class __vmi_class_type_info : public __class_type_info { +public: + unsigned int __flags; + unsigned int __base_count; + __base_class_type_info __base_info[1]; + + enum __flags_masks { + __non_diamond_repeat_mask = 0x1, + __diamond_shaped_mask = 0x2 + }; +}; + +template<typename T> const T& to(const std::type_info &info) { +return static_cast<const T&>(info); +} +struct Incomplete; + +struct A { int a; }; +struct Empty { }; + +struct SI1 : A { }; +struct SI2 : Empty { }; +struct SI3 : Empty { virtual void f() { } }; + +struct VMI1 : private A { }; +struct VMI2 : virtual A { }; +struct VMI3 : A { virtual void f() { } }; +struct VMI4 : A, Empty { }; + +struct VMIBase1 { int a; }; +struct VMIBase2 : VMIBase1 { int a; }; +struct VMI5 : VMIBase1, VMIBase2 { int a; }; + +struct VMIBase3 : virtual VMIBase1 { int a; }; +struct VMI6 : virtual VMIBase1, VMIBase3 { int a; }; + +struct VMI7 : VMIBase1, VMI5, private VMI6 { }; + +#define CHECK(x) if (!(x)) return __LINE__ +#define CHECK_VTABLE(type, vtable) CHECK(&vtable##_type_info_vtable + 2 == (((void **)&(typeid(type)))[0])) +#define CHECK_BASE_INFO_TYPE(type, index, base) CHECK(to<__vmi_class_type_info>(typeid(type)).__base_info[(index)].__base_type == &typeid(base)) +#define CHECK_BASE_INFO_OFFSET_FLAGS(type, index, offset, flags) CHECK(to<__vmi_class_type_info>(typeid(type)).__base_info[(index)].__offset_flags == (((offset) << 8) | (flags))) + +// CHECK: define i32 @_Z1fv() +int f() { + // Vectors should be treated as fundamental types. + typedef short __v4hi __attribute__ ((__vector_size__ (8))); + CHECK_VTABLE(__v4hi, fundamental); + + // A does not have any bases. + CHECK_VTABLE(A, class); + + // SI1 has a single public base. + CHECK_VTABLE(SI1, si_class); + CHECK(to<__si_class_type_info>(typeid(SI1)).__base_type == &typeid(A)); + + // SI2 has a single public empty base. + CHECK_VTABLE(SI2, si_class); + CHECK(to<__si_class_type_info>(typeid(SI2)).__base_type == &typeid(Empty)); + + // SI3 has a single public empty base. SI3 is dynamic whereas Empty is not, but since Empty is + // an empty class, it will still be at offset zero. + CHECK_VTABLE(SI3, si_class); + CHECK(to<__si_class_type_info>(typeid(SI3)).__base_type == &typeid(Empty)); + + // VMI1 has a single base, but it is private. + CHECK_VTABLE(VMI1, vmi_class); + + // VMI2 has a single base, but it is virtual. + CHECK_VTABLE(VMI2, vmi_class); + + // VMI3 has a single base, but VMI3 is dynamic whereas A is not, and A is not empty. + CHECK_VTABLE(VMI3, vmi_class); + + // VMI4 has two bases. + CHECK_VTABLE(VMI4, vmi_class); + + // VMI5 has non-diamond shaped inheritance. + CHECK_VTABLE(VMI5, vmi_class); + CHECK(to<__vmi_class_type_info>(typeid(VMI5)).__flags == __vmi_class_type_info::__non_diamond_repeat_mask); + CHECK(to<__vmi_class_type_info>(typeid(VMI5)).__base_count == 2); + CHECK_BASE_INFO_TYPE(VMI5, 0, VMIBase1); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI5, 0, 0, __base_class_type_info::__public_mask); + CHECK_BASE_INFO_TYPE(VMI5, 1, VMIBase2); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI5, 1, 4, __base_class_type_info::__public_mask); + + // VMI6 has diamond shaped inheritance. + CHECK_VTABLE(VMI6, vmi_class); + CHECK(to<__vmi_class_type_info>(typeid(VMI6)).__flags == __vmi_class_type_info::__diamond_shaped_mask); + CHECK(to<__vmi_class_type_info>(typeid(VMI6)).__base_count == 2); + CHECK_BASE_INFO_TYPE(VMI6, 0, VMIBase1); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI6, 0, -24, __base_class_type_info::__public_mask | __base_class_type_info::__virtual_mask); + CHECK_BASE_INFO_TYPE(VMI6, 1, VMIBase3); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI6, 1, 0, __base_class_type_info::__public_mask); + + // VMI7 has both non-diamond and diamond shaped inheritance. + CHECK_VTABLE(VMI7, vmi_class); + CHECK(to<__vmi_class_type_info>(typeid(VMI7)).__flags == (__vmi_class_type_info::__non_diamond_repeat_mask | __vmi_class_type_info::__diamond_shaped_mask)); + CHECK(to<__vmi_class_type_info>(typeid(VMI7)).__base_count == 3); + CHECK_BASE_INFO_TYPE(VMI7, 0, VMIBase1); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI7, 0, 16, __base_class_type_info::__public_mask); + CHECK_BASE_INFO_TYPE(VMI7, 1, VMI5); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI7, 1, 20, __base_class_type_info::__public_mask); + CHECK_BASE_INFO_TYPE(VMI7, 2, VMI6); + CHECK_BASE_INFO_OFFSET_FLAGS(VMI7, 2, 0, 0); + + // Pointers to incomplete classes. + CHECK_VTABLE(Incomplete *, pointer); + CHECK(to<__pbase_type_info>(typeid(Incomplete *)).__flags == __pbase_type_info::__incomplete_mask); + CHECK(to<__pbase_type_info>(typeid(Incomplete **)).__flags == __pbase_type_info::__incomplete_mask); + CHECK(to<__pbase_type_info>(typeid(Incomplete ***)).__flags == __pbase_type_info::__incomplete_mask); + + // Member pointers. + CHECK_VTABLE(int Incomplete::*, pointer_to_member); + CHECK(to<__pbase_type_info>(typeid(int Incomplete::*)).__flags == __pbase_type_info::__incomplete_class_mask); + CHECK(to<__pbase_type_info>(typeid(Incomplete Incomplete::*)).__flags == (__pbase_type_info::__incomplete_class_mask | __pbase_type_info::__incomplete_mask)); + CHECK(to<__pbase_type_info>(typeid(Incomplete A::*)).__flags == (__pbase_type_info::__incomplete_mask)); + + // Success! + // CHECK: ret i32 0 + return 0; +} + +#ifdef HARNESS +extern "C" void printf(const char *, ...); + +int main() { + int result = f(); + + if (result == 0) + printf("success!\n"); + else + printf("test on line %d failed!\n", result); + + return result; +} +#endif + + diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp index a2a1cdd48c107..799c1d41c7261 100644 --- a/test/CodeGenCXX/rtti-linkage.cpp +++ b/test/CodeGenCXX/rtti-linkage.cpp @@ -1,9 +1,47 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +#include <typeinfo> // CHECK: _ZTS1B = constant // CHECK: _ZTS1A = weak_odr constant // CHECK: _ZTI1A = weak_odr constant // CHECK: _ZTI1B = constant +// CHECK: _ZTSP1C = internal constant +// CHECK: _ZTS1C = internal constant +// CHECK: _ZTI1C = internal constant +// CHECK: _ZTIP1C = internal constant +// CHECK: _ZTSPP1C = internal constant +// CHECK: _ZTIPP1C = internal constant +// CHECK: _ZTSM1Ci = internal constant +// CHECK: _ZTIM1Ci = internal constant +// CHECK: _ZTSPM1Ci = internal constant +// CHECK: _ZTIPM1Ci = internal constant +// CHECK: _ZTSM1CS_ = internal constant +// CHECK: _ZTIM1CS_ = internal constant +// CHECK: _ZTSM1CPS_ = internal constant +// CHECK: _ZTIM1CPS_ = internal constant +// CHECK: _ZTSM1A1C = internal constant +// CHECK: _ZTIM1A1C = internal constant +// CHECK: _ZTSM1AP1C = internal constant +// CHECK: _ZTIM1AP1C = internal constant + +// CHECK: _ZTS1F = weak_odr constant + +// CHECK: _ZTSN12_GLOBAL__N_11DE = internal constant +// CHECK: _ZTIN12_GLOBAL__N_11DE = internal constant +// CHECK: _ZTSPN12_GLOBAL__N_11DE = internal constant +// CHECK: _ZTIPN12_GLOBAL__N_11DE = internal constant +// CHECK: _ZTSFN12_GLOBAL__N_11DEvE = internal constant +// CHECK: _ZTIFN12_GLOBAL__N_11DEvE = internal constant +// CHECK: _ZTSFvN12_GLOBAL__N_11DEE = internal constant +// CHECK: _ZTIFvN12_GLOBAL__N_11DEE = internal constant + +// CHECK: _ZTSPFvvE = weak_odr constant +// CHECK: _ZTSFvvE = weak_odr constant +// CHECK: _ZTIFvvE = weak_odr +// CHECK: _ZTIPFvvE = weak_odr constant + +// CHECK: _ZTSN12_GLOBAL__N_11EE = internal constant +// CHECK: _ZTIN12_GLOBAL__N_11EE = internal constant // A has no key function, so its RTTI data should be weak_odr. struct A { }; @@ -14,3 +52,52 @@ struct B : A { virtual void f(); }; void B::f() { } + +// C is an incomplete class type, so any direct or indirect pointer types should have +// internal linkage, as should the type info for C itself. +struct C; + +void t1() { + (void)typeid(C*); + (void)typeid(C**); + (void)typeid(int C::*); + (void)typeid(int C::**); + (void)typeid(C C::*); + (void)typeid(C *C::*); + (void)typeid(C A::*); + (void)typeid(C* A::*); +} + +namespace { + // D is inside an anonymous namespace, so all type information related to D should have + // internal linkage. + struct D { }; + + // E is also inside an anonymous namespace. + enum E { }; + +}; + +// F has a key function defined in the translation unit, but it is inline so the RTTI +// data should be emitted with weak_odr linkage. +struct F { + virtual void f(); +}; + +inline void F::f() { } +const D getD(); + +const std::type_info &t2() { + (void)typeid(const D); + (void)typeid(D *); + (void)typeid(D (*)()); + (void)typeid(void (*)(D)); + // The exception specification is not part of the RTTI descriptor, so it should not have + // internal linkage. + (void)typeid(void (*)() throw (D)); + + (void)typeid(E); + + // CHECK: _ZTIN12_GLOBAL__N_11DE to + return typeid(getD()); +} diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp deleted file mode 100644 index 7ba4d56b6633c..0000000000000 --- a/test/CodeGenCXX/rtti.cpp +++ /dev/null @@ -1,205 +0,0 @@ -// RUN: clang-cc -I%S -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t.s -// RUN: FileCheck --input-file=%t.s %s - -// RUN: clang-cc -I%S -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t.ll -// RUN: FileCheck -check-prefix LL --input-file=%t.ll %s -// XFAIL: * - -#include <typeinfo> - -class test1_B1 { - virtual void foo() { } -}; -class test1_B2 : public test1_B1 { - virtual void foo() { } -}; -class test1_B3 : public test1_B2, public test1_B1 { - virtual void foo() { } -}; -class test1_B4 : virtual public test1_B3 { - virtual void foo() { } -}; -class test1_B5 : virtual test1_B3, test1_B4 { - virtual void foo() { } -}; -class test1_B6 { - virtual void foo() { } -}; -class test1_B7 : public test1_B6, public test1_B5 { - virtual void foo() { } -}; -class test1_D : public test1_B7 { - virtual void foo() { } -} d1; - -// CHECK:__ZTI7test1_D: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv120__si_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS7test1_D -// CHECK-NEXT: .quad __ZTI8test1_B7 - -// CHECK: __ZTSPVi: -// CHECK-NEXT: .asciz "PVi" - -// CHECK: __ZTIPVi: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv119__pointer_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTSPVi -// CHECK-NEXT: .long 2 -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .quad __ZTIi - -// CHECK: .globl __ZTS7test3_A -// CHECK-NEXT: .weak_definition __ZTS7test3_A -// CHECK: __ZTS7test3_A: -// CHECK-NEXT: .asciz "7test3_A" - -// CHECK: __ZTIM7test3_Ai: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv129__pointer_to_member_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTSM7test3_Ai -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .quad __ZTIi -// CHECK-NEXT: .quad __ZTI7test3_A - -// CHECK: __ZTIM7test3_Ii: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv129__pointer_to_member_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTSM7test3_Ii -// CHECK-NEXT: .long 16 -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .quad __ZTIi -// CHECK-NEXT: .quad __ZTI7test3_I - -// CHECK: .private_extern __ZTIFvvE -// CHECK: .globl __ZTIFvvE -// CHECK: .weak_definition __ZTIFvvE -// CHECK: __ZTIFvvE: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv120__function_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTSFvvE - -// CHECK: __ZTIM7test3_AFvvE: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv129__pointer_to_member_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTSM7test3_AFvvE -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .space 4 -// CHECK-NEXT: .quad __ZTIFvvE -// CHECK-NEXT: .quad __ZTI7test3_A - -// CHECK:__ZTI8test1_B7: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv121__vmi_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B7 -// CHECK-NEXT: .long 3 -// CHECK-NEXT: .long 2 -// CHECK-NEXT: .quad __ZTI8test1_B6 -// CHECK-NEXT: .quad 2 -// CHECK-NEXT: .quad __ZTI8test1_B5 -// CHECK-NEXT: .quad 2050 - -// CHECK:__ZTI8test1_B5: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv121__vmi_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B5 -// CHECK-NEXT: .long 3 -// CHECK-NEXT: .long 2 -// CHECK-NEXT: .quad __ZTI8test1_B3 -// CHECK-NEXT: .quad 18446744073709545473 -// CHECK-NEXT: .quad __ZTI8test1_B4 -// CHECK-NEXT: .space 8 - -// CHECK:__ZTI8test1_B4: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv121__vmi_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B4 -// CHECK-NEXT: .long 1 -// CHECK-NEXT: .long 1 -// CHECK-NEXT: .quad __ZTI8test1_B3 -// CHECK-NEXT: .quad 18446744073709545475 - -// CHECK:__ZTI8test1_B6: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv117__class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B6 - -// CHECK:__ZTI8test1_B3: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv121__vmi_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B3 -// CHECK-NEXT: .long 1 -// CHECK-NEXT: .long 2 -// CHECK-NEXT: .quad __ZTI8test1_B2 -// CHECK-NEXT: .quad 2 -// CHECK-NEXT: .quad __ZTI8test1_B1 -// CHECK-NEXT: .quad 2050 - -// CHECK:__ZTS8test1_B1: -// CHECK-NEXT: .asciz "8test1_B1" - -// CHECK:__ZTI8test1_B1: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv117__class_type_infoE) + 16 -// CHECK-NEXT:. quad __ZTS8test1_B1 - -// CHECK:__ZTS8test1_B2: -// CHECK-NEXT: .asciz "8test1_B2" - -// CHECK:__ZTI8test1_B2: -// CHECK-NEXT: .quad (__ZTVN10__cxxabiv120__si_class_type_infoE) + 16 -// CHECK-NEXT: .quad __ZTS8test1_B2 -// CHECK-NEXT: .quad __ZTI8test1_B1 - -class NP { }; -void test2_1(); -void test2_2(test1_D *dp) { - test1_D &d = *dp; - if (typeid(d) == typeid(test1_D)) - test2_1(); - if (typeid(NP) == typeid(test1_D)) - test2_1(); - if (typeid(((*(dp)))) == typeid(test1_D)) - test2_1(); - if (typeid(int) == typeid(float)) - test2_1(); - if (typeid(int*) == typeid(const int *)) - test2_1(); -} - -// CHECK-LL:define void @_Z7test2_2P7test1_D(%class.test1_B7* %dp) nounwind { -// CHECK-LL: %tmp1 = load %class.test1_B7** %d -// CHECK-LL-NEXT: %0 = bitcast %class.test1_B7* %tmp1 to %"class.std::type_info"*** -// CHECK-LL-NEXT: %vtable = load %"class.std::type_info"*** %0 -// CHECK-LL-NEXT: %1 = getelementptr inbounds %"class.std::type_info"** %vtable, i64 -1 -// CHECK-LL-NEXT: %2 = load %"class.std::type_info"** %1 -// CHECK-LL-NEXT: %call = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* %2, %"class.std::type_info"* bitcast (%{{[0-9]*}}* @_ZTI7test1_D to %"class.std::type_info"*)) - -// CHECK-LL: %call2 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (%{{[0-9]*}}* @_ZTI2NP to %"class.std::type_info"*), %"class.std::type_info"* bitcast (%{{[0-9]*}}* @_ZTI7test1_D to %"class.std::type_info"*)) - -// CHECK-LL: %3 = bitcast %class.test1_B7* %tmp5 to %"class.std::type_info"*** -// CHECK-LL-NEXT: %4 = icmp ne %"class.std::type_info"*** %3, null -// CHECK-LL-NEXT: br i1 %4, label %6, label %5 -// CHECK-LL: ; <label>:5 -// CHECK-LL-NEXT: call void @__cxa_bad_typeid() -// CHECK-LL-NEXT: unreachable -// CHECK-LL: ; <label>:6 -// CHECK-LL-NEXT: %vtable6 = load %"class.std::type_info"*** %3 -// CHECK-LL-NEXT: %7 = getelementptr inbounds %"class.std::type_info"** %vtable6, i64 -1 -// CHECK-LL-NEXT: %8 = load %"class.std::type_info"** %7 -// CHECK-LL-NEXT: %call7 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* %8, %"class.std::type_info"* bitcast (%{{[0-9]*}}* @_ZTI7test1_D to %"class.std::type_info"*)) - -// CHECK-LL: %call10 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (i8** @_ZTIi to %"class.std::type_info"*), %"class.std::type_info"* bitcast (i8** @_ZTIf to %"class.std::type_info"*)) - -// CHECK-LL: %call13 = call zeroext i1 @_ZNKSt9type_infoeqERKS_(%"class.std::type_info"* bitcast (i8** @_ZTIPi to %"class.std::type_info"*), %"class.std::type_info"* bitcast (i8** @_ZTIPKi to %"class.std::type_info"*)) - -class test3_A { }; -class test3_I; -int (test3_A::*pmd); -int (test3_I::*i_pmd); -void (test3_A::*pmf)(); -int test3() { - if (typeid(volatile int *) == typeid(int *)) - return 1; - if (typeid(pmd) == typeid(i_pmd)) - return 1; - if (typeid(pmd) == typeid(pmf)) - return 1; - return 0; - enum a { }; - if (typeid(int[5]) == typeid(enum a)) - return 0; -} - -bool test4(std::type_info* __pointee) { - return *__pointee == typeid (void); -} diff --git a/test/CodeGenCXX/static-assert.cpp b/test/CodeGenCXX/static-assert.cpp index e103b9906257f..dbb8f34d84148 100644 --- a/test/CodeGenCXX/static-assert.cpp +++ b/test/CodeGenCXX/static-assert.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - -std=c++0x -verify +// RUN: %clang_cc1 %s -emit-llvm -o - -std=c++0x -verify static_assert(true, ""); diff --git a/test/CodeGenCXX/static-data-member.cpp b/test/CodeGenCXX/static-data-member.cpp index 6e2abcc1adea8..53a1d5e4c4504 100644 --- a/test/CodeGenCXX/static-data-member.cpp +++ b/test/CodeGenCXX/static-data-member.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s struct S { static int i; }; diff --git a/test/CodeGenCXX/static-init-1.cpp b/test/CodeGenCXX/static-init-1.cpp index 2c452022c525f..a926c0a2d32df 100644 --- a/test/CodeGenCXX/static-init-1.cpp +++ b/test/CodeGenCXX/static-init-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple=x86_64-apple-darwin9 -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-llvm %s -o %t // RUN: grep "call i32 @_Z5func1i" %t | count 3 extern "C" int printf(...); diff --git a/test/CodeGenCXX/static-init-2.cpp b/test/CodeGenCXX/static-init-2.cpp index e229dd4aa734c..65ab3bb1262df 100644 --- a/test/CodeGenCXX/static-init-2.cpp +++ b/test/CodeGenCXX/static-init-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s // Make sure we don't crash generating y; its value is constant, but the // initializer has side effects, so EmitConstantExpr should fail. diff --git a/test/CodeGenCXX/static-init.cpp b/test/CodeGenCXX/static-init.cpp index 91085440ae78d..cbd90e7894069 100644 --- a/test/CodeGenCXX/static-init.cpp +++ b/test/CodeGenCXX/static-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { A(); ~A(); @@ -11,7 +11,7 @@ void f() { } void g() { - // CHECK: call i8* @_Znwm(i64 1) + // CHECK: call noalias i8* @_Znwm(i64 1) // CHECK: call void @_ZN1AC1Ev( static A& a = *new A; } diff --git a/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp b/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp index d439cbd500497..94fd9aa12ced2 100644 --- a/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp +++ b/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // CHECK: ; ModuleID template<typename> struct A { static int a; }; diff --git a/test/CodeGenCXX/temp-order.cpp b/test/CodeGenCXX/temp-order.cpp index ecf075fcc11db..e1ef7eb260a21 100644 --- a/test/CodeGenCXX/temp-order.cpp +++ b/test/CodeGenCXX/temp-order.cpp @@ -1,5 +1,5 @@ // Output file should have no calls to error() with folding. -// RUN: clang-cc -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s // RUN: FileCheck %s < %t static unsigned pow(unsigned Base, unsigned Power) { diff --git a/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp b/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp index f8454282badc1..921113a148414 100644 --- a/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp +++ b/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s template <typename T> class A { diff --git a/test/CodeGenCXX/template-linkage.cpp b/test/CodeGenCXX/template-linkage.cpp index 8013ba44c5336..5d573d6e829b7 100644 --- a/test/CodeGenCXX/template-linkage.cpp +++ b/test/CodeGenCXX/template-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s template<typename T> struct A { virtual void f(T) { } inline void g() { } diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp index e55027460f0c3..611781886b3ec 100644 --- a/test/CodeGenCXX/temporaries.cpp +++ b/test/CodeGenCXX/temporaries.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s struct A { A(); ~A(); @@ -201,4 +201,51 @@ void f11(H h) { // CHECK-NOT: call void @_ZN1HD1Ev // CHECK: ret void f10(h); -}
\ No newline at end of file +} + +// PR5808 +struct I { + I(const char *); + ~I(); +}; + +// CHECK: _Z3f12v +I f12() { + // CHECK: call void @_ZN1IC1EPKc + // CHECK-NOT: call void @_ZN1ID1Ev + // CHECK: ret void + return "Hello"; +} + +// PR5867 +namespace PR5867 { + struct S { + S(); + S(const S &); + ~S(); + }; + + void f(S, int); + // CHECK: define void @_ZN6PR58671gEv + void g() { + // CHECK: call void @_ZN6PR58671SC1Ev + // CHECK-NEXT: call void @_ZN6PR58671fENS_1SEi + // CHECK-NEXT: call void @_ZN6PR58671SD1Ev + // CHECK-NEXT: ret void + (f)(S(), 0); + } + + // CHECK: define linkonce_odr void @_ZN6PR58672g2IiEEvT_ + template<typename T> + void g2(T) { + // CHECK: call void @_ZN6PR58671SC1Ev + // CHECK-NEXT: call void @_ZN6PR58671fENS_1SEi + // CHECK-NEXT: call void @_ZN6PR58671SD1Ev + // CHECK-NEXT: ret void + (f)(S(), 0); + } + + void h() { + g2(17); + } +} diff --git a/test/CodeGenCXX/throw-expressions.cpp b/test/CodeGenCXX/throw-expressions.cpp index 7fe556312bab4..9449618f2f2c3 100644 --- a/test/CodeGenCXX/throw-expressions.cpp +++ b/test/CodeGenCXX/throw-expressions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s int val = 42; int& test1() { diff --git a/test/CodeGenCXX/trivial-constructor-init.cpp b/test/CodeGenCXX/trivial-constructor-init.cpp index 90d6e655d8d89..343dc6575a717 100644 --- a/test/CodeGenCXX/trivial-constructor-init.cpp +++ b/test/CodeGenCXX/trivial-constructor-init.cpp @@ -1,5 +1,5 @@ -// RUN: clang-cc -S %s -o %t-64.s -// RUN: clang-cc -S %s -o %t-32.s +// RUN: %clang_cc1 -S %s -o %t-64.s +// RUN: %clang_cc1 -S %s -o %t-32.s extern "C" int printf(...); diff --git a/test/CodeGenCXX/try-catch.cpp b/test/CodeGenCXX/try-catch.cpp new file mode 100644 index 0000000000000..2b5f3232d1fb7 --- /dev/null +++ b/test/CodeGenCXX/try-catch.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fexceptions | FileCheck %s + +struct X { }; + +const X g(); + +void f() { + try { + throw g(); + // CHECK: @_ZTI1X to i8 + } catch (const X x) { + } +} diff --git a/test/CodeGenCXX/unary-type-trait.cpp b/test/CodeGenCXX/unary-type-trait.cpp index b65b9f9d4f2f3..a11c67e128909 100644 --- a/test/CodeGenCXX/unary-type-trait.cpp +++ b/test/CodeGenCXX/unary-type-trait.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm-only -verify %s bool a() { return __is_pod(int); } diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp new file mode 100644 index 0000000000000..8b6e43fd8ec03 --- /dev/null +++ b/test/CodeGenCXX/value-init.cpp @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s + +struct A { + virtual ~A(); +}; + +struct B : A { }; + +struct C { + int i; + B b; +}; + +// CHECK: _Z15test_value_initv +void test_value_init() { + // This value initialization requires zero initialization of the 'B' + // subobject followed by a call to its constructor. + // PR5800 + + // CHECK: store i32 17 + // CHECK: call void @llvm.memset.i64 + // CHECK: call void @_ZN1BC1Ev + C c = { 17 } ; + // CHECK: call void @_ZN1CD1Ev +} diff --git a/test/CodeGenCXX/vararg-conversion-ctor.cpp b/test/CodeGenCXX/vararg-conversion-ctor.cpp index 1306abf4a63d9..7e42859ac93e6 100644 --- a/test/CodeGenCXX/vararg-conversion-ctor.cpp +++ b/test/CodeGenCXX/vararg-conversion-ctor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll // RUN: FileCheck -check-prefix LPLL64 --input-file=%t-64.ll %s extern "C" int printf(...); diff --git a/test/CodeGenCXX/virt-call-offsets.cpp b/test/CodeGenCXX/virt-call-offsets.cpp index db0ba2f483b87..3eb6b5da7d0c1 100644 --- a/test/CodeGenCXX/virt-call-offsets.cpp +++ b/test/CodeGenCXX/virt-call-offsets.cpp @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct A { virtual void a(); }; struct B : A {}; diff --git a/test/CodeGenCXX/virt-canonical-decl.cpp b/test/CodeGenCXX/virt-canonical-decl.cpp index c1a8c236af8d6..dfc3619489216 100644 --- a/test/CodeGenCXX/virt-canonical-decl.cpp +++ b/test/CodeGenCXX/virt-canonical-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only +// RUN: %clang_cc1 %s -emit-llvm-only class Base { public: diff --git a/test/CodeGenCXX/virt-dtor-gen.cpp b/test/CodeGenCXX/virt-dtor-gen.cpp index 704d735c776ef..a4346bade7865 100644 --- a/test/CodeGenCXX/virt-dtor-gen.cpp +++ b/test/CodeGenCXX/virt-dtor-gen.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -o - -emit-llvm %s | FileCheck %s +// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s // PR5483 // Make sure we generate all three forms of the destructor when it is virtual. diff --git a/test/CodeGenCXX/virt-dtor-key.cpp b/test/CodeGenCXX/virt-dtor-key.cpp index 9cfd58dae2d35..6a58c50b5b791 100644 --- a/test/CodeGenCXX/virt-dtor-key.cpp +++ b/test/CodeGenCXX/virt-dtor-key.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s // CHECK: @_ZTI3foo = constant class foo { foo(); diff --git a/test/CodeGenCXX/virt-template-vtable.cpp b/test/CodeGenCXX/virt-template-vtable.cpp index 3fbdd2d9cde00..76a1240731b2c 100644 --- a/test/CodeGenCXX/virt-template-vtable.cpp +++ b/test/CodeGenCXX/virt-template-vtable.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s template<class T> class A { A() {} diff --git a/test/CodeGenCXX/virt-thunk-reference.cpp b/test/CodeGenCXX/virt-thunk-reference.cpp index 4b361cfc3d2c9..0cd958bf32081 100644 --- a/test/CodeGenCXX/virt-thunk-reference.cpp +++ b/test/CodeGenCXX/virt-thunk-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s struct A { int a; virtual void aa(int&); }; struct B { int b; virtual void bb(int&); }; diff --git a/test/CodeGenCXX/virt.cpp b/test/CodeGenCXX/virt.cpp index e3b2afe2f770d..259fd03e7affe 100644 --- a/test/CodeGenCXX/virt.cpp +++ b/test/CodeGenCXX/virt.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll +// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll // RUN: FileCheck -check-prefix LPLL64 --input-file=%t-64.ll %s @@ -147,12 +147,12 @@ void test12_foo() { } // CHECK-LPLL64:define void @_Z10test12_foov() nounwind { -// CHECK-LPLL64: call void %2(%class.test14* %tmp) -// CHECK-LPLL64: call void %5(%class.test14* %tmp1) -// CHECK-LPLL64: call void %8(%class.test14* %tmp3) -// CHECK-LPLL64: call void %11(%class.test14* %tmp5) -// CHECK-LPLL64: call void %14(%class.test14* %tmp7) -// CHECK-LPLL64: call void %17(%class.test14* %tmp9) +// CHECK-LPLL64: call void % +// CHECK-LPLL64: call void % +// CHECK-LPLL64: call void % +// CHECK-LPLL64: call void % +// CHECK-LPLL64: call void % +// CHECK-LPLL64: call void % // CHECK-LPLL64: call void @_ZN8test12_A3fooEv(%class.test14* %tmp11) diff --git a/test/CodeGenCXX/virtual-base-cast.cpp b/test/CodeGenCXX/virtual-base-cast.cpp index eae868f9b69c3..73b7c1c95299b 100644 --- a/test/CodeGenCXX/virtual-base-cast.cpp +++ b/test/CodeGenCXX/virtual-base-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s struct A { int a; virtual int aa(); }; struct B { int b; virtual int bb(); }; diff --git a/test/CodeGenCXX/virtual-base-ctor.cpp b/test/CodeGenCXX/virtual-base-ctor.cpp new file mode 100644 index 0000000000000..2d81ebd3a407d --- /dev/null +++ b/test/CodeGenCXX/virtual-base-ctor.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - -O2 | FileCheck %s + +struct B; +extern B x; +char y; +typedef __typeof(sizeof(int)) size_t; +struct A { int a; A() { y = ((size_t)this - (size_t)&x) / sizeof(void*); } }; +struct B : virtual A { void* x; }; +B x; + +// CHECK: @y = global i8 2 diff --git a/test/CodeGenCXX/virtual-base-destructor-call.cpp b/test/CodeGenCXX/virtual-base-destructor-call.cpp index e791758aca9f3..1ee598afdc3f4 100644 --- a/test/CodeGenCXX/virtual-base-destructor-call.cpp +++ b/test/CodeGenCXX/virtual-base-destructor-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct basic_ios{~basic_ios(); }; diff --git a/test/CodeGenCXX/virtual-bases.cpp b/test/CodeGenCXX/virtual-bases.cpp index 4b069ead02b87..1eaef3fa3af44 100644 --- a/test/CodeGenCXX/virtual-bases.cpp +++ b/test/CodeGenCXX/virtual-bases.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s struct A { A(); diff --git a/test/CodeGenCXX/virtual-destructor-calls.cpp b/test/CodeGenCXX/virtual-destructor-calls.cpp index 976f56278ee0e..ecfcad2320293 100644 --- a/test/CodeGenCXX/virtual-destructor-calls.cpp +++ b/test/CodeGenCXX/virtual-destructor-calls.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s struct A { virtual ~A(); diff --git a/test/CodeGenCXX/virtual-destructor-synthesis.cpp b/test/CodeGenCXX/virtual-destructor-synthesis.cpp index b95218a322f66..90f66a817db11 100644 --- a/test/CodeGenCXX/virtual-destructor-synthesis.cpp +++ b/test/CodeGenCXX/virtual-destructor-synthesis.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct box { virtual ~box(); diff --git a/test/CodeGenCXX/virtual-function-calls.cpp b/test/CodeGenCXX/virtual-function-calls.cpp index ca5acbabcc993..0b3a684301eb2 100644 --- a/test/CodeGenCXX/virtual-function-calls.cpp +++ b/test/CodeGenCXX/virtual-function-calls.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // PR5021 struct A { @@ -9,3 +9,11 @@ void f(A *a) { // CHECK: call void % a->f('c'); } + +struct B : virtual A { + virtual void f(); +}; + +void f(B * b) { + b->f(); +}
\ No newline at end of file diff --git a/test/CodeGenCXX/virtual-functions-incomplete-types.cpp b/test/CodeGenCXX/virtual-functions-incomplete-types.cpp index 1e1e96286e798..50e04357b3903 100644 --- a/test/CodeGenCXX/virtual-functions-incomplete-types.cpp +++ b/test/CodeGenCXX/virtual-functions-incomplete-types.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A; diff --git a/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp b/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp index d179e9b78607a..70bc6fceb3612 100644 --- a/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp +++ b/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s struct D; struct B { diff --git a/test/CodeGenCXX/virtual-inherited-destructor.cpp b/test/CodeGenCXX/virtual-inherited-destructor.cpp index 52b62edd29447..509d40ae2fef3 100644 --- a/test/CodeGenCXX/virtual-inherited-destructor.cpp +++ b/test/CodeGenCXX/virtual-inherited-destructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm-only +// RUN: %clang_cc1 %s -emit-llvm-only struct A { virtual ~A(); }; struct B : A { diff --git a/test/CodeGenCXX/virtual-operator-call.cpp b/test/CodeGenCXX/virtual-operator-call.cpp index 018052bb472c5..42d38e55a04f3 100644 --- a/test/CodeGenCXX/virtual-operator-call.cpp +++ b/test/CodeGenCXX/virtual-operator-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct A { virtual int operator-() = 0; diff --git a/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp b/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp index 3d99a02160737..285e3da759247 100644 --- a/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp +++ b/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); diff --git a/test/CodeGenCXX/vtable-cast-crash.cpp b/test/CodeGenCXX/vtable-cast-crash.cpp index a91d9790fe65c..cc419fd4f522d 100644 --- a/test/CodeGenCXX/vtable-cast-crash.cpp +++ b/test/CodeGenCXX/vtable-cast-crash.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s struct A { A(); diff --git a/test/CodeGenCXX/vtable-key-function.cpp b/test/CodeGenCXX/vtable-key-function.cpp index b0371c0e0ba7f..90e8ea66f7698 100644 --- a/test/CodeGenCXX/vtable-key-function.cpp +++ b/test/CodeGenCXX/vtable-key-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // PR5697 namespace PR5697 { struct A { diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp index f2d914feed9ed..6d3cf240096ba 100644 --- a/test/CodeGenCXX/vtable-linkage.cpp +++ b/test/CodeGenCXX/vtable-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s namespace { struct A { diff --git a/test/CodeGenCXX/x86_64-arguments.cpp b/test/CodeGenCXX/x86_64-arguments.cpp index 0e4c2abc1074a..7ebbedc9989ee 100644 --- a/test/CodeGenCXX/x86_64-arguments.cpp +++ b/test/CodeGenCXX/x86_64-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s // CHECK: [[i64_i64_ty:%.*]] = type { i64, i64 } // CHECK: [[i64_double_ty:%.*]] = type { i64, double } @@ -21,4 +21,7 @@ struct f2_s1 : public f2_s0 { char d;}; // CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]]) void f2(f2_s1 a0) { } - +// PR5831 +struct s3_0 {}; +struct s3_1 { struct s3_0 a; long b; }; +void f3(struct s3_1 x) {} diff --git a/test/CodeGenObjC/2008-10-23-invalid-icmp.m b/test/CodeGenObjC/2008-10-23-invalid-icmp.m index 65fbf9bc092c0..ce01bdb489abd 100644 --- a/test/CodeGenObjC/2008-10-23-invalid-icmp.m +++ b/test/CodeGenObjC/2008-10-23-invalid-icmp.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @protocol P @end diff --git a/test/CodeGenObjC/PR4541.m b/test/CodeGenObjC/PR4541.m index 2d2adeb3d88e3..84218a968cc89 100644 --- a/test/CodeGenObjC/PR4541.m +++ b/test/CodeGenObjC/PR4541.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -o %t -w -g %s +// RUN: %clang_cc1 -o %t -w -g %s @class NSString; diff --git a/test/CodeGenObjC/PR4894-recursive-debug-crash.m b/test/CodeGenObjC/PR4894-recursive-debug-crash.m index 91ae9b3c870fb..5d2327ad274bb 100644 --- a/test/CodeGenObjC/PR4894-recursive-debug-crash.m +++ b/test/CodeGenObjC/PR4894-recursive-debug-crash.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -g -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -g -emit-llvm %s -o - | FileCheck %s // PR4894 // // This test is actually just making sure we can generate the debug info for the diff --git a/test/CodeGenObjC/attr-strong.c b/test/CodeGenObjC/attr-strong.c index ca83334494350..f1474bc93eb59 100644 --- a/test/CodeGenObjC/attr-strong.c +++ b/test/CodeGenObjC/attr-strong.c @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s struct s0 { void *a; diff --git a/test/CodeGenObjC/bitfield-1.m b/test/CodeGenObjC/bitfield-1.m index 107361f9975dc..978b3cc304037 100644 --- a/test/CodeGenObjC/bitfield-1.m +++ b/test/CodeGenObjC/bitfield-1.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang -cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s @interface Object - (id) alloc; diff --git a/test/CodeGenObjC/bitfield-ivar-metadata.m b/test/CodeGenObjC/bitfield-ivar-metadata.m index 52fd3098bacf6..9ab3fef302671 100644 --- a/test/CodeGenObjC/bitfield-ivar-metadata.m +++ b/test/CodeGenObjC/bitfield-ivar-metadata.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface INTF { diff --git a/test/CodeGenObjC/bitfield-ivar-offsets.m b/test/CodeGenObjC/bitfield-ivar-offsets.m index 2a8c31cde757d..e0eebe16e882b 100644 --- a/test/CodeGenObjC/bitfield-ivar-offsets.m +++ b/test/CodeGenObjC/bitfield-ivar-offsets.m @@ -1,5 +1,5 @@ // RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s && -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep -F '@"OBJC_IVAR_$_I0._b0" = global i64 0, section "__DATA, __objc_const", align 8' %t // RUN: grep -F '@"OBJC_IVAR_$_I0._b1" = global i64 0, section "__DATA, __objc_const", align 8' %t // RUN: grep -F '@"OBJC_IVAR_$_I0._b2" = global i64 1, section "__DATA, __objc_const", align 8' %t diff --git a/test/CodeGenObjC/blocks-1.m b/test/CodeGenObjC/blocks-1.m index c1b001b66306f..76bfd59e41d14 100644 --- a/test/CodeGenObjC/blocks-1.m +++ b/test/CodeGenObjC/blocks-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 +// RUN: %clang_cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 // RUN: grep "_Block_object_dispose" %t | count 6 // RUN: grep "__copy_helper_block_" %t | count 4 // RUN: grep "__destroy_helper_block_" %t | count 4 diff --git a/test/CodeGenObjC/blocks-2.m b/test/CodeGenObjC/blocks-2.m index 4949b45cddeee..15160cc52b063 100644 --- a/test/CodeGenObjC/blocks-2.m +++ b/test/CodeGenObjC/blocks-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 +// RUN: %clang_cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 // RUN: grep "objc_assign_strongCast" %t | count 2 // This should generate a strong cast. diff --git a/test/CodeGenObjC/blocks-3.m b/test/CodeGenObjC/blocks-3.m index 279f21a528224..d8379b9f9d14c 100644 --- a/test/CodeGenObjC/blocks-3.m +++ b/test/CodeGenObjC/blocks-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -fblocks -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -fblocks -o %t %s // RUN: grep 'object_assign' %t | count 11 // RUN: grep 'object_dispose' %t | count 29 diff --git a/test/CodeGenObjC/blocks.m b/test/CodeGenObjC/blocks.m index 536d158046b0b..6dc14107b7c7f 100644 --- a/test/CodeGenObjC/blocks.m +++ b/test/CodeGenObjC/blocks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -fblocks -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -fblocks -o %t %s // rdar://6676764 struct S { diff --git a/test/CodeGenObjC/category-super-class-meth.m b/test/CodeGenObjC/category-super-class-meth.m index 595d2af298577..6f02aff96de1b 100644 --- a/test/CodeGenObjC/category-super-class-meth.m +++ b/test/CodeGenObjC/category-super-class-meth.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface BASE + (int) BaseMeth; diff --git a/test/CodeGenObjC/class-getter-dotsyntax.m b/test/CodeGenObjC/class-getter-dotsyntax.m index 599e6e7154aa4..bc142ce0dbe7f 100644 --- a/test/CodeGenObjC/class-getter-dotsyntax.m +++ b/test/CodeGenObjC/class-getter-dotsyntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Test { } + (Test *)crash; diff --git a/test/CodeGenObjC/class-type.m b/test/CodeGenObjC/class-type.m index 45d7a8671ba7d..192a808327830 100644 --- a/test/CodeGenObjC/class-type.m +++ b/test/CodeGenObjC/class-type.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s @interface I0 { diff --git a/test/CodeGenObjC/compatibility-alias.m b/test/CodeGenObjC/compatibility-alias.m index aca2745159407..fcc53b841d59d 100644 --- a/test/CodeGenObjC/compatibility-alias.m +++ b/test/CodeGenObjC/compatibility-alias.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Int1 @end diff --git a/test/CodeGenObjC/constant-strings.m b/test/CodeGenObjC/constant-strings.m index 08d30ba20f84f..227694969bfe8 100644 --- a/test/CodeGenObjC/constant-strings.m +++ b/test/CodeGenObjC/constant-strings.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s -// RUN: clang -cc1 -fgnu-runtime -emit-llvm -o %t %s && grep NXConstantString %t | count 1 -// RUN: clang -cc1 -fgnu-runtime -fconstant-string-class NSConstantString -emit-llvm -o %t %s && grep NSConstantString %t | count 1 +// RUN: %clang_cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -fgnu-runtime -emit-llvm -o %t %s && grep NXConstantString %t | count 1 +// RUN: %clang_cc1 -fgnu-runtime -fconstant-string-class NSConstantString -emit-llvm -o %t %s && grep NSConstantString %t | count 1 id a = @"Hello World!"; diff --git a/test/CodeGenObjC/continuation-class.m b/test/CodeGenObjC/continuation-class.m index 9ee61028322e7..6f903a0d6ba2b 100644 --- a/test/CodeGenObjC/continuation-class.m +++ b/test/CodeGenObjC/continuation-class.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Object - (id)new; diff --git a/test/CodeGenObjC/deadcode_strip_used_var.m b/test/CodeGenObjC/deadcode_strip_used_var.m index 679d6da661018..01e6bd4feb331 100644 --- a/test/CodeGenObjC/deadcode_strip_used_var.m +++ b/test/CodeGenObjC/deadcode_strip_used_var.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 %s -emit-llvm -o %t -triple i386-apple-darwin10 +// RUN: %clang_cc1 %s -emit-llvm -o %t -triple i386-apple-darwin10 // RUN: grep "llvm.used" %t | count 1 -// RUN: clang -cc1 %s -emit-llvm -o %t -triple x86_64-apple-darwin10 +// RUN: %clang_cc1 %s -emit-llvm -o %t -triple x86_64-apple-darwin10 // RUN: grep "llvm.used" %t | count 1 diff --git a/test/CodeGenObjC/debug-info-linkagename.m b/test/CodeGenObjC/debug-info-linkagename.m index bace9db1b8242..2b10e2bd67b82 100644 --- a/test/CodeGenObjC/debug-info-linkagename.m +++ b/test/CodeGenObjC/debug-info-linkagename.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -g -S -o %t %s +// RUN: %clang_cc1 -g -S -o %t %s // RUN: not grep 001 %t @interface F diff --git a/test/CodeGenObjC/dot-syntax-1.m b/test/CodeGenObjC/dot-syntax-1.m index 96d4cdf4b5008..417bcb4b9dfe1 100644 --- a/test/CodeGenObjC/dot-syntax-1.m +++ b/test/CodeGenObjC/dot-syntax-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s int printf(const char *, ...); diff --git a/test/CodeGenObjC/dot-syntax.m b/test/CodeGenObjC/dot-syntax.m index 5a40fd8726d2c..6282ea491f503 100644 --- a/test/CodeGenObjC/dot-syntax.m +++ b/test/CodeGenObjC/dot-syntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s int printf(const char *, ...); diff --git a/test/CodeGenObjC/encode-test-1.m b/test/CodeGenObjC/encode-test-1.m index dd4867cfb79e6..af7ad26d2f4bc 100644 --- a/test/CodeGenObjC/encode-test-1.m +++ b/test/CodeGenObjC/encode-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "{Base=b2b3b4b5}" %t | count 1 // RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1 diff --git a/test/CodeGenObjC/encode-test-2.m b/test/CodeGenObjC/encode-test-2.m index 6c20c424058b9..9e1423755a79a 100644 --- a/test/CodeGenObjC/encode-test-2.m +++ b/test/CodeGenObjC/encode-test-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "@\\\22<X>\\\22" %t // RUN: grep -e "@\\\22<X><Y>\\\22" %t // RUN: grep -e "@\\\22<X><Y><Z>\\\22" %t diff --git a/test/CodeGenObjC/encode-test-3.m b/test/CodeGenObjC/encode-test-3.m index 3706ab6a26838..4b39cd718ea2f 100644 --- a/test/CodeGenObjC/encode-test-3.m +++ b/test/CodeGenObjC/encode-test-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "\^i" %t | count 1 // RUN: grep -e "\[0i\]" %t | count 1 diff --git a/test/CodeGenObjC/encode-test-4.m b/test/CodeGenObjC/encode-test-4.m index 149205cdecaa9..117e1733486ef 100644 --- a/test/CodeGenObjC/encode-test-4.m +++ b/test/CodeGenObjC/encode-test-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o - %s -O2 | grep "ret i32 1" +// RUN: %clang_cc1 -emit-llvm -o - %s -O2 | grep "ret i32 1" int a() { return @encode(int) == @encode(int); diff --git a/test/CodeGenObjC/encode-test-5.m b/test/CodeGenObjC/encode-test-5.m index a12d900589649..a27ffb7c5d1d3 100644 --- a/test/CodeGenObjC/encode-test-5.m +++ b/test/CodeGenObjC/encode-test-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=x86_64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-llvm -o %t %s // RUN: grep ji.00 %t | count 1 char *a = @encode(_Complex int); diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m index 060161d1a998d..9d1cf6cec3c42 100644 --- a/test/CodeGenObjC/encode-test.m +++ b/test/CodeGenObjC/encode-test.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "\^{Innermost=CC}" %t | count 1 // RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 // RUN: grep -e "{B1=#@c}" %t | count 1 diff --git a/test/CodeGenObjC/for-in.m b/test/CodeGenObjC/for-in.m index fab0ee47b501c..354ff32c0ef95 100644 --- a/test/CodeGenObjC/for-in.m +++ b/test/CodeGenObjC/for-in.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t void p(const char*, ...); diff --git a/test/CodeGenObjC/forward-class-impl-metadata.m b/test/CodeGenObjC/forward-class-impl-metadata.m index fae745b1ff840..0ab7a81664531 100644 --- a/test/CodeGenObjC/forward-class-impl-metadata.m +++ b/test/CodeGenObjC/forward-class-impl-metadata.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s @interface BASE { @private diff --git a/test/CodeGenObjC/hidden-visibility.m b/test/CodeGenObjC/hidden-visibility.m index e265e6f754e8b..5e08ef9d55d2b 100644 --- a/test/CodeGenObjC/hidden-visibility.m +++ b/test/CodeGenObjC/hidden-visibility.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fvisibility hidden -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fvisibility hidden -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck %s // CHECK: @"OBJC_IVAR_$_I.P" = hidden // CHECK: @"OBJC_CLASS_$_I" = hidden // CHECK: @"OBJC_METACLASS_$_I" = hidden diff --git a/test/CodeGenObjC/hidden.m b/test/CodeGenObjC/hidden.m index 502aaebb69643..0b77e736b903f 100644 --- a/test/CodeGenObjC/hidden.m +++ b/test/CodeGenObjC/hidden.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s __attribute__((visibility("hidden"))) @interface Hidden diff --git a/test/CodeGenObjC/id-isa-codegen.m b/test/CodeGenObjC/id-isa-codegen.m index 73b21b0c652de..89e992209071e 100644 --- a/test/CodeGenObjC/id-isa-codegen.m +++ b/test/CodeGenObjC/id-isa-codegen.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s typedef struct objc_class *Class; @@ -25,3 +25,12 @@ typedef struct objc_object { } @end + +// rdar 7470820 +static Class MyClass; + +Class Test(const void *inObject1) { + if(((id)inObject1)->isa == MyClass) + return ((id)inObject1)->isa; + return (id)0; +} diff --git a/test/CodeGenObjC/image-info.m b/test/CodeGenObjC/image-info.m index 8167ef68ca2e8..17f75319a0da8 100644 --- a/test/CodeGenObjC/image-info.m +++ b/test/CodeGenObjC/image-info.m @@ -1,2 +1,2 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin-10 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin-10 -emit-llvm -o %t %s // RUN: grep -F '@"\01L_OBJC_IMAGE_INFO" = internal constant [2 x i32] [i32 0, i32 16], section "__OBJC, __image_info,regular"' %t diff --git a/test/CodeGenObjC/implicit-objc_msgSend.m b/test/CodeGenObjC/implicit-objc_msgSend.m index 25d0b8f66984c..a21e869229a78 100644 --- a/test/CodeGenObjC/implicit-objc_msgSend.m +++ b/test/CodeGenObjC/implicit-objc_msgSend.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -F 'declare i8* @objc_msgSend(...)' %t typedef struct objc_selector *SEL; diff --git a/test/CodeGenObjC/implicit-property.m b/test/CodeGenObjC/implicit-property.m index 9d17d87451426..db1da314b9e65 100644 --- a/test/CodeGenObjC/implicit-property.m +++ b/test/CodeGenObjC/implicit-property.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s -// RUNX: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s +// RUNX: %clang_cc1 -emit-llvm -o %t %s @interface A -(void) setOk:(int)arg; diff --git a/test/CodeGenObjC/interface-layout-64.m b/test/CodeGenObjC/interface-layout-64.m index a8a7c63108639..2800b41c52469 100644 --- a/test/CodeGenObjC/interface-layout-64.m +++ b/test/CodeGenObjC/interface-layout-64.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s && // RUN: grep '@"OBJC_IVAR_$_I3._iv2" = global i64 8, section "__DATA, __objc_const", align 8' %t diff --git a/test/CodeGenObjC/interface.m b/test/CodeGenObjC/interface.m index 37efed0960503..17d56f7b1db42 100644 --- a/test/CodeGenObjC/interface.m +++ b/test/CodeGenObjC/interface.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -O3 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -O3 -emit-llvm -o %t %s // RUN: grep 'ret i32 385' %t void *alloca(); diff --git a/test/CodeGenObjC/ivar-layout-64-bitfields.m b/test/CodeGenObjC/ivar-layout-64-bitfields.m index 9a7d4aa8d3a6c..1b6a16b1b8be1 100644 --- a/test/CodeGenObjC/ivar-layout-64-bitfields.m +++ b/test/CodeGenObjC/ivar-layout-64-bitfields.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s @interface I { struct { diff --git a/test/CodeGenObjC/ivar-layout-64.m b/test/CodeGenObjC/ivar-layout-64.m index 833f6dd072455..60ce1dff57de8 100644 --- a/test/CodeGenObjC/ivar-layout-64.m +++ b/test/CodeGenObjC/ivar-layout-64.m @@ -1,5 +1,5 @@ // RUNX: llvm-gcc -m64 -fobjc-gc -emit-llvm -S -o %t %s && -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"A\\00"' %t // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t diff --git a/test/CodeGenObjC/ivar-layout-no-optimize.m b/test/CodeGenObjC/ivar-layout-no-optimize.m index 54c37e0ac0565..e7fd1301b8107 100644 --- a/test/CodeGenObjC/ivar-layout-no-optimize.m +++ b/test/CodeGenObjC/ivar-layout-no-optimize.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-gc -triple x86_64-apple-darwin -O0 -S %s -o %t-64.s +// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin -O0 -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s @interface NSObject { diff --git a/test/CodeGenObjC/ivars.m b/test/CodeGenObjC/ivars.m index 0f6e7ca91612e..fe178aba14bdc 100644 --- a/test/CodeGenObjC/ivars.m +++ b/test/CodeGenObjC/ivars.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s // rdar://6800926 @interface ITF { diff --git a/test/CodeGenObjC/link-errors.m b/test/CodeGenObjC/link-errors.m index 5ab66ae459502..a82f0ceaf76dc 100644 --- a/test/CodeGenObjC/link-errors.m +++ b/test/CodeGenObjC/link-errors.m @@ -1,8 +1,8 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s // RUN: grep '.lazy_reference .objc_class_name_A' %t | count 1 // RUN: grep '.lazy_reference .objc_class_name_Unknown' %t | count 1 // RUN: grep '.lazy_reference .objc_class_name_Protocol' %t | count 1 -// RUN: clang -cc1 -triple i386-apple-darwin9 -DWITH_IMPL -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -DWITH_IMPL -emit-llvm -o %t %s // RUN: grep '.lazy_reference .objc_class_name_Root' %t | count 1 @interface Root diff --git a/test/CodeGenObjC/message-arrays.m b/test/CodeGenObjC/message-arrays.m index 47d010f2f502e..3e8697fc93760 100644 --- a/test/CodeGenObjC/message-arrays.m +++ b/test/CodeGenObjC/message-arrays.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s void f0(id a) { // This should have an implicit cast diff --git a/test/CodeGenObjC/messages-2.m b/test/CodeGenObjC/messages-2.m index 55bc23324996a..2a6e3dcbbda3c 100644 --- a/test/CodeGenObjC/messages-2.m +++ b/test/CodeGenObjC/messages-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s int printf(const char *, ...); diff --git a/test/CodeGenObjC/messages.m b/test/CodeGenObjC/messages.m index 113486dde4520..5f77a8e327eb1 100644 --- a/test/CodeGenObjC/messages.m +++ b/test/CodeGenObjC/messages.m @@ -1,8 +1,8 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep "objc_msgSend" %t | count 6 -// RUN: clang -cc1 -fgnu-runtime -emit-llvm -o %t %s +// RUN: %clang_cc1 -fgnu-runtime -emit-llvm -o %t %s // RUN: grep "objc_msg_lookup" %t | count 6 -// RUN: clang -cc1 -fgnu-runtime -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fgnu-runtime -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep "objc_msg_lookup_sender" %t | count 6 typedef struct { diff --git a/test/CodeGenObjC/metadata-symbols-32.m b/test/CodeGenObjC/metadata-symbols-32.m index 4956cdb8e4c33..34cc83da315ae 100644 --- a/test/CodeGenObjC/metadata-symbols-32.m +++ b/test/CodeGenObjC/metadata-symbols-32.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s // RUNX: llvm-gcc -m32 -emit-llvm -S -o %t %s && // RUN: grep '@"\\01L_OBJC_CATEGORY_A_Cat" = internal global .*section "__OBJC,__category,regular,no_dead_strip", align 4' %t diff --git a/test/CodeGenObjC/metadata-symbols-64.m b/test/CodeGenObjC/metadata-symbols-64.m index 7a3e341a312ad..886d53a8287e7 100644 --- a/test/CodeGenObjC/metadata-symbols-64.m +++ b/test/CodeGenObjC/metadata-symbols-64.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s && // RUN: grep '@"OBJC_CLASS_$_A" = global' %t diff --git a/test/CodeGenObjC/metadata_symbols.m b/test/CodeGenObjC/metadata_symbols.m index 5d4841e366be8..dc65382e571f5 100644 --- a/test/CodeGenObjC/metadata_symbols.m +++ b/test/CodeGenObjC/metadata_symbols.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep '@"OBJC_METACLASS_$_A" = global .*section "__DATA, __objc_data", align 8' %t // RUN: grep '@"OBJC_CLASS_$_A" = global .*section "__DATA, __objc_data", align 8' %t @@ -10,7 +10,7 @@ // RUN: grep -F 'define internal void @"\01-[A im0]"' %t // RUN: grep -F 'define internal void @"\01-[A(Cat) im1]"' %t -// RUN: clang -cc1 -fobjc-nonfragile-abi -fvisibility hidden -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -fvisibility hidden -emit-llvm -o %t %s // RUN: grep '@"OBJC_METACLASS_$_A" = hidden global .*section "__DATA, __objc_data", align 8' %t // RUN: grep '@"OBJC_CLASS_$_A" = hidden global .*section "__DATA, __objc_data", align 8' %t diff --git a/test/CodeGenObjC/missing-atend-metadata.m b/test/CodeGenObjC/missing-atend-metadata.m index fd759e351029a..50e597c8d1a8b 100644 --- a/test/CodeGenObjC/missing-atend-metadata.m +++ b/test/CodeGenObjC/missing-atend-metadata.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s @interface I0 @end diff --git a/test/CodeGenObjC/nested-rethrow.m b/test/CodeGenObjC/nested-rethrow.m index dd7439def218a..627b913ab0672 100644 --- a/test/CodeGenObjC/nested-rethrow.m +++ b/test/CodeGenObjC/nested-rethrow.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s extern int printf(const char*, ...); diff --git a/test/CodeGenObjC/newproperty-nested-synthesis-1.m b/test/CodeGenObjC/newproperty-nested-synthesis-1.m index 3e8e5ba56e0c9..4831c22463b84 100644 --- a/test/CodeGenObjC/newproperty-nested-synthesis-1.m +++ b/test/CodeGenObjC/newproperty-nested-synthesis-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Object - (id) new; diff --git a/test/CodeGenObjC/no-category-class.m b/test/CodeGenObjC/no-category-class.m index 38ea739053faa..0bd999689dd18 100644 --- a/test/CodeGenObjC/no-category-class.m +++ b/test/CodeGenObjC/no-category-class.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s @interface NSObject @end diff --git a/test/CodeGenObjC/non-lazy-classes.m b/test/CodeGenObjC/non-lazy-classes.m index 0bca6401c9997..021db97de9fa1 100644 --- a/test/CodeGenObjC/non-lazy-classes.m +++ b/test/CodeGenObjC/non-lazy-classes.m @@ -1,5 +1,5 @@ // RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s && -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CLASS_$" = internal global \[1 x .*\] .*@"OBJC_CLASS_$_A".*, section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8' %t // RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CATEGORY_$" = internal global \[1 x .*\] .*@".01l_OBJC_$_CATEGORY_A_$_Cat".*, section "__DATA, __objc_nlcatlist, regular, no_dead_strip", align 8' %t diff --git a/test/CodeGenObjC/objc-align.m b/test/CodeGenObjC/objc-align.m index 785378ae5af81..ff3f2a0a9088c 100644 --- a/test/CodeGenObjC/objc-align.m +++ b/test/CodeGenObjC/objc-align.m @@ -1,7 +1,7 @@ // 32-bit // RUNX: llvm-gcc -m32 -emit-llvm -S -o %t %s && -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s // RUN: grep '@"\\01L_OBJC_CATEGORY_A_Cat" = internal global .*, section "__OBJC,__category,regular,no_dead_strip", align 4' %t // RUN: grep '@"\\01L_OBJC_CLASS_A" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t // RUN: grep '@"\\01L_OBJC_CLASS_C" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t @@ -14,7 +14,7 @@ // 64-bit -// RUNX: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s && +// RUNX: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s && // RUNX: grep '@"OBJC_CLASS_$_A" = global' %t && // RUNX: grep '@"OBJC_CLASS_$_C" = global' %t && // RUNX: grep '@"OBJC_METACLASS_$_A" = global' %t && diff --git a/test/CodeGenObjC/objc-assign-ivar.m b/test/CodeGenObjC/objc-assign-ivar.m index d54b8026414f6..aefe97d0f2a7d 100644 --- a/test/CodeGenObjC/objc-assign-ivar.m +++ b/test/CodeGenObjC/objc-assign-ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep -F '@objc_assign_ivar' %t | count 14 typedef struct { diff --git a/test/CodeGenObjC/objc-gc-aggr-assign.m b/test/CodeGenObjC/objc-gc-aggr-assign.m index 9ed6fdf0f04ea..e127242df2578 100644 --- a/test/CodeGenObjC/objc-gc-aggr-assign.m +++ b/test/CodeGenObjC/objc-gc-aggr-assign.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-gc -emit-llvm -o %t %s // RUN: grep objc_memmove_collectable %t | grep call | count 3 static int count; diff --git a/test/CodeGenObjC/objc-read-weak-byref.m b/test/CodeGenObjC/objc-read-weak-byref.m index 35854f234ef6e..1ddbcaffac6f7 100644 --- a/test/CodeGenObjC/objc-read-weak-byref.m +++ b/test/CodeGenObjC/objc-read-weak-byref.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -S %s -o %t-64.s +// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang -cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s @interface NSObject @@ -18,8 +18,8 @@ int main() { return 0; } -// CHECK-LP64: call _objc_read_weak -// CHECK-LP64: call _objc_read_weak +// CHECK-LP64: callq _objc_read_weak +// CHECK-LP64: callq _objc_read_weak // CHECK-LP32: call L_objc_read_weak // CHECK-LP32: call L_objc_read_weak diff --git a/test/CodeGenObjC/objc2-assign-global.m b/test/CodeGenObjC/objc2-assign-global.m index fab4f82f39ae1..ff3ecef72d8d7 100644 --- a/test/CodeGenObjC/objc2-assign-global.m +++ b/test/CodeGenObjC/objc2-assign-global.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep -F '@objc_assign_global' %t | count 26 @class NSObject; diff --git a/test/CodeGenObjC/objc2-ivar-assign.m b/test/CodeGenObjC/objc2-ivar-assign.m index 1d5b97316b8db..e50cc5b53729c 100644 --- a/test/CodeGenObjC/objc2-ivar-assign.m +++ b/test/CodeGenObjC/objc2-ivar-assign.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s // RUN: grep objc_assign_ivar %t | count 6 @interface I @end diff --git a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m index 2992cef1ed807..1ff2dd3d8de27 100644 --- a/test/CodeGenObjC/objc2-new-gc-api-strongcast.m +++ b/test/CodeGenObjC/objc2-new-gc-api-strongcast.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -fobjc-gc -emit-llvm -o %t %s // RUN: grep -F '@objc_assign_strongCast' %t | count 4 @interface DSATextSearch @end diff --git a/test/CodeGenObjC/objc2-no-strong-cast.m b/test/CodeGenObjC/objc2-no-strong-cast.m index 649c3e925e31c..0824f4086537a 100644 --- a/test/CodeGenObjC/objc2-no-strong-cast.m +++ b/test/CodeGenObjC/objc2-no-strong-cast.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface PDFViewPrivateVars { diff --git a/test/CodeGenObjC/objc2-no-write-barrier.m b/test/CodeGenObjC/objc2-no-write-barrier.m index 17d4e1046e46f..544c329c5e201 100644 --- a/test/CodeGenObjC/objc2-no-write-barrier.m +++ b/test/CodeGenObjC/objc2-no-write-barrier.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s // RUN: grep 'objc_assign' %t | count 0 typedef struct { diff --git a/test/CodeGenObjC/objc2-property-encode.m b/test/CodeGenObjC/objc2-property-encode.m index c5f68d2c5b0ec..0f18d6fe159bc 100644 --- a/test/CodeGenObjC/objc2-property-encode.m +++ b/test/CodeGenObjC/objc2-property-encode.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "T@\\\\22NSString\\\\22" %t @interface NSString @end diff --git a/test/CodeGenObjC/objc2-protocol-enc.m b/test/CodeGenObjC/objc2-protocol-enc.m index d8b86bc72ff78..0db0cb85bc265 100644 --- a/test/CodeGenObjC/objc2-protocol-enc.m +++ b/test/CodeGenObjC/objc2-protocol-enc.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s // RUN: grep -e "T@\\\22<X>\\\22" %t // RUN: grep -e "T@\\\22<X><Y>\\\22" %t // RUN: grep -e "T@\\\22<X><Y><Z>\\\22" %t diff --git a/test/CodeGenObjC/objc2-retain-codegen.m b/test/CodeGenObjC/objc2-retain-codegen.m index 2d49ef78d7cf8..2c3317a4854de 100644 --- a/test/CodeGenObjC/objc2-retain-codegen.m +++ b/test/CodeGenObjC/objc2-retain-codegen.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s @interface I0 { I0 *_f0; diff --git a/test/CodeGenObjC/objc2-strong-cast-1.m b/test/CodeGenObjC/objc2-strong-cast-1.m index ed083c9de9291..509f21a342ae7 100644 --- a/test/CodeGenObjC/objc2-strong-cast-1.m +++ b/test/CodeGenObjC/objc2-strong-cast-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s @interface I { __attribute__((objc_gc(strong))) int *i_IdocumentIDs; diff --git a/test/CodeGenObjC/objc2-strong-cast.m b/test/CodeGenObjC/objc2-strong-cast.m index e8cacd1d6fb0d..9ef463c0df100 100644 --- a/test/CodeGenObjC/objc2-strong-cast.m +++ b/test/CodeGenObjC/objc2-strong-cast.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-gc -emit-llvm -o %t %s @interface I { __attribute__((objc_gc(strong))) signed long *_documentIDs; diff --git a/test/CodeGenObjC/objc2-weak-assign.m b/test/CodeGenObjC/objc2-weak-assign.m index 41a76f0152eb9..42fa7738f44e6 100644 --- a/test/CodeGenObjC/objc2-weak-assign.m +++ b/test/CodeGenObjC/objc2-weak-assign.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s // RUN: grep -e "objc_assign_weak" %t | grep -e "call" | count 6 __weak id* x; diff --git a/test/CodeGenObjC/objc2-weak-compare.m b/test/CodeGenObjC/objc2-weak-compare.m index 346485a3668bf..cb8ca5ff4c077 100644 --- a/test/CodeGenObjC/objc2-weak-compare.m +++ b/test/CodeGenObjC/objc2-weak-compare.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s @interface PBXTarget { diff --git a/test/CodeGenObjC/objc2-weak-import-attribute.m b/test/CodeGenObjC/objc2-weak-import-attribute.m index b5bb87052e45b..946c79b5bcc5a 100644 --- a/test/CodeGenObjC/objc2-weak-import-attribute.m +++ b/test/CodeGenObjC/objc2-weak-import-attribute.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s __attribute__((weak_import)) @interface WeakRootClass @end diff --git a/test/CodeGenObjC/objc2-weak-ivar-debug.m b/test/CodeGenObjC/objc2-weak-ivar-debug.m index dc8ced1b0c315..a6fb7fa2751fa 100644 --- a/test/CodeGenObjC/objc2-weak-ivar-debug.m +++ b/test/CodeGenObjC/objc2-weak-ivar-debug.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s -// RUN: clang -cc1 -triple i386-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -g -emit-llvm -o - %s // rdar://7252252 @interface Loop { diff --git a/test/CodeGenObjC/objc2-weak-ivar.m b/test/CodeGenObjC/objc2-weak-ivar.m index bcdb25c03068f..cfe1e95952fec 100644 --- a/test/CodeGenObjC/objc2-weak-ivar.m +++ b/test/CodeGenObjC/objc2-weak-ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s @class NSObject; @interface Foo { diff --git a/test/CodeGenObjC/objc2-write-barrier-2.m b/test/CodeGenObjC/objc2-write-barrier-2.m index 35a812f9620c4..9a76c6eb8208c 100644 --- a/test/CodeGenObjC/objc2-write-barrier-2.m +++ b/test/CodeGenObjC/objc2-write-barrier-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep -F '@objc_assign_global' %t | count 7 // RUN: grep -F '@objc_assign_ivar' %t | count 5 // RUN: grep -F '@objc_assign_strongCast' %t | count 8 diff --git a/test/CodeGenObjC/objc2-write-barrier-3.m b/test/CodeGenObjC/objc2-write-barrier-3.m index ecb038586cacd..626083b1c42d5 100644 --- a/test/CodeGenObjC/objc2-write-barrier-3.m +++ b/test/CodeGenObjC/objc2-write-barrier-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fobjc-gc -emit-llvm -o %t %s // RUN: grep objc_assign_ivar %t | count 3 // RUN: grep objc_assign_strongCast %t | count 6 diff --git a/test/CodeGenObjC/objc2-write-barrier-4.m b/test/CodeGenObjC/objc2-write-barrier-4.m index 8b672cc6f0fa0..11b4ab4e96046 100644 --- a/test/CodeGenObjC/objc2-write-barrier-4.m +++ b/test/CodeGenObjC/objc2-write-barrier-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep objc_assign_global %t | count 3 // RUN: grep objc_assign_strongCast %t | count 2 diff --git a/test/CodeGenObjC/objc2-write-barrier-5.m b/test/CodeGenObjC/objc2-write-barrier-5.m index 8241af7b3026a..babe26d55a53e 100644 --- a/test/CodeGenObjC/objc2-write-barrier-5.m +++ b/test/CodeGenObjC/objc2-write-barrier-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep objc_assign_ivar %t | count 0 // RUN: grep objc_assign_strongCast %t | count 5 diff --git a/test/CodeGenObjC/objc2-write-barrier.m b/test/CodeGenObjC/objc2-write-barrier.m index 5877064cf3109..0934e0a46ac30 100644 --- a/test/CodeGenObjC/objc2-write-barrier.m +++ b/test/CodeGenObjC/objc2-write-barrier.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s // RUN: grep -F '@objc_assign_global' %t | count 21 // RUN: grep -F '@objc_assign_ivar' %t | count 11 diff --git a/test/CodeGenObjC/object-incr-decr-1.m b/test/CodeGenObjC/object-incr-decr-1.m index 7e1870e1e3460..6369076174b37 100644 --- a/test/CodeGenObjC/object-incr-decr-1.m +++ b/test/CodeGenObjC/object-incr-decr-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o %t +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o %t @interface Foo { diff --git a/test/CodeGenObjC/overloadable.m b/test/CodeGenObjC/overloadable.m index abf1e27e18b86..4fd1429f28271 100644 --- a/test/CodeGenObjC/overloadable.m +++ b/test/CodeGenObjC/overloadable.m @@ -1,5 +1,5 @@ // rdar://6657613 -// RUN: clang -cc1 -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t @class C; diff --git a/test/CodeGenObjC/predefined-expr.m b/test/CodeGenObjC/predefined-expr.m index f75eef320da18..772093bd8a0e1 100644 --- a/test/CodeGenObjC/predefined-expr.m +++ b/test/CodeGenObjC/predefined-expr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck %s // CHECK: @"__func__.-[Foo instanceTest1]" = private constant [21 x i8] c"-[Foo instanceTest1]\00" // CHECK: @"__func__.-[Foo instanceTest2:]" = private constant [22 x i8] c"-[Foo instanceTest2:]\00" diff --git a/test/CodeGenObjC/property-aggr-type.m b/test/CodeGenObjC/property-aggr-type.m index 263f76dda59c8..8ba87de3534a7 100644 --- a/test/CodeGenObjC/property-aggr-type.m +++ b/test/CodeGenObjC/property-aggr-type.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Object - (id) new; diff --git a/test/CodeGenObjC/property-agrr-getter.m b/test/CodeGenObjC/property-agrr-getter.m index a5c95c7fba6f0..2dd32bb4f3732 100644 --- a/test/CodeGenObjC/property-agrr-getter.m +++ b/test/CodeGenObjC/property-agrr-getter.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s typedef struct { unsigned f0; diff --git a/test/CodeGenObjC/property-complex.m b/test/CodeGenObjC/property-complex.m index 6d1b775408c95..59200eba0905c 100644 --- a/test/CodeGenObjC/property-complex.m +++ b/test/CodeGenObjC/property-complex.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm -S -o - %s -// RUN: clang -cc1 -triple x86_64-apple-darwin9 -emit-llvm -S -o - %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -S -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -S -o - %s @interface I0 { @public diff --git a/test/CodeGenObjC/property-getter-dot-syntax.m b/test/CodeGenObjC/property-getter-dot-syntax.m index 8d8ae90b35379..f22b0517735d3 100644 --- a/test/CodeGenObjC/property-getter-dot-syntax.m +++ b/test/CodeGenObjC/property-getter-dot-syntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @protocol NSObject - (void *)description; diff --git a/test/CodeGenObjC/property-incr-decr-1.m b/test/CodeGenObjC/property-incr-decr-1.m index f2660fe7a791e..d75c02eaa20f9 100644 --- a/test/CodeGenObjC/property-incr-decr-1.m +++ b/test/CodeGenObjC/property-incr-decr-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface Object - (id) new; diff --git a/test/CodeGenObjC/property-list-in-class.m b/test/CodeGenObjC/property-list-in-class.m index 2d753b2bbb0d4..a5d0dc851dc40 100644 --- a/test/CodeGenObjC/property-list-in-class.m +++ b/test/CodeGenObjC/property-list-in-class.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep -F 'l_OBJC_$_PROP_LIST_C2" = internal global %8 { i32 16, i32 3' %t @protocol P diff --git a/test/CodeGenObjC/property-setter-attr.m b/test/CodeGenObjC/property-setter-attr.m index 43f74fb07b43c..d155ca811af9e 100644 --- a/test/CodeGenObjC/property-setter-attr.m +++ b/test/CodeGenObjC/property-setter-attr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s +// RUN: %clang_cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s // RUN: grep -e "SiSetOtherThings:" %t @interface A diff --git a/test/CodeGenObjC/property.m b/test/CodeGenObjC/property.m index d4868245156ac..7160b16c447e3 100644 --- a/test/CodeGenObjC/property.m +++ b/test/CodeGenObjC/property.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s int printf(const char *, ...); diff --git a/test/CodeGenObjC/protocol-in-extended-class.m b/test/CodeGenObjC/protocol-in-extended-class.m index ce1d0f3cea39c..d2955b1e3a110 100644 --- a/test/CodeGenObjC/protocol-in-extended-class.m +++ b/test/CodeGenObjC/protocol-in-extended-class.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -S %s -o %t-64.s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -S %s -o %t-64.s // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s -// RUN: clang -cc1 -triple i386-apple-darwin -S %s -o %t-32.s +// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s @protocol MyProtocol diff --git a/test/CodeGenObjC/protocol-property-synth.m b/test/CodeGenObjC/protocol-property-synth.m index f59de81f8b377..8566949e5c943 100644 --- a/test/CodeGenObjC/protocol-property-synth.m +++ b/test/CodeGenObjC/protocol-property-synth.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s @interface BaseClass { id _delegate; diff --git a/test/CodeGenObjC/protocols-lazy.m b/test/CodeGenObjC/protocols-lazy.m index 7e4c45d398e19..2038e60c4e61a 100644 --- a/test/CodeGenObjC/protocols-lazy.m +++ b/test/CodeGenObjC/protocols-lazy.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s +// RUN: %clang_cc1 -emit-llvm -triple=i686-apple-darwin8 -o %t %s // RUNX: llvm-gcc -S -emit-llvm -o %t %s && // No object generated diff --git a/test/CodeGenObjC/protocols.m b/test/CodeGenObjC/protocols.m index 1e765df14bef3..0f24a1cd1fc10 100644 --- a/test/CodeGenObjC/protocols.m +++ b/test/CodeGenObjC/protocols.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm %s -o %t +// RUN: %clang_cc1 -emit-llvm %s -o %t void p(const char*, ...); diff --git a/test/CodeGenObjC/runtime-fns.m b/test/CodeGenObjC/runtime-fns.m index d5832bc878421..203d87fff0656 100644 --- a/test/CodeGenObjC/runtime-fns.m +++ b/test/CodeGenObjC/runtime-fns.m @@ -1,6 +1,6 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1 -// RUN: clang -cc1 -DWITHDEF -emit-llvm -o %t %s +// RUN: %clang_cc1 -DWITHDEF -emit-llvm -o %t %s // RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1 id objc_msgSend(int x); diff --git a/test/CodeGenObjC/sel-as-builtin-type.m b/test/CodeGenObjC/sel-as-builtin-type.m index 317c5d3ca97cb..72a8564e08888 100644 --- a/test/CodeGenObjC/sel-as-builtin-type.m +++ b/test/CodeGenObjC/sel-as-builtin-type.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // pr5025 // radar 7405040 diff --git a/test/CodeGenObjC/super-classmethod-category.m b/test/CodeGenObjC/super-classmethod-category.m index 64ba1419c0f4f..c19663cec45a6 100644 --- a/test/CodeGenObjC/super-classmethod-category.m +++ b/test/CodeGenObjC/super-classmethod-category.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface SUPER + (void)Meth; diff --git a/test/CodeGenObjC/super-dotsyntax-property.m b/test/CodeGenObjC/super-dotsyntax-property.m index 0f811040d5465..9dfde2d1de3ab 100644 --- a/test/CodeGenObjC/super-dotsyntax-property.m +++ b/test/CodeGenObjC/super-dotsyntax-property.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s @interface B { diff --git a/test/CodeGenObjC/super-message-fragileabi.m b/test/CodeGenObjC/super-message-fragileabi.m index ebb443b81aff7..5efc234dcafd7 100644 --- a/test/CodeGenObjC/super-message-fragileabi.m +++ b/test/CodeGenObjC/super-message-fragileabi.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s @class Some; diff --git a/test/CodeGenObjC/synchronized.m b/test/CodeGenObjC/synchronized.m index 8bb19142bdcde..1af82345e0bc1 100644 --- a/test/CodeGenObjC/synchronized.m +++ b/test/CodeGenObjC/synchronized.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -triple=i686-apple-darwin9 -o %t %s -O2 +// RUN: %clang_cc1 -emit-llvm -triple=i686-apple-darwin9 -o %t %s -O2 // RUN: grep 'ret i32' %t | count 1 // RUN: grep 'ret i32 1' %t | count 1 diff --git a/test/CodeGenObjC/synthesize_ivar-cont-class.m b/test/CodeGenObjC/synthesize_ivar-cont-class.m index fb61137df49df..f85320279bc4a 100644 --- a/test/CodeGenObjC/synthesize_ivar-cont-class.m +++ b/test/CodeGenObjC/synthesize_ivar-cont-class.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s // RUN: grep '@"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"' %t @interface XCOrganizerNodeInfo diff --git a/test/CodeGenObjC/synthesize_ivar.m b/test/CodeGenObjC/synthesize_ivar.m index ae21044a4ebe1..5dd90ab618bbd 100644 --- a/test/CodeGenObjC/synthesize_ivar.m +++ b/test/CodeGenObjC/synthesize_ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o %t %s @interface I @property int IP; diff --git a/test/CodeGenObjC/try.m b/test/CodeGenObjC/try.m index 01106a9c2101a..884e33a219c09 100644 --- a/test/CodeGenObjC/try.m +++ b/test/CodeGenObjC/try.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 %s -S -o - -triple=i686-apple-darwin9 -// RUN: clang -cc1 %s -S -o - -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 %s -S -o - -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -S -o - -triple=x86_64-apple-darwin9 // rdar://6757213 - Don't crash if the internal proto for // __objc_personality_v0 mismatches with an actual one. diff --git a/test/CodeGenObjC/undefined-protocol.m b/test/CodeGenObjC/undefined-protocol.m index c57f53dd0b61b..d87a5c999ee98 100644 --- a/test/CodeGenObjC/undefined-protocol.m +++ b/test/CodeGenObjC/undefined-protocol.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm-only -fgnu-runtime %s +// RUN: %clang_cc1 -emit-llvm-only -fgnu-runtime %s @protocol MadeUpProtocol; diff --git a/test/CodeGenObjC/unname-bf-metadata.m b/test/CodeGenObjC/unname-bf-metadata.m index 48d37f13ce70b..c1208c142ca32 100644 --- a/test/CodeGenObjC/unname-bf-metadata.m +++ b/test/CodeGenObjC/unname-bf-metadata.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s // Test that meta-data for ivar lists with unnamed bitfield are generated. // @interface Foo { diff --git a/test/CodeGenObjC/variadic-sends.m b/test/CodeGenObjC/variadic-sends.m index 1979e3fc293c7..ea13823bc719a 100644 --- a/test/CodeGenObjC/variadic-sends.m +++ b/test/CodeGenObjC/variadic-sends.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-32 %s -// RUN: clang -cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-32 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s @interface A -(void) im0; diff --git a/test/CodeGenObjC/x86_64-struct-return-gc.m b/test/CodeGenObjC/x86_64-struct-return-gc.m new file mode 100644 index 0000000000000..32a321c0b7d01 --- /dev/null +++ b/test/CodeGenObjC/x86_64-struct-return-gc.m @@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o - %s | FileCheck %s +struct Coerce { + id a; +}; + +struct Coerce coerce_func(void); + +// CHECK: define void @Coerce_test() +void Coerce_test(void) { + struct Coerce c; + + // CHECK: call i64 @coerce_func + // CHECK: call i8* @objc_memmove_collectable( + c = coerce_func(); +} + +struct Indirect { + id a; + int b[10]; +}; + +struct Indirect indirect_func(void); + +// CHECK: define void @Indirect_test() +void Indirect_test(void) { + struct Indirect i; + + // CHECK: call void @indirect_func(%struct.Indirect* noalias sret + // CHECK: call i8* @objc_memmove_collectable( + i = indirect_func(); +} diff --git a/test/CodeGenObjCXX/mangle.mm b/test/CodeGenObjCXX/mangle.mm index 90d2407838ad7..d277c4e51581b 100644 --- a/test/CodeGenObjCXX/mangle.mm +++ b/test/CodeGenObjCXX/mangle.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s // CHECK: @"_ZZ11+[A shared]E1a" = internal global // CHECK: @"_ZZ11-[A(Foo) f]E1a" = internal global diff --git a/test/Coverage/ast-printing.c b/test/Coverage/ast-printing.c index 640dc29f394e6..182bd4d1b25a9 100644 --- a/test/Coverage/ast-printing.c +++ b/test/Coverage/ast-printing.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -fsyntax-only %s -// RUN: clang-cc -ast-print %s -// RUN: clang-cc -ast-dump %s -// RUN: clang-cc -ast-print-xml -o %t %s +// RUN: %clang_cc1 -fsyntax-only %s +// RUN: %clang_cc1 -ast-print %s +// RUN: %clang_cc1 -ast-dump %s +// RUN: %clang_cc1 -ast-print-xml -o %t %s #include "c-language-features.inc" diff --git a/test/Coverage/ast-printing.cpp b/test/Coverage/ast-printing.cpp index d627fca3522e6..e86e799a8f6ef 100644 --- a/test/Coverage/ast-printing.cpp +++ b/test/Coverage/ast-printing.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -fsyntax-only %s -// RUN: clang-cc -ast-print %s -// RUN: clang-cc -ast-dump %s -// FIXME: clang-cc -ast-print-xml -o %t %s +// RUN: %clang_cc1 -fsyntax-only %s +// RUN: %clang_cc1 -ast-print %s +// RUN: %clang_cc1 -ast-dump %s +// FIXME: %clang_cc1 -ast-print-xml -o %t %s #include "cxx-language-features.inc" diff --git a/test/Coverage/ast-printing.m b/test/Coverage/ast-printing.m index a864e2d72b881..d9c97d43d4638 100644 --- a/test/Coverage/ast-printing.m +++ b/test/Coverage/ast-printing.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -fsyntax-only %s -// RUN: clang -cc1 -ast-print %s -// RUN: clang -cc1 -ast-dump %s +// RUN: %clang_cc1 -fsyntax-only %s +// RUN: %clang_cc1 -ast-print %s +// RUN: %clang_cc1 -ast-dump %s #include "objc-language-features.inc" diff --git a/test/Coverage/codegen-gnu.m b/test/Coverage/codegen-gnu.m index 194809261458a..6e7790dc5a702 100644 --- a/test/Coverage/codegen-gnu.m +++ b/test/Coverage/codegen-gnu.m @@ -1,3 +1,3 @@ -// RUN: clang -cc1 -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s #include "objc-language-features.inc" diff --git a/test/Coverage/codegen-next.m b/test/Coverage/codegen-next.m index d78f93e61d2d7..978b443f0fa66 100644 --- a/test/Coverage/codegen-next.m +++ b/test/Coverage/codegen-next.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -emit-llvm -o %t %s -// RUN: clang -cc1 -g -emit-llvm -o %t %s +// RUN: %clang_cc1 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -emit-llvm -o %t %s #include "objc-language-features.inc" diff --git a/test/Coverage/codegen.c b/test/Coverage/codegen.c index f1d7fcc88672b..8e5195cc39efb 100644 --- a/test/Coverage/codegen.c +++ b/test/Coverage/codegen.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm-bc -o %t %s -// RUN: clang-cc -triple i386-unknown-unknown -g -emit-llvm-bc -o %t %s -// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm-bc -o %t %s -// RUN: clang-cc -triple x86_64-unknown-unknown -g -emit-llvm-bc -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o %t %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -g -emit-llvm-bc -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm-bc -o %t %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -g -emit-llvm-bc -o %t %s #include "c-language-features.inc" diff --git a/test/Coverage/html-diagnostics.c b/test/Coverage/html-diagnostics.c index 3079632e1205a..6971f58f6aa4d 100644 --- a/test/Coverage/html-diagnostics.c +++ b/test/Coverage/html-diagnostics.c @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: clang-cc -analyze -analyzer-output=html -checker-cfref -o %t %s +// RUN: %clang_cc1 -analyze -analyzer-output=html -checker-cfref -o %t %s // RUN: cat %t/*.html | FileCheck %s // CHECK: <h3>Annotated Source Code</h3> diff --git a/test/Coverage/html-print.c b/test/Coverage/html-print.c index dab156b145a84..a3f29c6f36f86 100644 --- a/test/Coverage/html-print.c +++ b/test/Coverage/html-print.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-html -o %t %s +// RUN: %clang_cc1 -emit-html -o %t %s #include "c-language-features.inc" diff --git a/test/Coverage/parse-callbacks.c b/test/Coverage/parse-callbacks.c index e29b38bd0d26f..02f3a8374bc70 100644 --- a/test/Coverage/parse-callbacks.c +++ b/test/Coverage/parse-callbacks.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -parse-noop %s -// RUN: clang-cc -parse-print-callbacks %s +// RUN: %clang_cc1 -parse-noop %s +// RUN: %clang_cc1 -parse-print-callbacks %s #include "c-language-features.inc" diff --git a/test/Coverage/parse-callbacks.m b/test/Coverage/parse-callbacks.m index 7666d19432d38..f023d3d0648b7 100644 --- a/test/Coverage/parse-callbacks.m +++ b/test/Coverage/parse-callbacks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -parse-noop %s -// RUN: clang -cc1 -parse-print-callbacks %s +// RUN: %clang_cc1 -parse-noop %s +// RUN: %clang_cc1 -parse-print-callbacks %s #include "objc-language-features.inc" diff --git a/test/Coverage/targets.c b/test/Coverage/targets.c index 23990e06d3931..c9f6f8d88d593 100644 --- a/test/Coverage/targets.c +++ b/test/Coverage/targets.c @@ -1,22 +1,22 @@ -// RUN: clang-cc -g -triple armv6-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple armv6-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple bfin-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple i686-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple i686-pc-linux-gnu -emit-llvm -o %t %s -// RUN: clang-cc -g -triple i686-unknown-dragonfly -emit-llvm -o %t %s -// RUN: clang-cc -g -triple i686-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple i686-unknown-win32 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple pic16-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple powerpc-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple powerpc-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple powerpc64-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple powerpc64-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple sparc-unknown-solaris -emit-llvm -o %t %s -// RUN: clang-cc -g -triple sparc-unknown-unknown -emit-llvm -o %t %s -// RUN: clang-cc -g -triple x86_64-apple-darwin9 -emit-llvm -o %t %s -// RUN: clang-cc -g -triple x86_64-pc-linux-gnu -emit-llvm -o %t %s -// RUN: clang-cc -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple armv6-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple armv6-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple bfin-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple i686-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple i686-unknown-dragonfly -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple i686-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple i686-unknown-win32 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple pic16-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple powerpc-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple powerpc-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple powerpc64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple powerpc64-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple sparc-unknown-solaris -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple sparc-unknown-unknown -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple x86_64-apple-darwin9 -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple x86_64-pc-linux-gnu -emit-llvm -o %t %s +// RUN: %clang_cc1 -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s // <rdar://problem/7181838> clang 1.0 fails to compile Python 2.6 -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4 +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4 diff --git a/test/Coverage/verbose.c b/test/Coverage/verbose.c index a75557b3fdee8..72451d4620c12 100644 --- a/test/Coverage/verbose.c +++ b/test/Coverage/verbose.c @@ -1 +1 @@ -// RUN: clang-cc -fsyntax-only -v %s +// RUN: %clang_cc1 -fsyntax-only -v %s diff --git a/test/Driver/Xarch.c b/test/Driver/Xarch.c index ba6f5c63d4d4b..b35bf6c92dffc 100644 --- a/test/Driver/Xarch.c +++ b/test/Driver/Xarch.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log // RUN: grep ' "-O2" ' %t.log | count 1 -// RUN: clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log // RUN: grep ' "-O2" ' %t.log | count 0 // RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log -// RUN: not clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log +// RUN: not %clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log // RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2 // RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log diff --git a/test/Driver/analyze.c b/test/Driver/analyze.c index bdbfbbfd88dd2..2f850bc73ddee 100644 --- a/test/Driver/analyze.c +++ b/test/Driver/analyze.c @@ -1,7 +1,7 @@ // Verify that the analyzer gets the same flags as normal compilation // (at least for a few key ones). -// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 %clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log // RUN: FileCheck --input-file=%t.log %s // CHECK: "-analyze" diff --git a/test/Driver/arm-darwin-builtin.c b/test/Driver/arm-darwin-builtin.c index 63cf34332ae1f..9d4cee0f05e31 100644 --- a/test/Driver/arm-darwin-builtin.c +++ b/test/Driver/arm-darwin-builtin.c @@ -8,7 +8,7 @@ // RUX: not grep -- "-fno-builtin-strcat" %t && // RUX: not grep -- "-fno-builtin-strcpy" %t && -// RUN: clang -ccc-no-clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t +// RUN: %clang -ccc-no-clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t // RUN: not grep -- "-fno-builtin-strcat" %t // RUN: not grep -- "-fno-builtin-strcpy" %t diff --git a/test/Driver/ast.c b/test/Driver/ast.c index fd38c108b0514..6e5857fba5e32 100644 --- a/test/Driver/ast.c +++ b/test/Driver/ast.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t // RUN: echo 'END' >> %t // RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s @@ -10,7 +10,7 @@ // EMIT-AST-PHASES: END // RUN: touch %t.ast -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t // RUN: echo 'END' >> %t // RUN: FileCheck -check-prefix COMPILE-AST-PHASES -input-file %t %s diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c index 41d6a7ced1759..2271ab5c64591 100644 --- a/test/Driver/bindings.c +++ b/test/Driver/bindings.c @@ -1,54 +1,54 @@ // Basic binding. -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings %s 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t // RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t // RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2> %t // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: ".*\.s"' %t // RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t // RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2> %t // RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t // RUN: grep '"gcc::Compile", inputs: \[".*\.i"\], output: ".*\.s"' %t // RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t // RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t // RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t // RUN: grep '"gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t // RUN: grep '"gcc::Assemble", inputs: \[(pipe)\], output: ".*\.o"' %t // RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %t // RUN: grep '"gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*bindings.c.gch' %t // Clang control options -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2> %t // RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t // RUN: grep '"clang", inputs: \[".*\.i"\], output: (nothing)' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2> %t +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t -// RUN: clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t +// RUN: %clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t -// RUN: clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t +// RUN: %clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t // Darwin bindings -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings %s 2> %t +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-bindings %s 2> %t // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t // RUN: grep '"darwin::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t // RUN: grep '"darwin::Link", inputs: \[".*\.o"\], output: "a.out"' %t diff --git a/test/Driver/ccc-add-args.c b/test/Driver/ccc-add-args.c index afd9bd6f7650e..d9a16cbfb4605 100644 --- a/test/Driver/ccc-add-args.c +++ b/test/Driver/ccc-add-args.c @@ -1,4 +1,4 @@ -// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" clang -### 2>&1 | FileCheck %s +// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" %clang -### 2>&1 | FileCheck %s // CHECK: Option 0 - Name: "-ccc-echo", Values: {} // CHECK: Option 1 - Name: "-ccc-print-options", Values: {} // CHECK: Option 2 - Name: "-v", Values: {} diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c index 762ebb7944b22..2464f03b7a1e0 100644 --- a/test/Driver/clang-translation.c +++ b/test/Driver/clang-translation.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log // RUN: grep '"-triple" "i386-unknown-unknown"' %t.log // RUN: grep '"-S"' %t.log // RUN: grep '"-disable-free"' %t.log @@ -9,12 +9,12 @@ // RUN: grep '"-o" .*clang-translation.*' %t.log // RUN: grep '"-masm-verbose"' %t.log // RUN: grep '"-fvisibility" "hidden"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log -// RUN: grep '"-mcpu" "yonah"' %t.log -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log -// RUN: grep '"-mcpu" "core2"' %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"-target-cpu" "yonah"' %t.log +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"-target-cpu" "core2"' %t.log -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log // ARMV7_DEFAULT: clang @@ -24,7 +24,7 @@ // ARMV7_DEFAULT-NOT: "-msoft-float" // ARMV7_DEFAULT: "-x" "c" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 -msoft-float // RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log // ARMV7_SOFTFLOAT: clang @@ -33,7 +33,7 @@ // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft" // ARMV7_SOFTFLOAT: "-x" "c" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 -mhard-float // RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log // ARMV7_HARDFLOAT: clang diff --git a/test/Driver/clang_cpp.c b/test/Driver/clang_cpp.c index 8638465e3a2fb..79b2f55131566 100644 --- a/test/Driver/clang_cpp.c +++ b/test/Driver/clang_cpp.c @@ -1,4 +1,4 @@ // Verify that -include isn't included twice with -save-temps. -// RUN: clang -S -o - %s -include %t.h -save-temps -### 2> %t.log +// RUN: %clang -S -o - %s -include %t.h -save-temps -### 2> %t.log // RUN: grep '"-include' %t.log | count 1 diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c index 66853422dd1d6..c4ea430fdf31a 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -1,6 +1,6 @@ -// RUN: clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s -// RUN: clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s -// RUN: clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s +// RUN: %clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s +// RUN: %clang -### -S -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s +// RUN: %clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s // CHECK-OPTIONS1: -fblocks // CHECK-OPTIONS1: -fpascal-strings diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp index e5b69c118fb37..e349691d423b7 100644 --- a/test/Driver/cxx-pth.cpp +++ b/test/Driver/cxx-pth.cpp @@ -1,12 +1,12 @@ // Test forced PTH for CXX support. -// RUN: clang -x c++-header %s -### 2> %t.log +// RUN: %clang -x c++-header %s -### 2> %t.log // RUN: FileCheck -check-prefix EMIT -input-file %t.log %s // EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp" // RUN: touch %t.h.gch -// RUN: clang -E -include %t.h %s -### 2> %t.log +// RUN: %clang -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix USE -input-file %t.log %s // USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp" diff --git a/test/Driver/darwin-arm.c b/test/Driver/darwin-arm.c index 8b4c23d55724d..330918dd47d02 100644 --- a/test/Driver/darwin-arm.c +++ b/test/Driver/darwin-arm.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch arm -print-search-dirs | FileCheck %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch arm -print-search-dirs | FileCheck %s // Check that we look in the relative libexec directory. // CHECK: {{programs: =.*/../libexec:}} diff --git a/test/Driver/darwin-as.c b/test/Driver/darwin-as.c index 26e59a5ef6701..6410df0856377 100644 --- a/test/Driver/darwin-as.c +++ b/test/Driver/darwin-as.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t +// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t // RUN: FileCheck -check-prefix=STATIC_AND_DYNAMIC-32 --input-file %t %s // CHECK-STATIC_AND_DYNAMIC-32: as{{(.exe)?}}" "-arch" "i386" "-force_cpusubtype_ALL" "-static" "-o" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t // RUN: FileCheck -check-prefix=STATIC-64 --input-file %t %s // CHECK-STATIC-64: as{{(.exe)?}}" "-arch" "x86_64" "-force_cpusubtype_ALL" "-o" diff --git a/test/Driver/darwin-cc.c b/test/Driver/darwin-cc.c index 1f4335855b02d..7a3a378f89a03 100644 --- a/test/Driver/darwin-cc.c +++ b/test/Driver/darwin-cc.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-no-clang -ccc-host-triple i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log +// RUN: %clang -ccc-no-clang -ccc-host-triple i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log // RUN: grep ' ".*cc1" "-E" "-nostdinc" "-v" "-I" "ARG0" "-F" "ARG1" "-I" "ARG2" "-P" "-MD" "/tmp/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "/tmp/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"' %t.log // RUN: grep ' ".*cc1" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-aFOO" "-auxbase-strip" "/tmp/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "/tmp/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"' %t.log diff --git a/test/Driver/darwin-debug-flags.c b/test/Driver/darwin-debug-flags.c new file mode 100644 index 0000000000000..7ce61378413ae --- /dev/null +++ b/test/Driver/darwin-debug-flags.c @@ -0,0 +1,11 @@ +// RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s +// <rdar://problem/7256886> + +// CHECK: !1 = metadata !{ +// CHECK: -cc1 +// CHECK: -triple i386-apple-darwin9 +// CHECK: -g +// CHECK: -Os +// CHECK: [ DW_TAG_compile_unit ] + +int x; diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c index 04f35be09f1db..de751a67d9655 100644 --- a/test/Driver/darwin-ld.c +++ b/test/Driver/darwin-ld.c @@ -1,26 +1,26 @@ // Check that ld gets arch_multiple. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log // RUN: grep '".*ld.*" .*"-arch_multiple" "-final_output" "foo"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO -static 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO -static 2> %t.log // RUN: grep '"-lcrt0.o" .*"-lgcc_static"' %t.log // RUN: grep '"-lgcc"' %t.log | count 0 -// RUN: clang -ccc-host-triple i386-apple-darwin7 -### -filelist FOO 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin7 -### -filelist FOO 2> %t.log // RUN: grep '"-lcrt1.o" .*"-lgcc" "-lSystem"' %t.log // RUN: grep '"-lgcc_s"' %t.log | count 0 -// RUN: clang -ccc-host-triple i386-apple-darwin8 -### -filelist FOO 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin8 -### -filelist FOO 2> %t.log // RUN: grep '"-lcrt1.o" .*"-lgcc_s.10.4" "-lgcc" "-lSystem"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO 2> %t.log // RUN: grep '"-lcrt1.10.5.o" .*"-lgcc_s.10.5" "-lgcc" "-lSystem"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -filelist FOO 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -filelist FOO 2> %t.log // RUN: grep '"-lcrt1.10.6.o" .*"-lSystem" "-lgcc"' %t.log // RUN: grep '"-lgcc_s"' %t.log | count 0 // Make sure we run dsymutil on source input files. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g %s -o BAR 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -g %s -o BAR 2> %t.log // RUN: grep '".*dsymutil" "BAR"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log // RUN: grep '".*dsymutil" "BAR"' %t.log // Splatter test case. This is gross, but it works for now. For the @@ -32,11 +32,11 @@ // // Note that at conception, this exactly matches gcc. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -A ARG0 -F ARG1 -L ARG2 -Mach -T ARG4 -X -Z -all_load -allowable_client ARG8 -bind_at_load -compatibility_version ARG11 -current_version ARG12 -d -dead_strip -dylib_file ARG14 -dylinker -dylinker_install_name ARG16 -dynamic -dynamiclib -e ARG19 -exported_symbols_list ARG20 -fexceptions -flat_namespace -fnested-functions -fopenmp -force_cpusubtype_ALL -fpie -fprofile-arcs -headerpad_max_install_names -image_base ARG29 -init ARG30 -install_name ARG31 -m ARG33 -miphoneos-version-min=2.0 -mmacosx-version-min=10.3.2 -multi_module -multiply_defined ARG37 -multiply_defined_unused ARG38 -no_dead_strip_inits_and_terms -nodefaultlibs -nofixprebinding -nomultidefs -noprebind -noseglinkedit -nostartfiles -nostdlib -pagezero_size ARG54 -pg -prebind -prebind_all_twolevel_modules -preload -r -read_only_relocs ARG55 -s -sectalign ARG57_0 ARG57_1 ARG57_2 -sectcreate ARG58_0 ARG58_1 ARG58_2 -sectobjectsymbols ARG59_0 ARG59_1 -sectorder ARG60_0 ARG60_1 ARG60_2 -seg1addr ARG61 -seg_addr_table ARG62 -seg_addr_table_filename ARG63 -segaddr ARG64_0 ARG64_1 -segcreate ARG65_0 ARG65_1 ARG65_2 -seglinkedit -segprot ARG67_0 ARG67_1 ARG67_2 -segs_read_FOO -segs_read_only_addr ARG69 -segs_read_write_addr ARG70 -shared-libgcc -single_module -static -static-libgcc -sub_library ARG77 -sub_umbrella ARG78 -t -twolevel_namespace -twolevel_namespace_hints -u ARG82 -umbrella ARG83 -undefined ARG84 -unexported_symbols_list ARG85 -w -weak_reference_mismatches ARG87 -whatsloaded -whyload -y -filelist FOO 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -A ARG0 -F ARG1 -L ARG2 -Mach -T ARG4 -X -Z -all_load -allowable_client ARG8 -bind_at_load -compatibility_version ARG11 -current_version ARG12 -d -dead_strip -dylib_file ARG14 -dylinker -dylinker_install_name ARG16 -dynamic -dynamiclib -e ARG19 -exported_symbols_list ARG20 -fexceptions -flat_namespace -fnested-functions -fopenmp -force_cpusubtype_ALL -fpie -fprofile-arcs -headerpad_max_install_names -image_base ARG29 -init ARG30 -install_name ARG31 -m ARG33 -miphoneos-version-min=2.0 -mmacosx-version-min=10.3.2 -multi_module -multiply_defined ARG37 -multiply_defined_unused ARG38 -no_dead_strip_inits_and_terms -nodefaultlibs -nofixprebinding -nomultidefs -noprebind -noseglinkedit -nostartfiles -nostdlib -pagezero_size ARG54 -pg -prebind -prebind_all_twolevel_modules -preload -r -read_only_relocs ARG55 -s -sectalign ARG57_0 ARG57_1 ARG57_2 -sectcreate ARG58_0 ARG58_1 ARG58_2 -sectobjectsymbols ARG59_0 ARG59_1 -sectorder ARG60_0 ARG60_1 ARG60_2 -seg1addr ARG61 -seg_addr_table ARG62 -seg_addr_table_filename ARG63 -segaddr ARG64_0 ARG64_1 -segcreate ARG65_0 ARG65_1 ARG65_2 -seglinkedit -segprot ARG67_0 ARG67_1 ARG67_2 -segs_read_FOO -segs_read_only_addr ARG69 -segs_read_write_addr ARG70 -shared-libgcc -single_module -static -static-libgcc -sub_library ARG77 -sub_umbrella ARG78 -t -twolevel_namespace -twolevel_namespace_hints -u ARG82 -umbrella ARG83 -undefined ARG84 -unexported_symbols_list ARG85 -w -weak_reference_mismatches ARG87 -whatsloaded -whyload -y -filelist FOO 2> %t.log // RUN: grep '".*ld.*" "-static" "-dylib" "-dylib_compatibility_version" "ARG11" "-dylib_current_version" "ARG12" "-arch" "i386" "-dylib_install_name" "ARG31" "-all_load" "-allowable_client" "ARG8" "-bind_at_load" "-dead_strip" "-no_dead_strip_inits_and_terms" "-dylib_file" "ARG14" "-dynamic" "-exported_symbols_list" "ARG20" "-flat_namespace" "-headerpad_max_install_names" "-image_base" "ARG29" "-init" "ARG30" "-macosx_version_min" "10.3.2" "-iphoneos_version_min" "2.0" "-nomultidefs" "-multi_module" "-single_module" "-multiply_defined" "ARG37" "-multiply_defined_unused" "ARG38" "-pie" "-prebind" "-noprebind" "-nofixprebinding" "-prebind_all_twolevel_modules" "-read_only_relocs" "ARG55" "-sectcreate" "ARG58_0" "ARG58_1" "ARG58_2" "-sectorder" "ARG60_0" "ARG60_1" "ARG60_2" "-seg1addr" "ARG61" "-segprot" "ARG67_0" "ARG67_1" "ARG67_2" "-segaddr" "ARG64_0" "ARG64_1" "-segs_read_only_addr" "ARG69" "-segs_read_write_addr" "ARG70" "-seg_addr_table" "ARG62" "-seg_addr_table_filename" "ARG63" "-sub_library" "ARG77" "-sub_umbrella" "ARG78" "-twolevel_namespace" "-twolevel_namespace_hints" "-umbrella" "ARG83" "-undefined" "ARG84" "-unexported_symbols_list" "ARG85" "-weak_reference_mismatches" "ARG87" "-X" "-y" "-w" "-pagezero_size" "ARG54" "-segs_read_FOO" "-seglinkedit" "-noseglinkedit" "-sectalign" "ARG57_0" "ARG57_1" "ARG57_2" "-sectobjectsymbols" "ARG59_0" "ARG59_1" "-segcreate" "ARG65_0" "ARG65_1" "ARG65_2" "-whyload" "-whatsloaded" "-dylinker_install_name" "ARG16" "-dylinker" "-Mach" "-d" "-s" "-t" "-Z" "-u" "ARG82" "-undefined" "ARG84" "-A" "ARG0" "-e" "ARG19" "-m" "ARG33" "-r" "-o" "a.out" "-L" "ARG2" "-lgomp" "-L/usr/lib/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../../i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../.." "-filelist" "FOO" "-lgcov" "-allow_stack_execute" "-T" "ARG4" "-F" "ARG1"' %t.log // Don't run dsymutil on a fat build of an executable. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -arch i386 -arch x86_64 -g %s 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -arch i386 -arch x86_64 -g %s 2> %t.log // RUN: grep dsymutil %t.log | count 0 diff --git a/test/Driver/darwin-version.c b/test/Driver/darwin-version.c index dd6905a589616..e69a8447c4a7c 100644 --- a/test/Driver/darwin-version.c +++ b/test/Driver/darwin-version.c @@ -1,4 +1,4 @@ -// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 clang -ccc-host-triple i386-apple-darwin9 -E %s +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 %clang -ccc-host-triple i386-apple-darwin9 -E %s #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010 #error Invalid version diff --git a/test/Driver/default-toolchain.c b/test/Driver/default-toolchain.c index 9cebdfe581fef..eeff7637b20eb 100644 --- a/test/Driver/default-toolchain.c +++ b/test/Driver/default-toolchain.c @@ -1,8 +1,8 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t // RUN: grep 'Target: x86_64-unknown-unknown' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t // RUN: grep 'Target: powerpc64-apple-darwin9' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t // RUN: grep 'Target: powerpc-apple-darwin9' %t diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c index 2eb3b1808ee8d..d7b954d586d7e 100644 --- a/test/Driver/dragonfly.c +++ b/test/Driver/dragonfly.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log +// RUN: %clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log // RUN: FileCheck -input-file %t.log %s // CHECK: clang{{.*}}" "-cc1" "-triple" "amd64-pc-dragonfly" diff --git a/test/Driver/emit-llvm.c b/test/Driver/emit-llvm.c index 27007c68c2fe4..3439b58d85d7a 100644 --- a/test/Driver/emit-llvm.c +++ b/test/Driver/emit-llvm.c @@ -1,3 +1,13 @@ -// RUN: not clang -ccc-host-triple i386-pc-linux-gnu -emit-llvm -o %t %s 2> %t.log +// RUN: not %clang -ccc-host-triple i386-pc-linux-gnu -emit-llvm -o %t %s 2> %t.log // RUN: grep 'unable to pass LLVM bit-code files to linker' %t.log +// Check that -O4 is only honored as the effective -O option. +// <rdar://problem/7046672> clang/loader problem + +// RUN: %clang -ccc-print-phases -c -O4 -O0 %s 2> %t +// RUN: FileCheck --check-prefix=O4_AND_O0 %s < %t + +// O4_AND_O0: 0: input, "{{.*}}", c +// O4_AND_O0: 1: preprocessor, {0}, cpp-output +// O4_AND_O0: 2: compiler, {1}, assembler +// O4_AND_O0: 3: assembler, {2}, object diff --git a/test/Driver/flags.c b/test/Driver/flags.c index bc50aae338700..6d80892da65a0 100644 --- a/test/Driver/flags.c +++ b/test/Driver/flags.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log | count 0 -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index 9700540f46bb4..3deee46f9a010 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log +// RUN: %clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log // RUN: cat %t.log // RUN: FileCheck -input-file %t.log %s diff --git a/test/Driver/hello.c b/test/Driver/hello.c index e1b6f1a0fd7a5..da628724d6d94 100644 --- a/test/Driver/hello.c +++ b/test/Driver/hello.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-echo -o %t %s 2> %t.log +// RUN: %clang -ccc-echo -o %t %s 2> %t.log // Make sure we used clang. // RUN: grep 'clang" -cc1 .*hello.c' %t.log diff --git a/test/Driver/immediate-options.c b/test/Driver/immediate-options.c index 923c30ea95cea..5a3ec872b4fe3 100644 --- a/test/Driver/immediate-options.c +++ b/test/Driver/immediate-options.c @@ -1,4 +1,4 @@ -// RUN: clang --help -// RUN: clang --help-hidden -// RUN: clang -dumpversion -// RUN: clang -print-search-dirs +// RUN: %clang --help +// RUN: %clang --help-hidden +// RUN: %clang -dumpversion +// RUN: %clang -print-search-dirs diff --git a/test/Driver/lto.c b/test/Driver/lto.c index 041b424618087..4543ffcd023e6 100644 --- a/test/Driver/lto.c +++ b/test/Driver/lto.c @@ -1,12 +1,12 @@ // -emit-llvm, -flto, and -O4 all cause a switch to llvm-bc object // files. -// RUN: clang -ccc-print-phases -c %s -flto 2> %t.log +// RUN: %clang -ccc-print-phases -c %s -flto 2> %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log -// RUN: clang -ccc-print-phases -c %s -O4 2> %t.log +// RUN: %clang -ccc-print-phases -c %s -O4 2> %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log // and -emit-llvm doesn't alter pipeline (unfortunately?). -// RUN: clang -ccc-print-phases %s -emit-llvm 2> %t.log +// RUN: %clang -ccc-print-phases %s -emit-llvm 2> %t.log // RUN: grep '0: input, ".*lto.c", c' %t.log // RUN: grep '1: preprocessor, {0}, cpp-output' %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log @@ -14,11 +14,11 @@ // llvm-bc and llvm-ll outputs need to match regular suffixes // (unfortunately). -// RUN: clang %s -emit-llvm -save-temps -### 2> %t.log +// RUN: %clang %s -emit-llvm -save-temps -### 2> %t.log // RUN: grep '"-o" ".*lto\.i" "-x" "c" ".*lto\.c"' %t.log // RUN: grep '"-o" ".*lto\.o" .*".*lto\.i"' %t.log // RUN: grep '".*a.out" .*".*lto\.o"' %t.log -// RUN: clang %s -emit-llvm -S -### 2> %t.log +// RUN: %clang %s -emit-llvm -S -### 2> %t.log // RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c index 97ba30bb69c23..6024461069a19 100644 --- a/test/Driver/openbsd.c +++ b/test/Driver/openbsd.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log +// RUN: %clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log // RUN: FileCheck -input-file %t.log %s // CHECK: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd" diff --git a/test/Driver/parsing.c b/test/Driver/parsing.c index 48b9d6a23f1fd..ca3a7f44fd8ea 100644 --- a/test/Driver/parsing.c +++ b/test/Driver/parsing.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t +// RUN: %clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t // RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t // RUN: grep 'Option 1 - Name: "<input>", Values: {"input"}' %t // RUN: grep 'Option 2 - Name: "<unknown>", Values: {"-Yunknown"}' %t @@ -11,13 +11,13 @@ // RUN: grep 'Option 9 - Name: "-Xarch_", Values: {"joined", "AndSeparate"}' %t // RUN: grep 'Option 10 - Name: "-sectalign", Values: {"1", "2", "3"}' %t -// RUN: not clang -V 2> %t +// RUN: not %clang -V 2> %t // RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t -// RUN: not clang -sectalign 1 2 2> %t +// RUN: not %clang -sectalign 1 2 2> %t // RUN: grep "error: argument to '-sectalign' is missing (expected 3 values)" %t // Verify that search continues after find the first option. -// RUN: clang -ccc-print-options -Wally 2> %t +// RUN: %clang -ccc-print-options -Wally 2> %t // RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t // RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t diff --git a/test/Driver/phases.c b/test/Driver/phases.c index d03bff9a77b1c..7fe529c51a930 100644 --- a/test/Driver/phases.c +++ b/test/Driver/phases.c @@ -1,5 +1,5 @@ // Basic compilation for various types of files. -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c %s -x objective-c %s -x c++ %s -x objective-c++ -x assembler %s -x assembler-with-cpp %s -x none %s 2>&1 | FileCheck -check-prefix=BASIC %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c %s -x objective-c %s -x c++ %s -x objective-c++ -x assembler %s -x assembler-with-cpp %s -x none %s 2>&1 | FileCheck -check-prefix=BASIC %s // BASIC: 0: input, "{{.*}}phases.c", c // BASIC: 1: preprocessor, {0}, cpp-output // BASIC: 2: compiler, {1}, assembler @@ -24,7 +24,7 @@ // BASIC: 21: linker, {3, 7, 11, 13, 16, 20}, image // Universal linked image. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=ULI %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=ULI %s // ULI: 0: input, "{{.*}}phases.c", c // ULI: 1: preprocessor, {0}, cpp-output // ULI: 2: compiler, {1}, assembler @@ -35,7 +35,7 @@ // ULI: 7: lipo, {5, 6}, image // Universal object file. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=UOF %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=UOF %s // UOF: 0: input, "{{.*}}phases.c", c // UOF: 1: preprocessor, {0}, cpp-output // UOF: 2: compiler, {1}, assembler @@ -45,33 +45,33 @@ // UOF: 6: lipo, {4, 5}, object // Arch defaulting -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH1 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH1 %s // ARCH1: 2: bind-arch, "i386", {1}, object -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s -m32 -m64 2>&1 | FileCheck -check-prefix=ARCH2 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s -m32 -m64 2>&1 | FileCheck -check-prefix=ARCH2 %s // ARCH2: 2: bind-arch, "x86_64", {1}, object -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH3 %s +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH3 %s // ARCH3: 2: bind-arch, "x86_64", {1}, object -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s -m64 -m32 2>&1 | FileCheck -check-prefix=ARCH4 %s +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s -m64 -m32 2>&1 | FileCheck -check-prefix=ARCH4 %s // ARCH4: 2: bind-arch, "i386", {1}, object // Analyzer -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases --analyze %s 2>&1 | FileCheck -check-prefix=ANALYZE %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases --analyze %s 2>&1 | FileCheck -check-prefix=ANALYZE %s // ANALYZE: 0: input, "{{.*}}phases.c", c // ANALYZE: 1: preprocessor, {0}, cpp-output // ANALYZE: 2: analyzer, {1}, plist // Precompiler -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c-header %s 2>&1 | FileCheck -check-prefix=PCH %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c-header %s 2>&1 | FileCheck -check-prefix=PCH %s // PCH: 0: input, "{{.*}}phases.c", c-header // PCH: 1: preprocessor, {0}, c-header-cpp-output // PCH: 2: precompiler, {1}, precompiled-header // Darwin overrides the handling for .s // RUN: touch %t.s -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN1 %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN1 %s // DARWIN1: 0: input, "{{.*}}.s", assembler // DARWIN1: 1: assembler, {0}, object -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN2 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN2 %s // DARWIN2: 0: input, "{{.*}}.s", assembler-with-cpp // DARWIN2: 1: preprocessor, {0}, assembler // DARWIN2: 2: assembler, {1}, object diff --git a/test/Driver/preprocessor.c b/test/Driver/preprocessor.c index 51b6fc57867eb..09c1f6c29cc65 100644 --- a/test/Driver/preprocessor.c +++ b/test/Driver/preprocessor.c @@ -1,4 +1,4 @@ -// RUN: clang -E -x c-header %s > %t +// RUN: %clang -E -x c-header %s > %t // RUN: grep 'B B' %t #define A B diff --git a/test/Driver/pth.c b/test/Driver/pth.c index 938675a900d84..9c47c5599376a 100644 --- a/test/Driver/pth.c +++ b/test/Driver/pth.c @@ -1,12 +1,12 @@ // Test transparent PTH support. -// RUN: clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log +// RUN: %clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log // RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s // CHECK1: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c" // RUN: touch %t.h.pth -// RUN: clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log +// RUN: %clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s // CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c" diff --git a/test/Driver/qa_override.c b/test/Driver/qa_override.c index 822410659ead7..5f96976ee98e1 100644 --- a/test/Driver/qa_override.c +++ b/test/Driver/qa_override.c @@ -1,4 +1,4 @@ -// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " clang x -O2 b -O3 2>&1 | FileCheck %s +// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | FileCheck %s // CHECK-NOT: ### // CHECK: Option 0 - Name: "-ccc-print-options", Values: {} // CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"} diff --git a/test/Driver/redzone.c b/test/Driver/redzone.c index 86f412fb46900..9f117d0489bd8 100644 --- a/test/Driver/redzone.c +++ b/test/Driver/redzone.c @@ -1,6 +1,6 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -mno-red-zone %s -S -emit-llvm -o %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -mno-red-zone %s -S -emit-llvm -o %t.log // RUN: grep 'noredzone' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -mred-zone %s -S -emit-llvm -o %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -mred-zone %s -S -emit-llvm -o %t.log // RUN: grep -v 'noredzone' %t.log int foo() { return 42; } diff --git a/test/Driver/std.c b/test/Driver/std.c index 01a5f7ccec255..c82e9f15c7dae 100644 --- a/test/Driver/std.c +++ b/test/Driver/std.c @@ -1,8 +1,8 @@ -// RUN: clang -std=c99 -trigraphs -std=gnu99 %s -E -o - | FileCheck -check-prefix=OVERRIDE %s +// RUN: %clang -std=c99 -trigraphs -std=gnu99 %s -E -o - | FileCheck -check-prefix=OVERRIDE %s // OVERRIDE: ??(??) -// RUN: clang -ansi %s -E -o - | FileCheck -check-prefix=ANSI %s +// RUN: %clang -ansi %s -E -o - | FileCheck -check-prefix=ANSI %s // ANSI: [] -// RUN: clang -std=gnu99 -trigraphs %s -E -o - | FileCheck -check-prefix=EXPLICIT %s +// RUN: %clang -std=gnu99 -trigraphs %s -E -o - | FileCheck -check-prefix=EXPLICIT %s // EXPLICIT: [] ??(??) diff --git a/test/Driver/unknown-gcc-arch.c b/test/Driver/unknown-gcc-arch.c index e8b653fbceab0..7018bf839d023 100644 --- a/test/Driver/unknown-gcc-arch.c +++ b/test/Driver/unknown-gcc-arch.c @@ -1,8 +1,8 @@ -// RUN: clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### 2> %t.log +// RUN: %clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### 2> %t.log // RUN: grep '.*gcc.*"-m64"' %t.log -// RUN: clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### -m32 2> %t.log +// RUN: %clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### -m32 2> %t.log // RUN: grep '.*gcc.*"-m32"' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### 2> %t.log // RUN: grep '.*gcc.*"-m32"' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### -m64 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### -m64 2> %t.log // RUN: grep '.*gcc.*"-m64"' %t.log diff --git a/test/Driver/x86_features.c b/test/Driver/x86_features.c index d0473b38bb1e0..9dbdd0ae90b4b 100644 --- a/test/Driver/x86_features.c +++ b/test/Driver/x86_features.c @@ -1,3 +1,3 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S %s -msse -msse4 -mno-sse -mno-mmx -msse 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -### -S %s -msse -msse4 -mno-sse -mno-mmx -msse 2> %t // RUN: grep '"-target-feature" "+sse" "-target-feature" "+sse4" "-target-feature" "-sse" "-target-feature" "-mmx" "-target-feature" "+sse"' %t diff --git a/test/FixIt/fixit-at.c b/test/FixIt/fixit-at.c index 5eaa5c346926f..c32aee9ea174a 100644 --- a/test/FixIt/fixit-at.c +++ b/test/FixIt/fixit-at.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fixit-at=fixit-at.c:3:1 %s -o - | clang-cc -verify -x c - +// RUN: %clang_cc1 -fixit-at=fixit-at.c:3:1 %s -o - | %clang_cc1 -verify -x c - _Complex cd; diff --git a/test/FixIt/fixit-c90.c b/test/FixIt/fixit-c90.c index 7036b08022c01..e84733f49dbcf 100644 --- a/test/FixIt/fixit-c90.c +++ b/test/FixIt/fixit-c90.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -std=c90 -pedantic -fixit %s -o - | clang-cc -pedantic -x c -std=c90 -Werror - +/* RUN: %clang_cc1 -std=c90 -pedantic -fixit %s -o - | %clang_cc1 -pedantic -x c -std=c90 -Werror - */ /* This is a test of the various code modification hints that are diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index 2c783bc2e33a9..3694b9db1af33 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -1,4 +1,4 @@ -/* RUN: clang-cc -std=c++0x -fixit %s -o - | clang-cc -x c++ -std=c++0x - +/* RUN: %clang_cc1 -std=c++0x -fixit %s -o - | %clang_cc1 -x c++ -std=c++0x - */ /* This is a test of the various code modification hints that only diff --git a/test/FixIt/fixit-errors-1.c b/test/FixIt/fixit-errors-1.c index 968d1d23151c1..ecad53ceb83dc 100644 --- a/test/FixIt/fixit-errors-1.c +++ b/test/FixIt/fixit-errors-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -pedantic -Werror -x c - +// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -pedantic -Werror -x c - /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the diff --git a/test/FixIt/fixit-errors.c b/test/FixIt/fixit-errors.c index 030f505e610e2..7bf9a58430f11 100644 --- a/test/FixIt/fixit-errors.c +++ b/test/FixIt/fixit-errors.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -pedantic -Werror -x c - +// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -pedantic -Werror -x c - /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m index cdf2057290e37..665ac74441ae6 100644 --- a/test/FixIt/fixit-objc.m +++ b/test/FixIt/fixit-objc.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -pedantic -fixit %s -o %t -// RUN: clang -cc1 -pedantic -x objective-c %t -verify +// RUN: %clang_cc1 -pedantic -fixit %s -o %t +// RUN: %clang_cc1 -pedantic -x objective-c %t -verify /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the diff --git a/test/FixIt/fixit-pmem.cpp b/test/FixIt/fixit-pmem.cpp index f938009b90300..0926309a9ab81 100644 --- a/test/FixIt/fixit-pmem.cpp +++ b/test/FixIt/fixit-pmem.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -fsyntax-only -pedantic -Werror -x c++ - +// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ - /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the diff --git a/test/FixIt/fixit.c b/test/FixIt/fixit.c index 4a32682be0522..83d724dffc01a 100644 --- a/test/FixIt/fixit.c +++ b/test/FixIt/fixit.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -pedantic -fixit %s -o - | grep -v 'CHECK' > %t -// RUN: clang-cc -pedantic -Werror -x c - +// RUN: %clang_cc1 -pedantic -fixit %s -o - | grep -v 'CHECK' > %t +// RUN: %clang_cc1 -pedantic -Werror -x c - // RUN: FileCheck -input-file=%t %s /* This is a test of the various code modification hints that are diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp index dac1fa03de370..04b99c9416542 100644 --- a/test/FixIt/fixit.cpp +++ b/test/FixIt/fixit.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -fsyntax-only -pedantic -Werror -x c++ - +// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ - /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the diff --git a/test/FixIt/typo.c b/test/FixIt/typo.c new file mode 100644 index 0000000000000..07775517809f1 --- /dev/null +++ b/test/FixIt/typo.c @@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -fixit -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x c - +struct Point { + float x, y; +}; + +struct Rectangle { + struct Point top_left, bottom_right; +}; + +enum Color { Red, Green, Blue }; + +struct Window { + struct Rectangle bounds; + enum Color color; +}; + +struct Window window = { + .bunds. // expected-error{{field designator 'bunds' does not refer to any field in type 'struct Window'; did you mean 'bounds'?}} + topleft.x = 3.14, // expected-error{{field designator 'topleft' does not refer to any field in type 'struct Rectangle'; did you mean 'top_left'?}} + 2.71818, 5.0, 6.0, Red +}; diff --git a/test/FixIt/typo.cpp b/test/FixIt/typo.cpp new file mode 100644 index 0000000000000..12bfc712f3ee0 --- /dev/null +++ b/test/FixIt/typo.cpp @@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -fixit -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ - +namespace std { + template<typename T> class basic_string { + int find(const char *substr); + static const int npos = -1; + }; + + typedef basic_string<char> string; +} + +namespace otherstd { + using namespace std; +} + +using namespace std; + +other_std::strng str1; // expected-error{{use of undeclared identifier 'other_std'; did you mean 'otherstd'?}} \ +// expected-error{{no type named 'strng' in namespace 'otherstd'; did you mean 'string'?}} +tring str2; // expected-error{{unknown type name 'tring'; did you mean 'string'?}} + +::other_std::string str3; // expected-error{{no member named 'other_std' in the global namespace; did you mean 'otherstd'?}} + +float area(float radius, float pi) { + return radious * pi; // expected-error{{use of undeclared identifier 'radious'; did you mean 'radius'?}} +} + +bool test_string(std::string s) { + basc_string<char> b1; // expected-error{{no template named 'basc_string'; did you mean 'basic_string'?}} + std::basic_sting<char> b2; // expected-error{{no template named 'basic_sting' in namespace 'std'; did you mean 'basic_string'?}} + (void)b1; + (void)b2; + return s.fnd("hello") // expected-error{{no member named 'fnd' in 'class std::basic_string<char>'; did you mean 'find'?}} + == std::string::pos; // expected-error{{no member named 'pos' in 'class std::basic_string<char>'; did you mean 'npos'?}} +} + +struct Base { }; +struct Derived : public Base { + int member; + + Derived() : base(), // expected-error{{initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'?}} + ember() { } // expected-error{{initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'?}} +}; diff --git a/test/FixIt/typo.m b/test/FixIt/typo.m new file mode 100644 index 0000000000000..251684949ef25 --- /dev/null +++ b/test/FixIt/typo.m @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -fixit -o - | %clang_cc1 -fsyntax-only -pedantic -Werror -x objective-c - + +@interface NSString +@end + +void test() { + NSstring *str = @"A string"; // expected-error{{use of undeclared identifier 'NSstring'; did you mean 'NSString'?}} +} diff --git a/test/Frontend/ast-codegen.c b/test/Frontend/ast-codegen.c index bd8a20adb69b3..b5b2157e21aea 100644 --- a/test/Frontend/ast-codegen.c +++ b/test/Frontend/ast-codegen.c @@ -1,5 +1,5 @@ -// RUN: clang -emit-ast -o %t.ast %s -// RUN: clang -emit-llvm -S -o - %t.ast | FileCheck %s +// RUN: %clang -emit-ast -o %t.ast %s +// RUN: %clang -emit-llvm -S -o - %t.ast | FileCheck %s // CHECK: module asm "foo" __asm__("foo"); diff --git a/test/Frontend/ast-main.c b/test/Frontend/ast-main.c index ef072b92f9c18..43237a12ef597 100644 --- a/test/Frontend/ast-main.c +++ b/test/Frontend/ast-main.c @@ -1,6 +1,6 @@ -// RUN: clang -emit-llvm -S -o %t1.ll -x c - < %s -// RUN: clang -emit-ast -o %t.ast %s -// RUN: clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast +// RUN: %clang -emit-llvm -S -o %t1.ll -x c - < %s +// RUN: %clang -emit-ast -o %t.ast %s +// RUN: %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast // RUN: diff %t1.ll %t2.ll int main() { diff --git a/test/Frontend/cpp-output.c b/test/Frontend/cpp-output.c index 9a6fc9b214255..e44095b599024 100644 --- a/test/Frontend/cpp-output.c +++ b/test/Frontend/cpp-output.c @@ -1,7 +1,7 @@ -// RUN: clang -E -o %t -C %s +// RUN: %clang -E -o %t -C %s // RUN: grep '^int x; // comment' %t // RUN: grep '^x x' %t -// RUN: clang -E -o %t -CC %s +// RUN: %clang -E -o %t -CC %s // RUN: grep '^int x; // comment' %t // RUN: grep '^x /\* comment \*/ x /\* comment \*/' %t diff --git a/test/Frontend/darwin-version.c b/test/Frontend/darwin-version.c index 4896aecdfae5b..1c866ee096010 100644 --- a/test/Frontend/darwin-version.c +++ b/test/Frontend/darwin-version.c @@ -1,22 +1,22 @@ -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin8 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin8 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin10 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin10 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 diff --git a/test/Frontend/dependency-gen.c b/test/Frontend/dependency-gen.c index 9185921407da1..c85d60be73f8e 100644 --- a/test/Frontend/dependency-gen.c +++ b/test/Frontend/dependency-gen.c @@ -1,8 +1,8 @@ // rdar://6533411 -// RUN: clang -MD -MF %t.d -S -x c -o %t.o %s +// RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d -// RUN: clang -S -M -x c %s -o %t.d +// RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d diff --git a/test/Frontend/output-failures.c b/test/Frontend/output-failures.c index a8687c754a01e..e2af7c7ddc90b 100644 --- a/test/Frontend/output-failures.c +++ b/test/Frontend/output-failures.c @@ -1,4 +1,4 @@ -// RUN: not clang-cc -emit-llvm -o %S/doesnotexist/somename %s 2> %t +// RUN: not %clang_cc1 -emit-llvm -o %S/doesnotexist/somename %s 2> %t // RUN: FileCheck -check-prefix=OUTPUTFAIL -input-file=%t %s // OUTPUTFAIL: Error opening output file '{{.*}}doesnotexist{{.*}}' diff --git a/test/Frontend/rewrite-macros.c b/test/Frontend/rewrite-macros.c index 1667925a2ba45..f44e545728e90 100644 --- a/test/Frontend/rewrite-macros.c +++ b/test/Frontend/rewrite-macros.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -rewrite-macros -o %t %s +// RUN: %clang_cc1 -verify -rewrite-macros -o %t %s #define A(a,b) a ## b diff --git a/test/Frontend/stdin.c b/test/Frontend/stdin.c index 35fe45d35b405..2d0a2377f76d3 100644 --- a/test/Frontend/stdin.c +++ b/test/Frontend/stdin.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -E - < /dev/null > %t +// RUN: %clang_cc1 -E - < /dev/null > %t // RUN: grep '<built-in>' %t diff --git a/test/Index/TestClassDecl.m b/test/Index/TestClassDecl.m index 12ae4f4516201..5cccf9264c7f8 100644 --- a/test/Index/TestClassDecl.m +++ b/test/Index/TestClassDecl.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s diff --git a/test/Index/TestClassForwardDecl.m b/test/Index/TestClassForwardDecl.m index db9a1eb5c7af9..e795972a7d13e 100644 --- a/test/Index/TestClassForwardDecl.m +++ b/test/Index/TestClassForwardDecl.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s diff --git a/test/Index/c-index-api-fn-scan.m b/test/Index/c-index-api-fn-scan.m index 0350d87b39e4c..8cbc036a5ca21 100644 --- a/test/Index/c-index-api-fn-scan.m +++ b/test/Index/c-index-api-fn-scan.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-load-tu %t.ast scan-function | FileCheck %s diff --git a/test/Index/c-index-api-loadTU-test.m b/test/Index/c-index-api-loadTU-test.m index 446f588c4f9dc..6ee50aef1e045 100644 --- a/test/Index/c-index-api-loadTU-test.m +++ b/test/Index/c-index-api-loadTU-test.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-load-tu %t.ast all | FileCheck %s diff --git a/test/Index/c-index-getCursor-test.m b/test/Index/c-index-getCursor-test.m index d6081bc9de8c6..23ae218878302 100644 --- a/test/Index/c-index-getCursor-test.m +++ b/test/Index/c-index-getCursor-test.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck %s @interface Foo { diff --git a/test/Index/c-index-pch.c b/test/Index/c-index-pch.c index 1ce1085251863..2037fc58802ca 100644 --- a/test/Index/c-index-pch.c +++ b/test/Index/c-index-pch.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -emit-pch -x c -o %t.pch %S/Inputs/c-index-pch.h -// RUN: clang-cc -include-pch %t.pch -x c -emit-pch -o %t.ast %s +// RUN: %clang_cc1 -emit-pch -x c -o %t.pch %S/Inputs/c-index-pch.h +// RUN: %clang_cc1 -include-pch %t.pch -x c -emit-pch -o %t.ast %s // RUN: c-index-test -test-load-tu %t.ast all | FileCheck -check-prefix=ALL %s // RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=LOCAL %s // ALL: FunctionDecl=foo diff --git a/test/Index/cindex-from-source.m b/test/Index/cindex-from-source.m index 8d6a1de4bbdc4..e775bb71e11ec 100644 --- a/test/Index/cindex-from-source.m +++ b/test/Index/cindex-from-source.m @@ -1,5 +1,5 @@ // RUN: echo 'typedef int t0;' > %t.pfx.h -// RUN: clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch +// RUN: %clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch // RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t // RUN: FileCheck %s < %t // CHECK: cindex-from-source.m:{{.*}}:{{.*}}: StructDecl=s0:{{.*}}:{{.*}} [Context=cindex-from-source.m] diff --git a/test/Index/code-completion.cpp b/test/Index/code-completion.cpp index c286c82d04800..55d068a16694e 100644 --- a/test/Index/code-completion.cpp +++ b/test/Index/code-completion.cpp @@ -33,20 +33,22 @@ void test_overloaded() { overloaded(Z(), 0); } -// CHECK-MEMBER: FieldDecl:{TypedText member} -// CHECK-MEMBER: FunctionDecl:{Informative Y::}{TypedText memfunc}{LeftParen (}{Optional {Placeholder int i}}{RightParen )} -// CHECK-MEMBER: EnumConstantDecl:{Informative E::}{TypedText Val1} -// CHECK-MEMBER: FunctionDecl:{Informative X::}{TypedText ~X}{LeftParen (}{RightParen )} -// CHECK-MEMBER: FunctionDecl:{TypedText operator int}{LeftParen (}{RightParen )} -// CHECK-MEMBER: FunctionDecl:{TypedText operator=}{LeftParen (}{Placeholder struct Z const &}{RightParen )} -// CHECK-MEMBER: FieldDecl:{Text X::}{TypedText member} -// CHECK-MEMBER: FieldDecl:{Text Y::}{TypedText member} -// CHECK-MEMBER: FunctionDecl:{Text X::}{TypedText operator=}{LeftParen (}{Placeholder struct X const &}{RightParen )} -// CHECK-MEMBER: FunctionDecl:{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder struct Y const &}{RightParen )} +// CHECK-MEMBER: FieldDecl:{ResultType double}{TypedText member} +// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative Y::}{TypedText memfunc}{LeftParen (}{Optional {Placeholder int i}}{RightParen )} +// CHECK-MEMBER: EnumConstantDecl:{ResultType enum X::E}{Informative E::}{TypedText Val1} +// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative X::}{TypedText ~X}{LeftParen (}{RightParen )} +// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative Y::}{TypedText ~Y}{LeftParen (}{RightParen )} +// CHECK-MEMBER: FunctionDecl:{ResultType void}{TypedText ~Z}{LeftParen (}{RightParen )} +// CHECK-MEMBER: FunctionDecl:{ResultType int}{TypedText operator int}{LeftParen (}{RightParen )}{Informative const} +// CHECK-MEMBER: FunctionDecl:{ResultType struct Z &}{TypedText operator=}{LeftParen (}{Placeholder struct Z const &}{RightParen )} +// CHECK-MEMBER: FieldDecl:{ResultType int}{Text X::}{TypedText member} +// CHECK-MEMBER: FieldDecl:{ResultType float}{Text Y::}{TypedText member} +// CHECK-MEMBER: FunctionDecl:{ResultType struct X &}{Text X::}{TypedText operator=}{LeftParen (}{Placeholder struct X const &}{RightParen )} +// CHECK-MEMBER: FunctionDecl:{ResultType struct Y &}{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder struct Y const &}{RightParen )} // CHECK-MEMBER: StructDecl:{TypedText X}{Text ::} // CHECK-MEMBER: StructDecl:{TypedText Y}{Text ::} // CHECK-MEMBER: StructDecl:{TypedText Z}{Text ::} -// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text struct Z z}{Comma , }{CurrentParameter int second}{RightParen )} -// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )} -// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: NotImplemented:{ResultType int &}{Text overloaded}{LeftParen (}{Text struct Z z}{Comma , }{CurrentParameter int second}{RightParen )} +// CHECK-OVERLOAD: NotImplemented:{ResultType float &}{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )} +// CHECK-OVERLOAD: NotImplemented:{ResultType double &}{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )} diff --git a/test/Index/comments.c b/test/Index/comments.c index 83bdbf6eed7d0..034317779c6e7 100644 --- a/test/Index/comments.c +++ b/test/Index/comments.c @@ -19,7 +19,7 @@ void g(int); void h(int); ///< This is a member comment. -// RUN: clang-cc -emit-pch -o %t.ast %s +// RUN: %clang_cc1 -emit-pch -o %t.ast %s // RUN: index-test %t.ast -point-at %s:11:6 > %t // RUN: grep "starts here" %t diff --git a/test/Index/complete-member-access.m b/test/Index/complete-member-access.m index 9202d0522f4b6..2502d7705b9c7 100644 --- a/test/Index/complete-member-access.m +++ b/test/Index/complete-member-access.m @@ -23,8 +23,8 @@ void test_props(Int* ptr) { } // RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: ObjCPropertyDecl:{TypedText prop1} -// CHECK-CC1: ObjCPropertyDecl:{TypedText ProtoProp} +// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1} +// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp} // RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: ObjCIvarDecl:{TypedText IVar} -// CHECK-CC2: ObjCIvarDecl:{TypedText SuperIVar} +// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar} +// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar} diff --git a/test/Index/complete-objc-message.m b/test/Index/complete-objc-message.m index 1c03095e2a018..a7b37fd2442cb 100644 --- a/test/Index/complete-objc-message.m +++ b/test/Index/complete-objc-message.m @@ -95,6 +95,14 @@ void test_overload(Overload *ovl) { [ovl Method:1 Arg1:1 OtherArg:ovl]; } +@interface Ellipsis +- (int)Method:(int)i, ...; +@end + +void f(Ellipsis *e) { + [e Method:1, 2, 3]; +} + // RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: {TypedText categoryClassMethod} // CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)a}{Text withKeyword:}{Placeholder (int)b} @@ -106,40 +114,42 @@ void test_overload(Overload *ovl) { // CHECK-CC2: {TypedText instanceMethod1} // CHECK-CC2: {TypedText protocolInstanceMethod:}{Placeholder (int)value} // RUN: c-index-test -code-completion-at=%s:61:16 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: ObjCClassMethodDecl:{TypedText MyClassMethod:}{Placeholder (id)obj} -// CHECK-CC3: ObjCClassMethodDecl:{TypedText MyPrivateMethod} +// CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyClassMethod:}{Placeholder (id)obj} +// CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyPrivateMethod} // RUN: c-index-test -code-completion-at=%s:65:16 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y} -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText MyPrivateInstMethod} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyPrivateInstMethod} // RUN: c-index-test -code-completion-at=%s:74:9 %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y} -// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText MySubInstMethod} +// CHECK-CC5: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y} +// CHECK-CC5: ObjCInstanceMethodDecl:{ResultType int}{TypedText MySubInstMethod} // RUN: c-index-test -code-completion-at=%s:82:8 %s | FileCheck -check-prefix=CHECK-CC6 %s -// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText protocolInstanceMethod:}{Placeholder (int)value} -// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText secondProtocolInstanceMethod} +// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText protocolInstanceMethod:}{Placeholder (int)value} +// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType int}{TypedText secondProtocolInstanceMethod} // RUN: c-index-test -code-completion-at=%s:95:8 %s | FileCheck -check-prefix=CHECK-CC7 %s -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method} -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (int)i} -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} -// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText OtherMethod:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (int)i} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} +// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText OtherMethod:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} // RUN: c-index-test -code-completion-at=%s:95:17 %s | FileCheck -check-prefix=CHECK-CC8 %s -// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText } -// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} -// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} -// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} +// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText } +// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2} +// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} +// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj} // RUN: c-index-test -code-completion-at=%s:95:24 %s | FileCheck -check-prefix=CHECK-CC9 %s -// CHECK-CC9: ObjCInstanceMethodDecl:{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)i2} -// CHECK-CC9: ObjCInstanceMethodDecl:{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)obj} +// CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)i2} +// CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)obj} // RUN: c-index-test -code-completion-at=%s:61:11 %s | FileCheck -check-prefix=CHECK-CCA %s -// CHECK-CCA: {TypedText _cmd} -// CHECK-CCA: {TypedText self} +// CHECK-CCA: {ResultType SEL}{TypedText _cmd} +// CHECK-CCA: {ResultType Class}{TypedText self} // CHECK-CCA: TypedefDecl:{TypedText Class} // CHECK-CCA: ObjCInterfaceDecl:{TypedText Foo} -// CHECK-CCA: FunctionDecl:{TypedText func}{LeftParen (}{RightParen )} +// CHECK-CCA: FunctionDecl:{ResultType void}{TypedText func}{LeftParen (}{RightParen )} // CHECK-CCA: TypedefDecl:{TypedText id} // CHECK-CCA: ObjCInterfaceDecl:{TypedText MyClass} // CHECK-CCA: ObjCInterfaceDecl:{TypedText MySubClass} // CHECK-CCA: TypedefDecl:{TypedText SEL} // CHECK-CCA: {TypedText super} +// RUN: c-index-test -code-completion-at=%s:103:6 %s | FileCheck -check-prefix=CHECK-CCB %s +// CHECK-CCB: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (int)i}{Placeholder , ...} diff --git a/test/Index/complete-properties.m b/test/Index/complete-properties.m index a99b1d1413d9b..80e10e7822c72 100644 --- a/test/Index/complete-properties.m +++ b/test/Index/complete-properties.m @@ -22,19 +22,19 @@ @end // RUN: c-index-test -code-completion-at=%s:20:13 %s | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop0} -// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop1} -// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop2} -// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop3} -// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop4} +// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} +// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop1} +// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText Prop2} +// CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop3} +// CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} // RUN: c-index-test -code-completion-at=%s:20:20 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop0} -// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop1} -// CHECK-CC2-NEXT: ObjCPropertyDecl:{TypedText Prop3} -// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop4} +// CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} +// CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop1} +// CHECK-CC2-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop3} +// CHECK-CC2: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} // RUN: c-index-test -code-completion-at=%s:20:35 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: ObjCIvarDecl:{TypedText RandomIVar} -// CHECK-CC3: ObjCIvarDecl:{TypedText StoredProp3} +// CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText RandomIVar} +// CHECK-CC3: ObjCIvarDecl:{ResultType id}{TypedText StoredProp3} // RUN: c-index-test -code-completion-at=%s:21:10 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: ObjCPropertyDecl:{TypedText Prop0} -// CHECK-CC4-NEXT: ObjCPropertyDecl:{TypedText Prop4} +// CHECK-CC4: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} +// CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} diff --git a/test/Index/complete-property-getset.m b/test/Index/complete-property-getset.m index a2a80533a32be..f4424ced08129 100644 --- a/test/Index/complete-property-getset.m +++ b/test/Index/complete-property-getset.m @@ -20,22 +20,22 @@ @end // RUN: c-index-test -code-completion-at=%s:13:21 %s | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: ObjCInstanceMethodDecl:{TypedText getter1} +// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1} // CHECK-CC1-NOT: getter2 -// CHECK-CC1: ObjCInstanceMethodDecl:{TypedText getter3} +// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3} // RUN: c-index-test -code-completion-at=%s:13:39 %s | FileCheck -check-prefix=CHECK-CC2 %s -// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText getter2_not:} -// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText setter1:} +// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:} +// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:} // CHECK-CC2-NOT: setter2 -// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText setter3:} +// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:} // RUN: c-index-test -code-completion-at=%s:19:21 %s | FileCheck -check-prefix=CHECK-CC3 %s -// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter1} +// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1} // CHECK-CC3-NOT: getter2 -// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter3} -// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter4} +// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3} +// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter4} // RUN: c-index-test -code-completion-at=%s:19:39 %s | FileCheck -check-prefix=CHECK-CC4 %s -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText getter2_not:}{Informative (int)x} -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter1:}{Informative (int)x} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}{Informative (int)x} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}{Informative (int)x} // CHECK-CC4-NOT: setter2 -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter3:}{Informative (int)y} -// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter4:}{Informative (int)x} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}{Informative (int)y} +// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter4:}{Informative (int)x} diff --git a/test/Index/cxx-operator-overload.cpp b/test/Index/cxx-operator-overload.cpp index 9bda03ef8dc45..864744859332d 100644 --- a/test/Index/cxx-operator-overload.cpp +++ b/test/Index/cxx-operator-overload.cpp @@ -12,7 +12,7 @@ static void bar() { Cls Cls::operator +(const Cls &RHS) { while (1) {} } -// RUN: clang-cc -emit-pch %s -o %t.ast +// RUN: %clang_cc1 -emit-pch %s -o %t.ast // RUNx: index-test %t.ast -point-at %s:10:17 -print-decls > %t && // RUNx: cat %t | count 2 && diff --git a/test/Index/find-decls.c b/test/Index/find-decls.c index 99a32428005b1..f1999b2151b4c 100644 --- a/test/Index/find-decls.c +++ b/test/Index/find-decls.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:8:7 -print-decls > %t // RUN: cat %t | count 3 diff --git a/test/Index/find-defs.c b/test/Index/find-defs.c index fb540727341a2..51292704a1b64 100644 --- a/test/Index/find-defs.c +++ b/test/Index/find-defs.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:1:14 -print-defs > %t // RUN: cat %t | count 1 diff --git a/test/Index/find-refs.c b/test/Index/find-refs.c index 5209e141b629d..1f29a77017dee 100644 --- a/test/Index/find-refs.c +++ b/test/Index/find-refs.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast -// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast +// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast // RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:1:14 -print-refs > %t // RUN: cat %t | count 4 diff --git a/test/Index/multiple-redecls.c b/test/Index/multiple-redecls.c index ea6d00b6a3c4e..faea88fc6b77c 100644 --- a/test/Index/multiple-redecls.c +++ b/test/Index/multiple-redecls.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-pch %s -o %t.ast +// RUN: %clang_cc1 -emit-pch %s -o %t.ast // RUN: index-test %t.ast -point-at %s:8:4 -print-decls | count 2 // RUN: index-test %t.ast -point-at %s:8:4 -print-defs | count 1 diff --git a/test/Index/objc-decls.m b/test/Index/objc-decls.m index 62a43da007b3a..4fcd830212bb5 100644 --- a/test/Index/objc-decls.m +++ b/test/Index/objc-decls.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast -// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast +// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast +// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast // RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/t1.m:12:12 -print-decls > %t // RUN: cat %t | count 2 diff --git a/test/Index/objc-message.m b/test/Index/objc-message.m index 568ca9494f557..151565b9bba2b 100644 --- a/test/Index/objc-message.m +++ b/test/Index/objc-message.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast -// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast +// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast +// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast // RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/objc.h:5:13 -print-refs > %t // RUN: cat %t | count 1 diff --git a/test/Index/recover-bad-code-rdar_7487294.c b/test/Index/recover-bad-code-rdar_7487294.c new file mode 100644 index 0000000000000..97bb5158e4728 --- /dev/null +++ b/test/Index/recover-bad-code-rdar_7487294.c @@ -0,0 +1,14 @@ +// RUN: %clang-cc1 -fsyntax-only %s 2>&1 | FileCheck %s + +// IMPORTANT: This test case intentionally DOES NOT use --disable-free. It +// tests that we are properly reclaiming the ASTs and we do not have a double free. +// Previously we tried to free the size expression of the VLA twice. + +int foo(int x) { + int y[x * 3]; + help +}; + +// CHECK: 9:3: error: use of undeclared identifier 'help' +// CHECK: help +// CHECK: 14:102: error: expected '}' diff --git a/test/Index/remap-complete.c b/test/Index/remap-complete.c index cfafd3051d8f5..9b7de0699d459 100644 --- a/test/Index/remap-complete.c +++ b/test/Index/remap-complete.c @@ -1,5 +1,5 @@ // RUN: c-index-test -code-completion-at=%s:1:12 -remap-file="%s;%S/Inputs/remap-complete-to.c" %s | FileCheck %s // XFAIL: win32 -// CHECK: FunctionDecl:{TypedText f0}{LeftParen (}{RightParen )} +// CHECK: FunctionDecl:{ResultType void}{TypedText f0}{LeftParen (}{RightParen )} void f() { } diff --git a/test/Index/resolve-loc.c b/test/Index/resolve-loc.c index f4697171ee185..68504ee0d2bc5 100644 --- a/test/Index/resolve-loc.c +++ b/test/Index/resolve-loc.c @@ -16,7 +16,7 @@ struct S { }; -// RUN: clang-cc -emit-pch %s -o %t.ast +// RUN: %clang_cc1 -emit-pch %s -o %t.ast // RUN: index-test %t.ast -point-at %s:3:8 | grep top_var // RUN: index-test %t.ast -point-at %s:5:15 | grep top_func_decl // RUN: index-test %t.ast -point-at %s:5:25 | grep param1 diff --git a/test/Lexer/11-27-2007-FloatLiterals.c b/test/Lexer/11-27-2007-FloatLiterals.c index ab3aba1a6eaf3..ccd9e2eff5926 100644 --- a/test/Lexer/11-27-2007-FloatLiterals.c +++ b/test/Lexer/11-27-2007-FloatLiterals.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s // CHECK: 0x3BFD83C940000000 // CHECK: 2.000000e+{{[0]*}}32 diff --git a/test/Lexer/badstring_in_if0.c b/test/Lexer/badstring_in_if0.c index 5fa5a2bb24031..486dcf221a6eb 100644 --- a/test/Lexer/badstring_in_if0.c +++ b/test/Lexer/badstring_in_if0.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s 2>&1 | not grep error +// RUN: %clang_cc1 -E %s 2>&1 | not grep error #if 0 " diff --git a/test/Lexer/block_cmt_end.c b/test/Lexer/block_cmt_end.c index 5efb77e3cc38e..72bc836a0ef0c 100644 --- a/test/Lexer/block_cmt_end.c +++ b/test/Lexer/block_cmt_end.c @@ -1,9 +1,9 @@ /* - RUN: clang-cc -E -trigraphs %s | grep bar - RUN: clang-cc -E -trigraphs %s | grep foo - RUN: clang-cc -E -trigraphs %s | not grep abc - RUN: clang-cc -E -trigraphs %s | not grep xyz - RUN: clang-cc -fsyntax-only -trigraphs -verify %s + RUN: %clang_cc1 -E -trigraphs %s | grep bar + RUN: %clang_cc1 -E -trigraphs %s | grep foo + RUN: %clang_cc1 -E -trigraphs %s | not grep abc + RUN: %clang_cc1 -E -trigraphs %s | not grep xyz + RUN: %clang_cc1 -fsyntax-only -trigraphs -verify %s */ // This is a simple comment, /*/ does not end a comment, the trailing */ does. diff --git a/test/Lexer/c90.c b/test/Lexer/c90.c index d743d68cd5013..6293d42a2f618 100644 --- a/test/Lexer/c90.c +++ b/test/Lexer/c90.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -std=c90 -fsyntax-only %s -verify -pedantic-errors +/* RUN: %clang_cc1 -std=c90 -fsyntax-only %s -verify -pedantic-errors */ enum { cast_hex = (long) ( diff --git a/test/Lexer/char-escapes.c b/test/Lexer/char-escapes.c index ef665fe84a5b5..d918bf4cf07c9 100644 --- a/test/Lexer/char-escapes.c +++ b/test/Lexer/char-escapes.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s int test['\\' == 92 ? 1 : -1]; int test['\"' == 34 ? 1 : -1]; diff --git a/test/Lexer/comment-escape.c b/test/Lexer/comment-escape.c index c46145715843c..191e65441dd47 100644 --- a/test/Lexer/comment-escape.c +++ b/test/Lexer/comment-escape.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only %s +// RUN: %clang -fsyntax-only %s // rdar://6757323 // foo \ diff --git a/test/Lexer/constants-ms.c b/test/Lexer/constants-ms.c index 8176ec3249f97..5b3f826119779 100644 --- a/test/Lexer/constants-ms.c +++ b/test/Lexer/constants-ms.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fms-extensions %s +// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s __int8 x1 = 3i8; __int16 x2 = 4i16; diff --git a/test/Lexer/constants.c b/test/Lexer/constants.c index fcb6de954516b..104a3a2a2b27d 100644 --- a/test/Lexer/constants.c +++ b/test/Lexer/constants.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic -trigraphs %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -trigraphs %s int x = 000000080; // expected-error {{invalid digit}} @@ -33,3 +33,25 @@ char e = 'abcd'; // still warn: expected-warning {{multi-character character co #pragma clang diagnostic ignored "-Wfour-char-constants" char f = 'abcd'; // ignored. + +// rdar://problem/6974641 +float t0[] = { + 1.9e20f, + 1.9e-20f, + 1.9e50f, // expected-error {{too large}} + 1.9e-50f, // expected-error {{too small}} + -1.9e20f, + -1.9e-20f, + -1.9e50f, // expected-error {{too large}} + -1.9e-50f // expected-error {{too small}} +}; +double t1[] = { + 1.9e50, + 1.9e-50, + 1.9e500, // expected-error {{too large}} + 1.9e-500, // expected-error {{too small}} + -1.9e50, + -1.9e-50, + -1.9e500, // expected-error {{too large}} + -1.9e-500 // expected-error {{too small}} +}; diff --git a/test/Lexer/counter.c b/test/Lexer/counter.c index 044570f88869b..21737300228df 100644 --- a/test/Lexer/counter.c +++ b/test/Lexer/counter.c @@ -1,5 +1,5 @@ // __COUNTER__ support: rdar://4329310 -// RUN: clang -E %s > %t +// RUN: %clang -E %s > %t #define PASTE2(x,y) x##y #define PASTE1(x,y) PASTE2(x,y) diff --git a/test/Lexer/cxx0x_keyword.cpp b/test/Lexer/cxx0x_keyword.cpp index 412c25e83c48b..c27925bcfee4f 100644 --- a/test/Lexer/cxx0x_keyword.cpp +++ b/test/Lexer/cxx0x_keyword.cpp @@ -1,2 +1,2 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s 2>&1 +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s 2>&1 int static_assert; /* expected-error {{expected unqualified-id}} */ diff --git a/test/Lexer/cxx0x_keyword_as_cxx98.cpp b/test/Lexer/cxx0x_keyword_as_cxx98.cpp index 9f8aea127cb9b..2bfb8b0b931be 100644 --- a/test/Lexer/cxx0x_keyword_as_cxx98.cpp +++ b/test/Lexer/cxx0x_keyword_as_cxx98.cpp @@ -1,2 +1,2 @@ -// RUN: clang-cc %s -fsyntax-only +// RUN: %clang_cc1 %s -fsyntax-only int static_assert; diff --git a/test/Lexer/digraph.c b/test/Lexer/digraph.c index 3c92db1c02b2a..b8a99bbae151f 100644 --- a/test/Lexer/digraph.c +++ b/test/Lexer/digraph.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify < %s +// RUN: %clang_cc1 -fsyntax-only -verify < %s %:include <stdint.h> diff --git a/test/Lexer/dollar-idents.c b/test/Lexer/dollar-idents.c index 276545d160a17..cbf25b0251bc0 100644 --- a/test/Lexer/dollar-idents.c +++ b/test/Lexer/dollar-idents.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -dump-tokens %s 2> %t +// RUN: %clang_cc1 -dump-tokens %s 2> %t // RUN: grep "identifier '\$A'" %t -// RUN: clang-cc -dump-tokens -x assembler-with-cpp %s 2> %t +// RUN: %clang_cc1 -dump-tokens -x assembler-with-cpp %s 2> %t // RUN: grep "identifier 'A'" %t // PR3808 diff --git a/test/Lexer/escape_newline.c b/test/Lexer/escape_newline.c index d07f0450ebbe1..43ba41795db83 100644 --- a/test/Lexer/escape_newline.c +++ b/test/Lexer/escape_newline.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -E -trigraphs %s | grep -- ' ->' -// RUN: clang-cc -E -trigraphs %s 2>&1 | grep 'backslash and newline separated by space' -// RUN: clang-cc -E -trigraphs %s 2>&1 | grep 'trigraph converted' +// RUN: %clang_cc1 -E -trigraphs %s | grep -- ' ->' +// RUN: %clang_cc1 -E -trigraphs %s 2>&1 | grep 'backslash and newline separated by space' +// RUN: %clang_cc1 -E -trigraphs %s 2>&1 | grep 'trigraph converted' // This is an ugly way to spell a -> token. -??/ diff --git a/test/Lexer/has_feature_exceptions.cpp b/test/Lexer/has_feature_exceptions.cpp index 231a6c56a45b6..cfd1efbf84645 100644 --- a/test/Lexer/has_feature_exceptions.cpp +++ b/test/Lexer/has_feature_exceptions.cpp @@ -1,5 +1,5 @@ -// RUN: clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s -// RUN: clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s +// RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s +// RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s #if __has_feature(cxx_exceptions) int foo(); diff --git a/test/Lexer/has_feature_rtti.cpp b/test/Lexer/has_feature_rtti.cpp index cc01f61cba67b..690906c292f23 100644 --- a/test/Lexer/has_feature_rtti.cpp +++ b/test/Lexer/has_feature_rtti.cpp @@ -1,5 +1,5 @@ -// RUN: clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s -// RUN: clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s +// RUN: %clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s +// RUN: %clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s #if __has_feature(cxx_rtti) int foo(); diff --git a/test/Lexer/msdos-cpm-eof.c b/test/Lexer/msdos-cpm-eof.c index e4dacd9802f2c..9ef6e32ea0b41 100644 --- a/test/Lexer/msdos-cpm-eof.c +++ b/test/Lexer/msdos-cpm-eof.c @@ -1,5 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify -fms-extensions %s +// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -int a; +int x; + +I am random garbage after ^Z diff --git a/test/Lexer/multiple-include.c b/test/Lexer/multiple-include.c index e5fd52926eeef..d737f95db271c 100644 --- a/test/Lexer/multiple-include.c +++ b/test/Lexer/multiple-include.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only +// RUN: %clang_cc1 %s -fsyntax-only #ifndef XVID_AUTO_INCLUDE diff --git a/test/Lexer/numeric-literal-trash.c b/test/Lexer/numeric-literal-trash.c index 047e0b8e95f9d..1d7c87bfbf067 100644 --- a/test/Lexer/numeric-literal-trash.c +++ b/test/Lexer/numeric-literal-trash.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify %s +/* RUN: %clang_cc1 -fsyntax-only -verify %s */ # define XRECORD(x, c_name) e##c (x, __LINE__) diff --git a/test/Lexer/pragma-mark.c b/test/Lexer/pragma-mark.c index f4204aa9d8073..96e8485a70ace 100644 --- a/test/Lexer/pragma-mark.c +++ b/test/Lexer/pragma-mark.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // Lexer diagnostics shouldn't be included in #pragma mark. #pragma mark Mike's world diff --git a/test/Lexer/rdr-6096838-2.c b/test/Lexer/rdr-6096838-2.c index b135dc1409cb2..f7f5906c8f4cc 100644 --- a/test/Lexer/rdr-6096838-2.c +++ b/test/Lexer/rdr-6096838-2.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -pedantic -std=gnu89 -fsyntax-only -verify %s +/* RUN: %clang_cc1 -pedantic -std=gnu89 -fsyntax-only -verify %s rdar://6096838 */ diff --git a/test/Lexer/rdr-6096838.c b/test/Lexer/rdr-6096838.c index 6a8899af95bdf..2f00f47099b76 100644 --- a/test/Lexer/rdr-6096838.c +++ b/test/Lexer/rdr-6096838.c @@ -1,5 +1,5 @@ -/* RUN: clang-cc -fsyntax-only -verify %s - * RUN: clang-cc -std=gnu89 -fsyntax-only -verify %s +/* RUN: %clang_cc1 -fsyntax-only -verify %s + * RUN: %clang_cc1 -std=gnu89 -fsyntax-only -verify %s rdar://6096838 */ diff --git a/test/Lexer/token-concat-2.c b/test/Lexer/token-concat-2.c index 28916547d5b67..7d3cd64439826 100644 --- a/test/Lexer/token-concat-2.c +++ b/test/Lexer/token-concat-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -x c -o - %s | grep '[.][*]' +// RUN: %clang_cc1 -E -x c -o - %s | grep '[.][*]' // PR4395 #define X .* X diff --git a/test/Lexer/token-concat.c b/test/Lexer/token-concat.c index 9194932b1bed7..551af950ae925 100644 --- a/test/Lexer/token-concat.c +++ b/test/Lexer/token-concat.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -x c -o %t %s +// RUN: %clang_cc1 -E -x c -o %t %s // RUN: grep 'IDENT.2' %t IDENT.2 diff --git a/test/Lexer/unknown-char.c b/test/Lexer/unknown-char.c index acbf4f039a718..334df37225ece 100644 --- a/test/Lexer/unknown-char.c +++ b/test/Lexer/unknown-char.c @@ -1,2 +1,2 @@ -// RUN: clang-cc -E %s 2>&1 | not grep error +// RUN: %clang_cc1 -E %s 2>&1 | not grep error ` ` ` ` diff --git a/test/Misc/caret-diags-macros.c b/test/Misc/caret-diags-macros.c index fd3c6170ec3cc..80371a94eb385 100644 --- a/test/Misc/caret-diags-macros.c +++ b/test/Misc/caret-diags-macros.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s > %t 2>&1 +// RUN: %clang_cc1 -fsyntax-only %s > %t 2>&1 #define M1(x) x diff --git a/test/Misc/caret-diags-scratch-buffer.c b/test/Misc/caret-diags-scratch-buffer.c index e339d56357542..883c68e81dcea 100644 --- a/test/Misc/caret-diags-scratch-buffer.c +++ b/test/Misc/caret-diags-scratch-buffer.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s 2>&1 | not grep keyXXXX +// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | not grep keyXXXX // This should not show keyXXXX in the caret diag output. This once // happened because the two tokens ended up in the scratch buffer and // the caret diag from the scratch buffer included the previous token. diff --git a/test/Misc/diag-mapping.c b/test/Misc/diag-mapping.c index 5816cf5ca16d2..75b49ef17c988 100644 --- a/test/Misc/diag-mapping.c +++ b/test/Misc/diag-mapping.c @@ -1,28 +1,28 @@ // This should warn by default. -// RUN: clang-cc %s 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s 2>&1 | grep "warning:" // This should not emit anything. -// RUN: clang-cc %s -Wno-extra-tokens 2>&1 | not grep diagnostic +// RUN: %clang_cc1 %s -Wno-extra-tokens 2>&1 | not grep diagnostic // -Werror can map all warnings to error. -// RUN: clang-cc %s -Werror 2>&1 | grep "error:" +// RUN: %clang_cc1 %s -Werror 2>&1 | grep "error:" // -Werror can map this one warning to error. -// RUN: clang-cc %s -Werror=extra-tokens 2>&1 | grep "error:" +// RUN: %clang_cc1 %s -Werror=extra-tokens 2>&1 | grep "error:" // Mapping unrelated diags to errors doesn't affect this one. -// RUN: clang-cc %s -Werror=trigraphs 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s -Werror=trigraphs 2>&1 | grep "warning:" // This should stay a warning with -pedantic. -// RUN: clang-cc %s -pedantic 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s -pedantic 2>&1 | grep "warning:" // This should emit an error with -pedantic-errors. -// RUN: clang-cc %s -pedantic-errors 2>&1 | grep "error:" +// RUN: %clang_cc1 %s -pedantic-errors 2>&1 | grep "error:" // This should emit a warning, because -Wfoo overrides -pedantic*. -// RUN: clang-cc %s -pedantic-errors -Wextra-tokens 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s -pedantic-errors -Wextra-tokens 2>&1 | grep "warning:" // This should emit nothing, because -Wno-extra-tokens overrides -pedantic* -// RUN: clang-cc %s -pedantic-errors -Wno-extra-tokens 2>&1 | not grep diagnostic +// RUN: %clang_cc1 %s -pedantic-errors -Wno-extra-tokens 2>&1 | not grep diagnostic #ifdef foo #endif bad // extension! diff --git a/test/Misc/diag-mapping2.c b/test/Misc/diag-mapping2.c index cde90e299a04b..bc5a0872e7c84 100644 --- a/test/Misc/diag-mapping2.c +++ b/test/Misc/diag-mapping2.c @@ -1,21 +1,21 @@ // This should warn by default. -// RUN: clang-cc %s 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s 2>&1 | grep "warning:" // This should not emit anything. -// RUN: clang-cc %s -w 2>&1 | not grep diagnostic -// RUN: clang-cc %s -Wno-#warnings 2>&1 | not grep diagnostic +// RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic +// RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic // -Werror can map all warnings to error. -// RUN: clang-cc %s -Werror 2>&1 | grep "error:" +// RUN: %clang_cc1 %s -Werror 2>&1 | grep "error:" // -Werror can map this one warning to error. -// RUN: clang-cc %s -Werror=#warnings 2>&1 | grep "error:" +// RUN: %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:" // -Wno-error= overrides -Werror. rdar://3158301 -// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:" // -Wno-error overrides -Werror. PR4715 -// RUN: clang-cc %s -Werror -Wno-error 2>&1 | grep "warning:" +// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning:" #warning foo diff --git a/test/Misc/emit-html-insert.c b/test/Misc/emit-html-insert.c index ac6b519a3a0d1..289c28a5c6d72 100644 --- a/test/Misc/emit-html-insert.c +++ b/test/Misc/emit-html-insert.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-html -o - | grep ">< 10; }" +// RUN: %clang_cc1 %s -emit-html -o - | grep ">< 10; }" int a(int x) { return x < 10; } diff --git a/test/Misc/emit-html.c b/test/Misc/emit-html.c index 22d0d28dd65df..48c8b61b38de2 100644 --- a/test/Misc/emit-html.c +++ b/test/Misc/emit-html.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -emit-html -o - +// RUN: %clang_cc1 %s -emit-html -o - // rdar://6562329 #line 42 "foo.c" diff --git a/test/Misc/message-length.c b/test/Misc/message-length.c index 24f623394d88a..3c746052fd3c0 100644 --- a/test/Misc/message-length.c +++ b/test/Misc/message-length.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s -// RUN: clang-cc -fmessage-length 1 %s +// RUN: %clang_cc1 -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fmessage-length 1 %s // Hack so we can check things better, force the file name and line. # 1 "FILE" 1 diff --git a/test/Misc/predefines.c b/test/Misc/predefines.c index c7fac86331a57..8e57c809df203 100644 --- a/test/Misc/predefines.c +++ b/test/Misc/predefines.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify -std=c89 -pedantic-errors %s +/* RUN: %clang_cc1 -fsyntax-only -verify -std=c89 -pedantic-errors %s * rdar://6814950 */ #include <stdint.h> diff --git a/test/Misc/remap-file.c b/test/Misc/remap-file.c index f12fe95012656..003cd2e469fdc 100644 --- a/test/Misc/remap-file.c +++ b/test/Misc/remap-file.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s -// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s -// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file "%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s +// RUN: %clang_cc1 -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s +// RUN: %clang_cc1 -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s +// RUN: %clang_cc1 -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file "%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s // CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types // CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types diff --git a/test/PCH/asm.c b/test/PCH/asm.c index 61665d607f418..99bc14dc2fb44 100644 --- a/test/PCH/asm.c +++ b/test/PCH/asm.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -triple i386-unknown-unknown -include %S/asm.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -include %S/asm.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -triple i386-unknown-unknown -emit-pch -o %t %S/asm.h -// RUN: clang-cc -triple i386-unknown-unknown -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pch -o %t %S/asm.h +// RUN: %clang_cc1 -triple i386-unknown-unknown -include-pch %t -fsyntax-only -verify %s void call_f(void) { f(); } diff --git a/test/PCH/attrs.c b/test/PCH/attrs.c index f381f23704069..c9711935c0755 100644 --- a/test/PCH/attrs.c +++ b/test/PCH/attrs.c @@ -1,8 +1,8 @@ // Test this without pch. -// RUN: clang-cc -include %S/attrs.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/attrs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/attrs.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/attrs.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s // expected-note{{previous overload}} double f(double); // expected-error{{overloadable}} diff --git a/test/PCH/blocks.c b/test/PCH/blocks.c index ccecd36523509..e7498865bd88c 100644 --- a/test/PCH/blocks.c +++ b/test/PCH/blocks.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/blocks.h -fsyntax-only -emit-llvm -o - %s +// RUN: %clang_cc1 -fblocks -include %S/blocks.h -fsyntax-only -emit-llvm -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/blocks.h -// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-pch -fblocks -o %t %S/blocks.h +// RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -emit-llvm -o - %s int do_add(int x, int y) { return add(x, y); } diff --git a/test/PCH/builtins.c b/test/PCH/builtins.c index 796b9dcda12c6..eed2224d415fe 100644 --- a/test/PCH/builtins.c +++ b/test/PCH/builtins.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/builtins.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/builtins.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/builtins.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/builtins.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s void hello() { printf("Hello, World!"); diff --git a/test/PCH/cxx-method.cpp b/test/PCH/cxx-method.cpp index 144406e7bdaf5..37dabcc466a8b 100644 --- a/test/PCH/cxx-method.cpp +++ b/test/PCH/cxx-method.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-pch %s -o %t +// RUN: %clang_cc1 -emit-pch %s -o %t struct S { void m(int x); diff --git a/test/PCH/enum.c b/test/PCH/enum.c index 607de59a8aeac..10ceb7c60b0a8 100644 --- a/test/PCH/enum.c +++ b/test/PCH/enum.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/enum.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/enum.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/enum.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/enum.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int i = Red; diff --git a/test/PCH/exprs.c b/test/PCH/exprs.c index 6cd1ee71b4c39..2b588a229e765 100644 --- a/test/PCH/exprs.c +++ b/test/PCH/exprs.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/exprs.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -include %S/exprs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/exprs.h -// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -fblocks -o %t %S/exprs.h +// RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s int integer; long long_integer; diff --git a/test/PCH/ext_vector.c b/test/PCH/ext_vector.c index 314dbfcf16921..bd129ea18a935 100644 --- a/test/PCH/ext_vector.c +++ b/test/PCH/ext_vector.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/ext_vector.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/ext_vector.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/ext_vector.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/ext_vector.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int test(float4 f4) { return f4.xy; // expected-error{{float2}} diff --git a/test/PCH/external-defs.c b/test/PCH/external-defs.c index 447124cc3f783..5097859297a58 100644 --- a/test/PCH/external-defs.c +++ b/test/PCH/external-defs.c @@ -1,6 +1,6 @@ // Test with pch. -// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/external-defs.h -// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/external-defs.h +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s // RUN: grep "@x = common global i32 0" %t | count 1 // RUN: grep "@z" %t | count 0 diff --git a/test/PCH/functions.c b/test/PCH/functions.c index 2121b9aaa107f..eb8579ab2ef46 100644 --- a/test/PCH/functions.c +++ b/test/PCH/functions.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/functions.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/functions.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/functions.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/functions.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int f0(int x0, int y0, ...) { return x0 + y0; } @@ -18,3 +18,8 @@ void test_g0(int *x, float * y) { g0(y); // expected-warning{{incompatible pointer types passing 'float *', expected 'int *'}} g0(x); } + +void __attribute__((noreturn)) test_abort(int code) { + do_abort(code); +} + diff --git a/test/PCH/functions.h b/test/PCH/functions.h index bc28ad7321c7f..39724300816a0 100644 --- a/test/PCH/functions.h +++ b/test/PCH/functions.h @@ -4,3 +4,5 @@ int f0(int x, int y, ...); float *f1(float x, float y); void g0(int *); + +void do_abort(int) __attribute__((noreturn)); diff --git a/test/PCH/fuzzy-pch.c b/test/PCH/fuzzy-pch.c index b29638bb0b10d..567575346ce17 100644 --- a/test/PCH/fuzzy-pch.c +++ b/test/PCH/fuzzy-pch.c @@ -1,8 +1,8 @@ // Test with pch. -// RUN: clang-cc -emit-pch -DFOO -o %t %S/variables.h -// RUN: clang-cc -DBAR=int -include-pch %t -fsyntax-only -pedantic %s -// RUN: clang-cc -DFOO -DBAR=int -include-pch %t -Werror %s -// RUN: not clang-cc -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %s +// RUN: %clang_cc1 -emit-pch -DFOO -o %t %S/variables.h +// RUN: %clang_cc1 -DBAR=int -include-pch %t -fsyntax-only -pedantic %s +// RUN: %clang_cc1 -DFOO -DBAR=int -include-pch %t -Werror %s +// RUN: not %clang_cc1 -DFOO -DBAR=int -DX=5 -include-pch %t -Werror %s BAR bar = 17; diff --git a/test/PCH/line-directive.c b/test/PCH/line-directive.c index 9eed4f4a98234..4710c40d7234f 100644 --- a/test/PCH/line-directive.c +++ b/test/PCH/line-directive.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5" +// RUN: %clang_cc1 -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5" // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/line-directive.h -// RUN: clang-cc -include-pch %t -fsyntax-only %s 2>&1|grep "25:5" +// RUN: %clang_cc1 -emit-pch -o %t %S/line-directive.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only %s 2>&1|grep "25:5" double x; // expected-error{{redefinition of 'x' with a different type}} diff --git a/test/PCH/method_pool.m b/test/PCH/method_pool.m index 17e2420081ff1..ee537840e0ebc 100644 --- a/test/PCH/method_pool.m +++ b/test/PCH/method_pool.m @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang -cc1 -include %S/method_pool.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/method_pool.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/method_pool.h -// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/method_pool.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int message_id(id x) { return [x instMethod:17]; // expected-warning{{multiple methods}} diff --git a/test/PCH/multiple_decls.c b/test/PCH/multiple_decls.c index 2702cd61bba6e..e2cc552336ea2 100644 --- a/test/PCH/multiple_decls.c +++ b/test/PCH/multiple_decls.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/multiple_decls.h -fsyntax-only -ast-print -o - %s +// RUN: %clang_cc1 -include %S/multiple_decls.h -fsyntax-only -ast-print -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/multiple_decls.h -// RUN: clang-cc -include-pch %t -fsyntax-only -ast-print -o - %s +// RUN: %clang_cc1 -emit-pch -o %t %S/multiple_decls.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -ast-print -o - %s void f0(char c) { wide(c); diff --git a/test/PCH/nonvisible-external-defs.c b/test/PCH/nonvisible-external-defs.c index a78674985c980..49392ca2fef5d 100644 --- a/test/PCH/nonvisible-external-defs.c +++ b/test/PCH/nonvisible-external-defs.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/nonvisible-external-defs.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/nonvisible-external-defs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/nonvisible-external-defs.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/nonvisible-external-defs.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int g(int, float); // expected-error{{conflicting types}} diff --git a/test/PCH/objc_exprs.m b/test/PCH/objc_exprs.m index 0c12b8e177fcc..c37968b7b9382 100644 --- a/test/PCH/objc_exprs.m +++ b/test/PCH/objc_exprs.m @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang -cc1 -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang -cc1 -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h -// RUN: clang -cc1 -fblocks -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h +// RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s // Expressions int *A1 = (objc_string)0; // expected-warning {{aka 'id'}} diff --git a/test/PCH/objc_import.m b/test/PCH/objc_import.m index c109f4083660b..277c6dd6c2f0a 100644 --- a/test/PCH/objc_import.m +++ b/test/PCH/objc_import.m @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang -cc1 -include %S/objc_import.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/objc_import.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_import.h -// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_import.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s #import "objc_import.h" diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m index a60ffad4f2a15..e90a463dce6b2 100644 --- a/test/PCH/objc_methods.m +++ b/test/PCH/objc_methods.m @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang -cc1 -include %S/objc_methods.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/objc_methods.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h -// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s void func() { TestPCH *xx; diff --git a/test/PCH/objc_property.m b/test/PCH/objc_property.m index 17c3a729c5c65..b51cd90927ae5 100644 --- a/test/PCH/objc_property.m +++ b/test/PCH/objc_property.m @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang -cc1 -include %S/objc_property.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/objc_property.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_property.h -// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_property.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s void func() { TestProperties *xx = [TestProperties alloc]; diff --git a/test/PCH/pr4489.c b/test/PCH/pr4489.c index aaf5aac749e54..1d8be2d76cc56 100644 --- a/test/PCH/pr4489.c +++ b/test/PCH/pr4489.c @@ -1,6 +1,6 @@ -// RUN: clang -x c-header -o %t.pch %s +// RUN: %clang -x c-header -o %t.pch %s // RUN: echo > %t.empty.c -// RUN: clang -include %t -x c %t.empty.c -emit-llvm -S -o - +// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o - // PR 4489: Crash with PCH // PR 4492: Crash with PCH (round two) // PR 4509: Crash with PCH (round three) diff --git a/test/PCH/preprocess.c b/test/PCH/preprocess.c index 7a6c2c5a4e2bc..8bf841f17f8dc 100644 --- a/test/PCH/preprocess.c +++ b/test/PCH/preprocess.c @@ -1,8 +1,8 @@ // Check that -E mode is invariant when using an implicit PCH. -// RUN: clang-cc -include %S/preprocess.h -E -o %t.orig %s -// RUN: clang-cc -emit-pch -o %t %S/preprocess.h -// RUN: clang-cc -include-pch %t -E -o %t.from_pch %s +// RUN: %clang_cc1 -include %S/preprocess.h -E -o %t.orig %s +// RUN: %clang_cc1 -emit-pch -o %t %S/preprocess.h +// RUN: %clang_cc1 -include-pch %t -E -o %t.from_pch %s // RUN: diff %t.orig %t.from_pch a_typedef a_value; diff --git a/test/PCH/reloc.c b/test/PCH/reloc.c index ba8e70db024af..fd78feba60478 100644 --- a/test/PCH/reloc.c +++ b/test/PCH/reloc.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -emit-pch -o %t -relocatable-pch -isysroot %S/libroot %S/libroot/usr/include/reloc.h -// RUN: clang-cc -include-pch %t -isysroot %S/libroot %s -verify -// RUN: not clang-cc -include-pch %t %s +// RUN: %clang_cc1 -emit-pch -o %t -relocatable-pch -isysroot %S/libroot %S/libroot/usr/include/reloc.h +// RUN: %clang_cc1 -include-pch %t -isysroot %S/libroot %s -verify +// RUN: not %clang_cc1 -include-pch %t %s #include <reloc.h> diff --git a/test/PCH/source-manager-stack.c b/test/PCH/source-manager-stack.c index 72084d9760edf..cc8555661a4d4 100644 --- a/test/PCH/source-manager-stack.c +++ b/test/PCH/source-manager-stack.c @@ -2,9 +2,9 @@ // when using PCH. // RUN: echo 'int x;' > %t.prefix.h -// RUN: not clang-cc -fsyntax-only -include %t.prefix.h %s 2> %t.diags.no_pch.txt -// RUN: clang-cc -emit-pch -o %t.prefix.pch %t.prefix.h -// RUN: not clang-cc -fsyntax-only -include-pch %t.prefix.pch %s 2> %t.diags.pch.txt +// RUN: not %clang_cc1 -fsyntax-only -include %t.prefix.h %s 2> %t.diags.no_pch.txt +// RUN: %clang_cc1 -emit-pch -o %t.prefix.pch %t.prefix.h +// RUN: not %clang_cc1 -fsyntax-only -include-pch %t.prefix.pch %s 2> %t.diags.pch.txt // RUN: diff %t.diags.no_pch.txt %t.diags.pch.txt // XFAIL: * // PR5662 diff --git a/test/PCH/stmts.c b/test/PCH/stmts.c index 69c7ec7dbf49e..6def453c86e41 100644 --- a/test/PCH/stmts.c +++ b/test/PCH/stmts.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/stmts.h -fsyntax-only -emit-llvm -o - %s +// RUN: %clang_cc1 -include %S/stmts.h -fsyntax-only -emit-llvm -o - %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/stmts.h -// RUN: clang-cc -include-pch %t -fsyntax-only -emit-llvm -o - %s +// RUN: %clang_cc1 -emit-pch -o %t %S/stmts.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -emit-llvm -o - %s void g0(void) { f0(5); } int g1(int x) { return f1(x); } diff --git a/test/PCH/struct.c b/test/PCH/struct.c index 6595a2fbdccc6..3e9d188332346 100644 --- a/test/PCH/struct.c +++ b/test/PCH/struct.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/struct.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/struct.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/struct.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/struct.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s struct Point *p1; diff --git a/test/PCH/tentative-defs.c b/test/PCH/tentative-defs.c index 5b85fccbcacd2..0072818a1a2f9 100644 --- a/test/PCH/tentative-defs.c +++ b/test/PCH/tentative-defs.c @@ -1,6 +1,6 @@ // Test with pch. -// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/tentative-defs.h -// RUN: clang-cc -triple x86_64-apple-darwin9 -include-pch %t.pch -verify -emit-llvm -o %t %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t.pch %S/tentative-defs.h +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t.pch -verify -emit-llvm -o %t %s // RUN: grep "@variable = common global i32 0" %t | count 1 // RUN: grep "@incomplete_array = common global .*1 x i32" %t | count 1 diff --git a/test/PCH/types.c b/test/PCH/types.c index a7efaef9a2c4f..1ebc01be6a142 100644 --- a/test/PCH/types.c +++ b/test/PCH/types.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -fblocks -include %S/types.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -include %S/types.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -fblocks -o %t %S/types.h -// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -fblocks -o %t %S/types.h +// RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s typedef int INT; INT int_value; diff --git a/test/PCH/va_arg.c b/test/PCH/va_arg.c index 6f7ccf4561857..1fb2a838e4f73 100644 --- a/test/PCH/va_arg.c +++ b/test/PCH/va_arg.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - +// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h %s -emit-llvm -o - // Test with pch. -// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h -// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o - +// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h +// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o - char *g0(char** argv, int argc) { return argv[argc]; } diff --git a/test/PCH/variables.c b/test/PCH/variables.c index f79b68483fd99..58fd8ae846616 100644 --- a/test/PCH/variables.c +++ b/test/PCH/variables.c @@ -1,9 +1,9 @@ // Test this without pch. -// RUN: clang-cc -include %S/variables.h -fsyntax-only -verify %s +// RUN: %clang_cc1 -include %S/variables.h -fsyntax-only -verify %s // Test with pch. -// RUN: clang-cc -emit-pch -o %t %S/variables.h -// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s +// RUN: %clang_cc1 -emit-pch -o %t %S/variables.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s int *ip2 = &x; float *fp = &ip; // expected-warning{{incompatible pointer types}} diff --git a/test/PCH/variables.h b/test/PCH/variables.h index 70aec65180910..c9374297fc026 100644 --- a/test/PCH/variables.h +++ b/test/PCH/variables.h @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-pch -o variables.h.pch variables.h +// RUN: %clang_cc1 -emit-pch -o variables.h.pch variables.h // Do not mess with the whitespace in this file. It's important. diff --git a/test/Parser/2008-10-31-parse-noop-failure.c b/test/Parser/2008-10-31-parse-noop-failure.c index 8243cb9731054..6df508ee4dde5 100755 --- a/test/Parser/2008-10-31-parse-noop-failure.c +++ b/test/Parser/2008-10-31-parse-noop-failure.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -parse-noop %s +// RUN: %clang_cc1 -verify -parse-noop %s void add_attribute(id) int id; {} diff --git a/test/Parser/CompoundStmtScope.c b/test/Parser/CompoundStmtScope.c index 90e3d24a32f5c..4f991031d0c3a 100644 --- a/test/Parser/CompoundStmtScope.c +++ b/test/Parser/CompoundStmtScope.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void foo() { { diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index 9c804c354e5a7..082929f6d843b 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/test/Parser/MicrosoftExtensions.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fms-extensions -x objective-c++ %s +// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions -x objective-c++ %s __stdcall int func0(); int __stdcall func(); typedef int (__cdecl *tptr)(); @@ -28,3 +28,9 @@ void foo() { } typedef bool (__stdcall __stdcall *blarg)(int); + + +// Charify extension. +#define FOO(x) #@x +char x = FOO(a); + diff --git a/test/Parser/argument_qualified.c b/test/Parser/argument_qualified.c index c9494e7373a0f..7d1b9fdc2c331 100644 --- a/test/Parser/argument_qualified.c +++ b/test/Parser/argument_qualified.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s +// RUN: %clang_cc1 %s int abc (const float x) { return 1; } diff --git a/test/Parser/argument_redef.c b/test/Parser/argument_redef.c index fd22c465e5c6a..519e8fd2033f8 100644 --- a/test/Parser/argument_redef.c +++ b/test/Parser/argument_redef.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify %s +/* RUN: %clang_cc1 -fsyntax-only -verify %s */ void foo(int A) { /* expected-note {{previous definition is here}} */ diff --git a/test/Parser/argument_scope.c b/test/Parser/argument_scope.c index 5e6f439cfdf84..d2d10c2498572 100644 --- a/test/Parser/argument_scope.c +++ b/test/Parser/argument_scope.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s typedef struct foo foo; void blah(int foo) { diff --git a/test/Parser/asm.c b/test/Parser/asm.c index 9cf9046aab6a4..df2e16feea5bc 100644 --- a/test/Parser/asm.c +++ b/test/Parser/asm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f1() { asm ("ret" : : :); // expected-error {{expected string literal}} diff --git a/test/Parser/attributes.c b/test/Parser/attributes.c index cad39d382d18a..ca606f5391ae9 100644 --- a/test/Parser/attributes.c +++ b/test/Parser/attributes.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -pedantic -std=c99 +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic -std=c99 int __attribute__(()) x; diff --git a/test/Parser/bad-control.c b/test/Parser/bad-control.c index 0bdd179af215c..480d81be0d571 100644 --- a/test/Parser/bad-control.c +++ b/test/Parser/bad-control.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify %s +/* RUN: %clang_cc1 -fsyntax-only -verify %s */ void foo() { break; /* expected-error {{'break' statement not in loop or switch statement}} */ diff --git a/test/Parser/block-block-storageclass.c b/test/Parser/block-block-storageclass.c index df9423460cd5a..a4efc44b18287 100644 --- a/test/Parser/block-block-storageclass.c +++ b/test/Parser/block-block-storageclass.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -parse-noop %s +// RUN: %clang_cc1 -fsyntax-only -verify -parse-noop %s #if 0 int printf(const char *, ...); void _Block_byref_release(void*src){} diff --git a/test/Parser/block-pointer-decl.c b/test/Parser/block-pointer-decl.c index 7a21651bad32c..2979b012c4492 100644 --- a/test/Parser/block-pointer-decl.c +++ b/test/Parser/block-pointer-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -parse-noop -fblocks %s +// RUN: %clang_cc1 -fsyntax-only -verify -parse-noop -fblocks %s struct blockStruct { int (^a)(float, int); diff --git a/test/Parser/builtin_classify_type.c b/test/Parser/builtin_classify_type.c index 7046310eb4a89..a7c08555c905a 100644 --- a/test/Parser/builtin_classify_type.c +++ b/test/Parser/builtin_classify_type.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct foo { int a; }; diff --git a/test/Parser/builtin_types_compatible.c b/test/Parser/builtin_types_compatible.c index 0664a9f556413..325615c7ee91d 100644 --- a/test/Parser/builtin_types_compatible.c +++ b/test/Parser/builtin_types_compatible.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern int funcInt(int); extern float funcFloat(float); diff --git a/test/Parser/c-namespace.c b/test/Parser/c-namespace.c index ffca15e6a2ebd..fbef09e0cd795 100644 --- a/test/Parser/c-namespace.c +++ b/test/Parser/c-namespace.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s void bla1() { struct XXX; int XXX; diff --git a/test/Parser/char-literal-printing.c b/test/Parser/char-literal-printing.c index f6ad0ff511be5..5843e5f401573 100644 --- a/test/Parser/char-literal-printing.c +++ b/test/Parser/char-literal-printing.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-print %s +// RUN: %clang_cc1 -ast-print %s #include <stddef.h> diff --git a/test/Parser/check-objc2-syntax-1.m b/test/Parser/check-objc2-syntax-1.m index aafb2e090a6a3..3cdf2b05cf853 100644 --- a/test/Parser/check-objc2-syntax-1.m +++ b/test/Parser/check-objc2-syntax-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Subclass + (int)magicNumber; diff --git a/test/Parser/check-syntax-1.m b/test/Parser/check-syntax-1.m index 8ad207270c3ff..a1999def59827 100644 --- a/test/Parser/check-syntax-1.m +++ b/test/Parser/check-syntax-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int @interface bla ; // expected-error {{cannot combine with previous 'int' declaration specifier}} @end diff --git a/test/Parser/check_cast.c b/test/Parser/check_cast.c index 4df851c7bf9f9..790ee409c976e 100644 --- a/test/Parser/check_cast.c +++ b/test/Parser/check_cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct foo { int a; }; diff --git a/test/Parser/compound_literal.c b/test/Parser/compound_literal.c index c263763b2e2a1..4f3609dc29f4e 100644 --- a/test/Parser/compound_literal.c +++ b/test/Parser/compound_literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int main() { char *s; s = (char []){"whatever"}; diff --git a/test/Parser/control-scope.c b/test/Parser/control-scope.c index 8c4e19965edb6..53149802c4cb5 100644 --- a/test/Parser/control-scope.c +++ b/test/Parser/control-scope.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -std=c90 -verify -// RUN: clang-cc %s -std=c99 +// RUN: %clang_cc1 %s -std=c90 -verify +// RUN: %clang_cc1 %s -std=c99 int f (int z) { if (z + sizeof (enum {a})) // expected-note {{previous definition is here}} diff --git a/test/Parser/cxx-ambig-paren-expr.cpp b/test/Parser/cxx-ambig-paren-expr.cpp index 324f6b5f9f88a..398820567237d 100644 --- a/test/Parser/cxx-ambig-paren-expr.cpp +++ b/test/Parser/cxx-ambig-paren-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s void f() { typedef int T; @@ -24,3 +24,43 @@ void f() { // FIXME: Special case: "++" is postfix here, not prefix // (S())++; } + +// Make sure we do tentative parsing correctly in conditions. +typedef int type; +struct rec { rec(int); }; + +namespace ns { + typedef int type; + struct rec { rec(int); }; +} + +struct cls { + typedef int type; + struct rec { rec(int); }; +}; + +struct result { + template <class T> result(T); + bool check(); +}; + +void test(int i) { + if (result((cls::type) i).check()) + return; + + if (result((ns::type) i).check()) + return; + + if (result((::type) i).check()) + return; + + if (result((cls::rec) i).check()) + return; + + if (result((ns::rec) i).check()) + return; + + if (result((::rec) i).check()) + return; +} + diff --git a/test/Parser/cxx-attributes.cpp b/test/Parser/cxx-attributes.cpp index 743d9b9ec1f2c..192193a6dfdcb 100644 --- a/test/Parser/cxx-attributes.cpp +++ b/test/Parser/cxx-attributes.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
class c {
virtual void f1(const char* a, ...)
diff --git a/test/Parser/cxx-bool.cpp b/test/Parser/cxx-bool.cpp index f0b3a9f9f0382..a8a161edb105b 100644 --- a/test/Parser/cxx-bool.cpp +++ b/test/Parser/cxx-bool.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s bool a = true; bool b = false; diff --git a/test/Parser/cxx-casting.cpp b/test/Parser/cxx-casting.cpp index 1fdc28d2c8800..c8b4716aa356c 100644 --- a/test/Parser/cxx-casting.cpp +++ b/test/Parser/cxx-casting.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s char *const_cast_test(const char *var) { diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp index ff452b9191142..576e57d0716a9 100644 --- a/test/Parser/cxx-class.cpp +++ b/test/Parser/cxx-class.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C; class C { public: diff --git a/test/Parser/cxx-condition.cpp b/test/Parser/cxx-condition.cpp index 8fbca2a90f783..a3991c45f24ee 100644 --- a/test/Parser/cxx-condition.cpp +++ b/test/Parser/cxx-condition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -parse-noop -verify %s +// RUN: %clang_cc1 -parse-noop -verify %s void f() { int a; diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index 6f3fd391b95ac..3c88b7adfa844 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s int x(*g); // expected-error {{use of undeclared identifier 'g'}} @@ -51,4 +51,4 @@ void test(struct Type *P) { Type = 1 ? ( (y:b) // expected-error {{unexpected ':' in nested name specifier}} 4) : 5; -}
\ No newline at end of file +} diff --git a/test/Parser/cxx-exception-spec.cpp b/test/Parser/cxx-exception-spec.cpp index 0a87ab7023029..e6c3c757f012e 100644 --- a/test/Parser/cxx-exception-spec.cpp +++ b/test/Parser/cxx-exception-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s struct X { }; diff --git a/test/Parser/cxx-extern-c-array.cpp b/test/Parser/cxx-extern-c-array.cpp index 1a04fa05c24e6..14912fd1067b7 100644 --- a/test/Parser/cxx-extern-c-array.cpp +++ b/test/Parser/cxx-extern-c-array.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" int myarray[]; int myarray[12] = {0}; diff --git a/test/Parser/cxx-friend.cpp b/test/Parser/cxx-friend.cpp index 6505ad0f6f761..2fe30cd3e4282 100644 --- a/test/Parser/cxx-friend.cpp +++ b/test/Parser/cxx-friend.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { friend class D; diff --git a/test/Parser/cxx-member-initializers.cpp b/test/Parser/cxx-member-initializers.cpp index bebb5c5e40d1f..34a725ff43af7 100644 --- a/test/Parser/cxx-member-initializers.cpp +++ b/test/Parser/cxx-member-initializers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct x { x() : a(4) ; // expected-error {{expected '{'}} diff --git a/test/Parser/cxx-namespace-alias.cpp b/test/Parser/cxx-namespace-alias.cpp index 65e1459d379b3..2e4d7af6bf308 100644 --- a/test/Parser/cxx-namespace-alias.cpp +++ b/test/Parser/cxx-namespace-alias.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -parse-noop -verify %s +// RUN: %clang_cc1 -parse-noop -verify %s namespace A = B; diff --git a/test/Parser/cxx-reference.cpp b/test/Parser/cxx-reference.cpp index 0d2b9d29c3691..46f9fb07dba05 100644 --- a/test/Parser/cxx-reference.cpp +++ b/test/Parser/cxx-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern char *bork; char *& bar = bork; diff --git a/test/Parser/cxx-stmt.cpp b/test/Parser/cxx-stmt.cpp index cc35ba153f6b0..fdd573e6bfa5d 100644 --- a/test/Parser/cxx-stmt.cpp +++ b/test/Parser/cxx-stmt.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f1() { @@ -51,4 +51,10 @@ void f4() { switch (Kind) { case Type: i = 7; break; // no error. } -}
\ No newline at end of file +} + +// PR5500 +void f5() { + asm volatile ("":: :"memory"); + asm volatile ("": ::"memory"); +} diff --git a/test/Parser/cxx-template-argument.cpp b/test/Parser/cxx-template-argument.cpp new file mode 100644 index 0000000000000..80389a07b0acb --- /dev/null +++ b/test/Parser/cxx-template-argument.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template<typename T> struct A {}; + +// Check for template argument lists followed by junk +// FIXME: The diagnostics here aren't great... +A<int+> int x; // expected-error {{expected '>'}} expected-error {{expected unqualified-id}} +A<int x; // expected-error {{expected '>'}} expected-error {{C++ requires a type specifier for all declarations}} + diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp index 644f0def79c96..5cb84a63069bd 100644 --- a/test/Parser/cxx-template-decl.cpp +++ b/test/Parser/cxx-template-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Errors export class foo { }; // expected-error {{expected template}} diff --git a/test/Parser/cxx-throw.cpp b/test/Parser/cxx-throw.cpp index bcc49ec1b4fb5..a87881647dd4f 100644 --- a/test/Parser/cxx-throw.cpp +++ b/test/Parser/cxx-throw.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int i; diff --git a/test/Parser/cxx-typeid.cpp b/test/Parser/cxx-typeid.cpp index 5a92e7322f1f3..a825dc3cc7a56 100644 --- a/test/Parser/cxx-typeid.cpp +++ b/test/Parser/cxx-typeid.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: This should really include <typeinfo>, but we don't have that yet. namespace std { diff --git a/test/Parser/cxx-typeof.cpp b/test/Parser/cxx-typeof.cpp index 0bf446316cfcb..7e891013e92ce 100644 --- a/test/Parser/cxx-typeof.cpp +++ b/test/Parser/cxx-typeof.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s static void test() { int *pi; diff --git a/test/Parser/cxx-using-declaration.cpp b/test/Parser/cxx-using-declaration.cpp index 20c9fb391a800..2b2a69d1a421b 100644 --- a/test/Parser/cxx-using-declaration.cpp +++ b/test/Parser/cxx-using-declaration.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { int VA; diff --git a/test/Parser/cxx-using-directive.cpp b/test/Parser/cxx-using-directive.cpp index 504d026b43919..1e918996d1470 100644 --- a/test/Parser/cxx-using-directive.cpp +++ b/test/Parser/cxx-using-directive.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A {}; diff --git a/test/Parser/cxx-variadic-func.cpp b/test/Parser/cxx-variadic-func.cpp index 86d6b6bf2c5db..b9360d6ed10a0 100644 --- a/test/Parser/cxx-variadic-func.cpp +++ b/test/Parser/cxx-variadic-func.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s void f(...) { int g(int(...)); diff --git a/test/Parser/cxx0x-attributes.cpp b/test/Parser/cxx0x-attributes.cpp index a66e3e0597666..67b2ea6f62ea0 100644 --- a/test/Parser/cxx0x-attributes.cpp +++ b/test/Parser/cxx0x-attributes.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s // Declaration syntax checks [[]] int before_attr; diff --git a/test/Parser/cxx0x-literal-operators.cpp b/test/Parser/cxx0x-literal-operators.cpp index c5514601d1161..830754e56ae0a 100644 --- a/test/Parser/cxx0x-literal-operators.cpp +++ b/test/Parser/cxx0x-literal-operators.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s void operator "" (); // expected-error {{expected identifier}} void operator "k" foo(); // expected-error {{string literal after 'operator' must be '""'}} diff --git a/test/Parser/cxx0x-rvalue-reference.cpp b/test/Parser/cxx0x-rvalue-reference.cpp index 389f2b947003c..ae568e8859c0b 100644 --- a/test/Parser/cxx0x-rvalue-reference.cpp +++ b/test/Parser/cxx0x-rvalue-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s int && r1(int &&a); diff --git a/test/Parser/declarators.c b/test/Parser/declarators.c index da8327a1e834f..3831199c8d715 100644 --- a/test/Parser/declarators.c +++ b/test/Parser/declarators.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic extern int a1[]; diff --git a/test/Parser/designator.c b/test/Parser/designator.c index 76c2d435227fb..6badab7a75c3a 100644 --- a/test/Parser/designator.c +++ b/test/Parser/designator.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -pedantic +// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic int X[] = { [4]4, // expected-warning {{use of GNU 'missing =' extension in designator}} diff --git a/test/Parser/encode.m b/test/Parser/encode.m index 15e9fe9828be1..e0e7535081193 100644 --- a/test/Parser/encode.m +++ b/test/Parser/encode.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int main(void) { const char ch = @encode(char *)[2]; diff --git a/test/Parser/enhanced-proto-1.m b/test/Parser/enhanced-proto-1.m index b80eb7d09d8fa..a3819f3a19589 100644 --- a/test/Parser/enhanced-proto-1.m +++ b/test/Parser/enhanced-proto-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol MyProto1 @optional diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c index 2b4d4636ebb1a..44ebe661befd8 100644 --- a/test/Parser/expressions.c +++ b/test/Parser/expressions.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -parse-noop -verify %s +// RUN: %clang_cc1 -parse-noop -verify %s void test1() { if (sizeof (int){ 1}); // sizeof compound literal diff --git a/test/Parser/expressions.m b/test/Parser/expressions.m index 9adc34af1fc7c..e27f40506926b 100644 --- a/test/Parser/expressions.m +++ b/test/Parser/expressions.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -parse-noop %s +// RUN: %clang_cc1 -parse-noop %s void test1() { @"s"; // expected-warning {{expression result unused}} diff --git a/test/Parser/extension.c b/test/Parser/extension.c index 519dc053c82fa..fd4cf80867487 100644 --- a/test/Parser/extension.c +++ b/test/Parser/extension.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -fsyntax-only -pedantic -verify -std=c89 +/* RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify -std=c89 */ /* Top level extension marker. */ diff --git a/test/Parser/function-decls.c b/test/Parser/function-decls.c index 28bb5c2e18dad..db9a98b391e60 100644 --- a/test/Parser/function-decls.c +++ b/test/Parser/function-decls.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -ast-print +/* RUN: %clang_cc1 %s -ast-print */ void foo() { diff --git a/test/Parser/goto-ident.c b/test/Parser/goto-ident.c index e8d1963e38c2f..32051dc677eca 100644 --- a/test/Parser/goto-ident.c +++ b/test/Parser/goto-ident.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify %s +/* RUN: %clang_cc1 -fsyntax-only -verify %s */ void foo() { diff --git a/test/Parser/if-scope-c90.c b/test/Parser/if-scope-c90.c index c372f0fc4f4d3..c368fabb80ed5 100644 --- a/test/Parser/if-scope-c90.c +++ b/test/Parser/if-scope-c90.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c90 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c90 %s int f (int z) { diff --git a/test/Parser/if-scope-c99.c b/test/Parser/if-scope-c99.c index 0cb2495efce21..63f82e0f7aa76 100644 --- a/test/Parser/if-scope-c99.c +++ b/test/Parser/if-scope-c99.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c99 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c99 %s int f (int z) { diff --git a/test/Parser/implicit-casts.c b/test/Parser/implicit-casts.c index 3e8f599047c45..900b4ece8bab2 100644 --- a/test/Parser/implicit-casts.c +++ b/test/Parser/implicit-casts.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s _Complex double X; void test1(int c) { X = 5; diff --git a/test/Parser/method-prototype-1.m b/test/Parser/method-prototype-1.m index 86a912f46eb77..d2d9563a2ec43 100644 --- a/test/Parser/method-prototype-1.m +++ b/test/Parser/method-prototype-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -parse-noop +// RUN: %clang_cc1 %s -parse-noop @interface MyObject - (void) bycopy : (int) woodo, ... ; - (void) break : (int) woodo, ... ; diff --git a/test/Parser/namelookup-bug-1.c b/test/Parser/namelookup-bug-1.c index 3c8b85a2d61a0..8667a71657ccf 100644 --- a/test/Parser/namelookup-bug-1.c +++ b/test/Parser/namelookup-bug-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s typedef int Object; diff --git a/test/Parser/namelookup-bug-2.c b/test/Parser/namelookup-bug-2.c index 42298c39c46fb..84850ffafb175 100644 --- a/test/Parser/namelookup-bug-2.c +++ b/test/Parser/namelookup-bug-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s typedef int Object; diff --git a/test/Parser/namespace-alias-attr.cpp b/test/Parser/namespace-alias-attr.cpp index 9e4072cde2252..ba809229a6469 100644 --- a/test/Parser/namespace-alias-attr.cpp +++ b/test/Parser/namespace-alias-attr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s namespace A { diff --git a/test/Parser/objc-alias-printing.m b/test/Parser/objc-alias-printing.m index afb522cfa3d9e..8b9cc6e139244 100644 --- a/test/Parser/objc-alias-printing.m +++ b/test/Parser/objc-alias-printing.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -ast-print %s +// RUN: %clang_cc1 -ast-print %s @protocol P1 @end @protocol P2 @end diff --git a/test/Parser/objc-category-neg-1.m b/test/Parser/objc-category-neg-1.m index 957dbde2d7fa5..5799db0bd2e7f 100644 --- a/test/Parser/objc-category-neg-1.m +++ b/test/Parser/objc-category-neg-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); static __inline__ int __inline_isfinitef (float ) __attribute__ ((always_inline)); diff --git a/test/Parser/objc-forcollection-1.m b/test/Parser/objc-forcollection-1.m index 6075332dcd5bc..4850deb1fa9a4 100644 --- a/test/Parser/objc-forcollection-1.m +++ b/test/Parser/objc-forcollection-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s typedef struct objc_class *Class; typedef struct objc_object { diff --git a/test/Parser/objc-forcollection-neg-2.m b/test/Parser/objc-forcollection-neg-2.m index 9019d441a60ab..e02c51c1ba35c 100644 --- a/test/Parser/objc-forcollection-neg-2.m +++ b/test/Parser/objc-forcollection-neg-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_class *Class; typedef struct objc_object { diff --git a/test/Parser/objc-forcollection-neg.m b/test/Parser/objc-forcollection-neg.m index 464759e0d1750..0ba093efa08a3 100644 --- a/test/Parser/objc-forcollection-neg.m +++ b/test/Parser/objc-forcollection-neg.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_class *Class; typedef struct objc_object { diff --git a/test/Parser/objc-foreach-syntax.m b/test/Parser/objc-foreach-syntax.m index 294a6029378cd..943540ef1f23d 100644 --- a/test/Parser/objc-foreach-syntax.m +++ b/test/Parser/objc-foreach-syntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s diff --git a/test/Parser/objc-init.m b/test/Parser/objc-init.m index b3f033ea25f1d..0c23aebc878c9 100644 --- a/test/Parser/objc-init.m +++ b/test/Parser/objc-init.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s -pedantic +// RUN: %clang_cc1 -fsyntax-only -verify %s -pedantic // rdar://5707001 @interface NSNumber; diff --git a/test/Parser/objc-interfaces.m b/test/Parser/objc-interfaces.m index fdb52e763f2c6..aac3faa4350a6 100644 --- a/test/Parser/objc-interfaces.m +++ b/test/Parser/objc-interfaces.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // Test features and error recovery for objc interfaces. diff --git a/test/Parser/objc-messaging-1.m b/test/Parser/objc-messaging-1.m index 2ee3639b06cbe..511290eabfc0b 100644 --- a/test/Parser/objc-messaging-1.m +++ b/test/Parser/objc-messaging-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -parse-noop +// RUN: %clang_cc1 %s -parse-noop int main () { int i,j; diff --git a/test/Parser/objc-messaging-neg-1.m b/test/Parser/objc-messaging-neg-1.m index 4dcbb79a996ad..0d0cb9d8d6fea 100644 --- a/test/Parser/objc-messaging-neg-1.m +++ b/test/Parser/objc-messaging-neg-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int main() { id a; diff --git a/test/Parser/objc-missing-impl.m b/test/Parser/objc-missing-impl.m index 392b26f63838c..05d9d6c0b2326 100644 --- a/test/Parser/objc-missing-impl.m +++ b/test/Parser/objc-missing-impl.m @@ -1,2 +1,2 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @end // expected-warning {{@end must appear in an @implementation context}} diff --git a/test/Parser/objc-property-syntax.m b/test/Parser/objc-property-syntax.m index 294fb541e4748..b5f57f305f395 100644 --- a/test/Parser/objc-property-syntax.m +++ b/test/Parser/objc-property-syntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyClass { diff --git a/test/Parser/objc-quirks.m b/test/Parser/objc-quirks.m index 233739bc38d0d..62984a458f364 100644 --- a/test/Parser/objc-quirks.m +++ b/test/Parser/objc-quirks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: This is a horrible error message here. Fix. int @"s" = 5; // expected-error {{prefix attribute must be}} diff --git a/test/Parser/objc-synthesized-recover.m b/test/Parser/objc-synthesized-recover.m index dbe9b1d93b615..3f04a8c21d392 100644 --- a/test/Parser/objc-synthesized-recover.m +++ b/test/Parser/objc-synthesized-recover.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I1 { diff --git a/test/Parser/objc-try-catch-1.m b/test/Parser/objc-try-catch-1.m index 25b52794a77d1..1934cbd3b83d0 100644 --- a/test/Parser/objc-try-catch-1.m +++ b/test/Parser/objc-try-catch-1.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s -// RUN: clang -cc1 -fsyntax-only -verify -x objective-c++ %s +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -x objective-c++ %s void * proc(); @interface NSConstantString diff --git a/test/Parser/objc-type-printing.m b/test/Parser/objc-type-printing.m index e619b72ab6b19..9bbdac98bcbdd 100644 --- a/test/Parser/objc-type-printing.m +++ b/test/Parser/objc-type-printing.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -ast-print %s +// RUN: %clang_cc1 -ast-print %s @protocol P1 @end @protocol P2 @end diff --git a/test/Parser/offsetof.c b/test/Parser/offsetof.c index 6c4e3feaa6943..3a5b9f36c7f23 100644 --- a/test/Parser/offsetof.c +++ b/test/Parser/offsetof.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct a { struct { int b; } x[2]; }; diff --git a/test/Parser/parmvardecl_conversion.c b/test/Parser/parmvardecl_conversion.c index f35487ee95c62..9fa8a6880a21d 100644 --- a/test/Parser/parmvardecl_conversion.c +++ b/test/Parser/parmvardecl_conversion.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f (int p[]) { p++; } diff --git a/test/Parser/pointer-arithmetic.c b/test/Parser/pointer-arithmetic.c index d252b42c9b15e..87eb1a2704942 100644 --- a/test/Parser/pointer-arithmetic.c +++ b/test/Parser/pointer-arithmetic.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int *test1(int *a) { return a + 1; } int *test2(int *a) { return 1 + a; } diff --git a/test/Parser/pointer_promotion.c b/test/Parser/pointer_promotion.c index 3226eabbf53d5..30589d01326fa 100644 --- a/test/Parser/pointer_promotion.c +++ b/test/Parser/pointer_promotion.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void test() { void *vp; diff --git a/test/Parser/pragma-pack.c b/test/Parser/pragma-pack.c index d42bbe5c40d2c..84778cd501d05 100644 --- a/test/Parser/pragma-pack.c +++ b/test/Parser/pragma-pack.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Note that this puts the expected lines before the directives to work around // limitations in the -verify mode. diff --git a/test/Parser/pragma-weak.c b/test/Parser/pragma-weak.c index dca0f8dd4c15a..7e5740b483085 100644 --- a/test/Parser/pragma-weak.c +++ b/test/Parser/pragma-weak.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Note that this puts the expected lines before the directives to work around // limitations in the -verify mode. diff --git a/test/Parser/prefix-attributes.m b/test/Parser/prefix-attributes.m index 31be34076fe34..399421fd728fd 100644 --- a/test/Parser/prefix-attributes.m +++ b/test/Parser/prefix-attributes.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s __attribute__((deprecated)) @class B; // expected-error {{prefix attribute must be followed by an interface or protocol}} diff --git a/test/Parser/promote_types_in_proto.c b/test/Parser/promote_types_in_proto.c index faff3e35d5a3d..969ba28120f23 100644 --- a/test/Parser/promote_types_in_proto.c +++ b/test/Parser/promote_types_in_proto.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s +// RUN: %clang_cc1 %s void functionPromotion(void f(char *const [])); void arrayPromotion(char * const argv[]); diff --git a/test/Parser/recovery.c b/test/Parser/recovery.c index 43d3e2d8a69da..8e7181e0ba05f 100644 --- a/test/Parser/recovery.c +++ b/test/Parser/recovery.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic -fblocks %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -fblocks %s // PR2241 float test2241[2] = { diff --git a/test/Parser/selector-1.m b/test/Parser/selector-1.m index fdc74ff4b424c..1f9cad62aee36 100644 --- a/test/Parser/selector-1.m +++ b/test/Parser/selector-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -parse-noop %s +// RUN: %clang_cc1 -parse-noop %s int main() { SEL s = @selector(retain); diff --git a/test/Parser/statements.c b/test/Parser/statements.c index 25e06a27bd139..8fec0f1b262f2 100644 --- a/test/Parser/statements.c +++ b/test/Parser/statements.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void test1() { { ; { ;;}} ;; diff --git a/test/Parser/struct-recursion.c b/test/Parser/struct-recursion.c index 11e5f7e97ab1e..834c5d0f771ff 100644 --- a/test/Parser/struct-recursion.c +++ b/test/Parser/struct-recursion.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only +// RUN: %clang_cc1 %s -fsyntax-only // C99 6.7.2.3p11 diff --git a/test/Parser/top-level-semi-cxx0x.cpp b/test/Parser/top-level-semi-cxx0x.cpp index e83fd9e8dbd7c..592483c86bb63 100644 --- a/test/Parser/top-level-semi-cxx0x.cpp +++ b/test/Parser/top-level-semi-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++0x -verify %s void foo(); diff --git a/test/Parser/traditional_arg_scope.c b/test/Parser/traditional_arg_scope.c index 2a21ec3708d49..3811d0d88cdea 100644 --- a/test/Parser/traditional_arg_scope.c +++ b/test/Parser/traditional_arg_scope.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify int x(a) int a; {return a;} int y(b) int b; {return a;} // expected-error {{use of undeclared identifier}} diff --git a/test/Parser/typeof.c b/test/Parser/typeof.c index a7c488023ae2e..cf0e47a6b1244 100644 --- a/test/Parser/typeof.c +++ b/test/Parser/typeof.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int TInt; diff --git a/test/Parser/types.c b/test/Parser/types.c index 2131ab0346f4f..0e8a63d81fc0a 100644 --- a/test/Parser/types.c +++ b/test/Parser/types.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -parse-noop +// RUN: %clang_cc1 %s -parse-noop // Test the X can be overloaded inside the struct. typedef int X; diff --git a/test/Preprocessor/_Pragma-dependency.c b/test/Preprocessor/_Pragma-dependency.c index 17c5355302c28..a2861c97cb85c 100644 --- a/test/Preprocessor/_Pragma-dependency.c +++ b/test/Preprocessor/_Pragma-dependency.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -E 2>&1 | grep 'DO_PRAGMA (STR' -// RUN: clang-cc %s -E 2>&1 | grep '7:3' +// RUN: %clang_cc1 %s -E 2>&1 | grep 'DO_PRAGMA (STR' +// RUN: %clang_cc1 %s -E 2>&1 | grep '7:3' #define DO_PRAGMA _Pragma #define STR "GCC dependency \"parse.y\"") diff --git a/test/Preprocessor/_Pragma-dependency2.c b/test/Preprocessor/_Pragma-dependency2.c index c21c7c85d4858..c178764e5e2ef 100644 --- a/test/Preprocessor/_Pragma-dependency2.c +++ b/test/Preprocessor/_Pragma-dependency2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s -verify +// RUN: %clang_cc1 -E %s -verify #define DO_PRAGMA _Pragma DO_PRAGMA ("GCC dependency \"blahblabh\"") // expected-error {{file not found}} diff --git a/test/Preprocessor/_Pragma-location.c b/test/Preprocessor/_Pragma-location.c index 61cadfbb8a189..8b68d6ca1f76e 100644 --- a/test/Preprocessor/_Pragma-location.c +++ b/test/Preprocessor/_Pragma-location.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | not grep 'scratch space' +// RUN: %clang_cc1 %s -E | not grep 'scratch space' #define push _Pragma ("pack(push)") push diff --git a/test/Preprocessor/_Pragma-physloc.c b/test/Preprocessor/_Pragma-physloc.c index 016c97b82fd83..a093af2141790 100644 --- a/test/Preprocessor/_Pragma-physloc.c +++ b/test/Preprocessor/_Pragma-physloc.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -E | grep '#pragma x y z' -// RUN: clang-cc %s -E | grep '#pragma a b c' +// RUN: %clang_cc1 %s -E | grep '#pragma x y z' +// RUN: %clang_cc1 %s -E | grep '#pragma a b c' _Pragma("x y z") _Pragma("a b c") diff --git a/test/Preprocessor/_Pragma.c b/test/Preprocessor/_Pragma.c index 9c0c97d1f011c..0a83b149ff75d 100644 --- a/test/Preprocessor/_Pragma.c +++ b/test/Preprocessor/_Pragma.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -Wall +// RUN: %clang_cc1 %s -verify -Wall _Pragma ("GCC system_header") // expected-warning {{system_header ignored in main file}} diff --git a/test/Preprocessor/assembler-with-cpp.c b/test/Preprocessor/assembler-with-cpp.c index 17880c8da7e3c..0543077c01c7e 100644 --- a/test/Preprocessor/assembler-with-cpp.c +++ b/test/Preprocessor/assembler-with-cpp.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -x assembler-with-cpp -E %s -o - | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s +// RUN: %clang_cc1 -x assembler-with-cpp -E %s -o - | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s #ifndef __ASSEMBLER__ #error "__ASSEMBLER__ not defined" @@ -49,7 +49,7 @@ 6: FOO(blarg) // CHECK-Identifiers-False: 6: blarg $foo -// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers -E %s -o - | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s +// RUN: %clang_cc1 -x assembler-with-cpp -fdollars-in-identifiers -E %s -o - | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s #define FOO(name) name ## $foo 7: FOO(blarg) // CHECK-Identifiers-True: 7: blarg$foo diff --git a/test/Preprocessor/builtin_line.c b/test/Preprocessor/builtin_line.c index 06a2ac20d04cf..52228b5fdbf59 100644 --- a/test/Preprocessor/builtin_line.c +++ b/test/Preprocessor/builtin_line.c @@ -1,10 +1,10 @@ -// RUN: clang-cc %s -E | grep "^ 4" +// RUN: %clang_cc1 %s -E | grep "^ 4" #define FOO __LINE__ FOO // PR3579 - This should expand to the __LINE__ of the ')' not of the X. -// RUN: clang-cc %s -E | grep "^A 13" +// RUN: %clang_cc1 %s -E | grep "^A 13" #define X() __LINE__ diff --git a/test/Preprocessor/c90.c b/test/Preprocessor/c90.c index ed63d1b3d7cc7..1d5010d75e34e 100644 --- a/test/Preprocessor/c90.c +++ b/test/Preprocessor/c90.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -std=c89 -Eonly -verify -pedantic-errors +/* RUN: %clang_cc1 %s -std=c89 -Eonly -verify -pedantic-errors */ /* PR3919 */ diff --git a/test/Preprocessor/c99-6_10_3_3_p4.c b/test/Preprocessor/c99-6_10_3_3_p4.c index 99ad6e88a3f9e..320e6cf3e2a2f 100644 --- a/test/Preprocessor/c99-6_10_3_3_p4.c +++ b/test/Preprocessor/c99-6_10_3_3_p4.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define hash_hash # ## # #define mkstr(a) # a diff --git a/test/Preprocessor/c99-6_10_3_4_p5.c b/test/Preprocessor/c99-6_10_3_4_p5.c index 08b2c423601fc..6dea09d1130a4 100644 --- a/test/Preprocessor/c99-6_10_3_4_p5.c +++ b/test/Preprocessor/c99-6_10_3_4_p5.c @@ -1,5 +1,5 @@ // Example from C99 6.10.3.4p5 -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define x 3 #define f(a) f(x * (a)) diff --git a/test/Preprocessor/c99-6_10_3_4_p6.c b/test/Preprocessor/c99-6_10_3_4_p6.c index 8072d7b87bf28..98bacb24e1d39 100644 --- a/test/Preprocessor/c99-6_10_3_4_p6.c +++ b/test/Preprocessor/c99-6_10_3_4_p6.c @@ -1,6 +1,6 @@ // Example from C99 6.10.3.4p6 -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define str(s) # s #define xstr(s) str(s) diff --git a/test/Preprocessor/c99-6_10_3_4_p7.c b/test/Preprocessor/c99-6_10_3_4_p7.c index 6a7eb48173b89..b63209b26891f 100644 --- a/test/Preprocessor/c99-6_10_3_4_p7.c +++ b/test/Preprocessor/c99-6_10_3_4_p7.c @@ -1,6 +1,6 @@ // Example from C99 6.10.3.4p7 -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define t(x,y,z) x ## y ## z int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), diff --git a/test/Preprocessor/c99-6_10_3_4_p9.c b/test/Preprocessor/c99-6_10_3_4_p9.c index 704241e46e3ff..04c4b79700db1 100644 --- a/test/Preprocessor/c99-6_10_3_4_p9.c +++ b/test/Preprocessor/c99-6_10_3_4_p9.c @@ -1,6 +1,6 @@ // Example from C99 6.10.3.4p9 -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define debug(...) fprintf(stderr, __VA_ARGS__) #define showlist(...) puts(#__VA_ARGS__) diff --git a/test/Preprocessor/clang_headers.c b/test/Preprocessor/clang_headers.c index 1cb331998f43b..f2dec4fbe565e 100644 --- a/test/Preprocessor/clang_headers.c +++ b/test/Preprocessor/clang_headers.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -E %s +// RUN: %clang_cc1 -E %s #include <limits.h> diff --git a/test/Preprocessor/comment_save.c b/test/Preprocessor/comment_save.c index ae609b117e7e9..b86004272b202 100644 --- a/test/Preprocessor/comment_save.c +++ b/test/Preprocessor/comment_save.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -C %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E -C %s | FileCheck -strict-whitespace %s // foo // CHECK: // foo diff --git a/test/Preprocessor/comment_save_if.c b/test/Preprocessor/comment_save_if.c index c08b2d7c78b7b..2f35bcb9e8c6e 100644 --- a/test/Preprocessor/comment_save_if.c +++ b/test/Preprocessor/comment_save_if.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E -CC -pedantic 2>&1 | grep -v '^/' | not grep warning +// RUN: %clang_cc1 %s -E -CC -pedantic 2>&1 | grep -v '^/' | not grep warning #if 1 /*bar */ diff --git a/test/Preprocessor/comment_save_macro.c b/test/Preprocessor/comment_save_macro.c index 76a21bfbdea8f..6ad759f5c31a2 100644 --- a/test/Preprocessor/comment_save_macro.c +++ b/test/Preprocessor/comment_save_macro.c @@ -1,10 +1,10 @@ -// RUN: clang-cc -E -C %s | FileCheck -check-prefix=CHECK-C -strict-whitespace %s +// RUN: %clang_cc1 -E -C %s | FileCheck -check-prefix=CHECK-C -strict-whitespace %s // CHECK-C: boo bork bar // zot -// RUN: clang-cc -E -CC %s | FileCheck -check-prefix=CHECK-CC -strict-whitespace %s +// RUN: %clang_cc1 -E -CC %s | FileCheck -check-prefix=CHECK-CC -strict-whitespace %s // CHECK-CC: boo bork /* blah*/ bar // zot -// RUN: clang-cc -E %s | FileCheck -check-prefix=CHECK -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -check-prefix=CHECK -strict-whitespace %s // CHECK: boo bork bar diff --git a/test/Preprocessor/cxx_and.cpp b/test/Preprocessor/cxx_and.cpp index 747091387fded..a84ffe7f26656 100644 --- a/test/Preprocessor/cxx_and.cpp +++ b/test/Preprocessor/cxx_and.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -DA -DB -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -DB -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA -DB -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DB -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if defined(A) and defined(B) #define X 37 #else diff --git a/test/Preprocessor/cxx_bitand.cpp b/test/Preprocessor/cxx_bitand.cpp index e6b7c2c6370a0..01b4ff1909d0a 100644 --- a/test/Preprocessor/cxx_bitand.cpp +++ b/test/Preprocessor/cxx_bitand.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -DA=1 -DB=2 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -DB=2 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if A bitand B #define X 37 #else diff --git a/test/Preprocessor/cxx_bitor.cpp b/test/Preprocessor/cxx_bitor.cpp index e72fcb44a9507..c92596e5e1755 100644 --- a/test/Preprocessor/cxx_bitor.cpp +++ b/test/Preprocessor/cxx_bitor.cpp @@ -1,8 +1,8 @@ -// RUN: clang-cc -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if A bitor B #define X 37 #else diff --git a/test/Preprocessor/cxx_compl.cpp b/test/Preprocessor/cxx_compl.cpp index b319c51f29fb0..824092c16f504 100644 --- a/test/Preprocessor/cxx_compl.cpp +++ b/test/Preprocessor/cxx_compl.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -DA=1 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=0 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=0 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if compl 0 bitand A #define X 37 #else diff --git a/test/Preprocessor/cxx_not.cpp b/test/Preprocessor/cxx_not.cpp index 2272941b68da0..67e8775295ad7 100644 --- a/test/Preprocessor/cxx_not.cpp +++ b/test/Preprocessor/cxx_not.cpp @@ -1,5 +1,5 @@ -// RUN: clang-cc -DA=1 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=1 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 37 == 37' #if not defined(A) #define X 37 #else diff --git a/test/Preprocessor/cxx_not_eq.cpp b/test/Preprocessor/cxx_not_eq.cpp index 92418b287a504..f7670fabf8530 100644 --- a/test/Preprocessor/cxx_not_eq.cpp +++ b/test/Preprocessor/cxx_not_eq.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -DA=1 -DB=2 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -DB=2 -E %s | grep 'int a = 37 == 37' #if A not_eq B #define X 37 #else diff --git a/test/Preprocessor/cxx_oper_keyword.cpp b/test/Preprocessor/cxx_oper_keyword.cpp index 0464e97eb903a..3fc246dd6c2a0 100644 --- a/test/Preprocessor/cxx_oper_keyword.cpp +++ b/test/Preprocessor/cxx_oper_keyword.cpp @@ -1,5 +1,5 @@ -// RUN: not clang-cc %s -E -// RUN: clang-cc %s -E -fno-operator-names +// RUN: not %clang_cc1 %s -E +// RUN: %clang_cc1 %s -E -fno-operator-names // Not valid in C++ unless -fno-operator-names is passed. #define and foo diff --git a/test/Preprocessor/cxx_oper_spelling.cpp b/test/Preprocessor/cxx_oper_spelling.cpp index 85f0426ca3a9b..0ae9afd7eea5e 100644 --- a/test/Preprocessor/cxx_oper_spelling.cpp +++ b/test/Preprocessor/cxx_oper_spelling.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep 'a: "and"' +// RUN: %clang_cc1 -E %s | grep 'a: "and"' #define X(A) #A diff --git a/test/Preprocessor/cxx_or.cpp b/test/Preprocessor/cxx_or.cpp index 2f7c0a5d65db5..e8ed92fd062bc 100644 --- a/test/Preprocessor/cxx_or.cpp +++ b/test/Preprocessor/cxx_or.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -DA -DB -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DB -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA -DB -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DB -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if defined(A) or defined(B) #define X 37 #else diff --git a/test/Preprocessor/cxx_true.cpp b/test/Preprocessor/cxx_true.cpp index bca70c5949e63..b123e0cb681af 100644 --- a/test/Preprocessor/cxx_true.cpp +++ b/test/Preprocessor/cxx_true.cpp @@ -1,6 +1,6 @@ -/* RUN: clang-cc -E %s -x c++ | grep block_1 - RUN: clang-cc -E %s -x c++ | not grep block_2 - RUN: clang-cc -E %s -x c | not grep block +/* RUN: %clang_cc1 -E %s -x c++ | grep block_1 + RUN: %clang_cc1 -E %s -x c++ | not grep block_2 + RUN: %clang_cc1 -E %s -x c | not grep block */ #if true diff --git a/test/Preprocessor/cxx_xor.cpp b/test/Preprocessor/cxx_xor.cpp index e6df9bb819e1f..24a6ce43559ca 100644 --- a/test/Preprocessor/cxx_xor.cpp +++ b/test/Preprocessor/cxx_xor.cpp @@ -1,8 +1,8 @@ -// RUN: clang-cc -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' -// RUN: clang-cc -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' -// RUN: clang-cc -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' +// RUN: %clang_cc1 -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' +// RUN: %clang_cc1 -E %s | grep 'int a = 927 == 927' #if A xor B #define X 37 #else diff --git a/test/Preprocessor/dependencies-and-pp.c b/test/Preprocessor/dependencies-and-pp.c index 5359d0af4d7a5..d7bf4df51c81f 100644 --- a/test/Preprocessor/dependencies-and-pp.c +++ b/test/Preprocessor/dependencies-and-pp.c @@ -1,5 +1,5 @@ -// RUN: clang -E -o %t.1 %s -// RUN: clang -E -MD -MF %t.d -MT foo -o %t.2 %s +// RUN: %clang -E -o %t.1 %s +// RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s // RUN: diff %t.1 %t.2 // RUN: grep "foo:" %t.d // RUN: grep "dependencies-and-pp.c" %t.d diff --git a/test/Preprocessor/disabled-cond-diags.c b/test/Preprocessor/disabled-cond-diags.c index eb7632f29b3fd..531842a73158c 100644 --- a/test/Preprocessor/disabled-cond-diags.c +++ b/test/Preprocessor/disabled-cond-diags.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s 2>&1 | not grep "warning\|error" +// RUN: %clang_cc1 -E %s 2>&1 | not grep "warning\|error" #if 0 diff --git a/test/Preprocessor/dump-macros-spacing.c b/test/Preprocessor/dump-macros-spacing.c index 335e37c97e0e6..13924422d6948 100644 --- a/test/Preprocessor/dump-macros-spacing.c +++ b/test/Preprocessor/dump-macros-spacing.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -dD < %s | grep stdin | grep -v define +// RUN: %clang_cc1 -E -dD < %s | grep stdin | grep -v define #define A A /* 1 * 2 diff --git a/test/Preprocessor/dump-options.c b/test/Preprocessor/dump-options.c index 8302f1a32615e..a329bd46ac1d9 100644 --- a/test/Preprocessor/dump-options.c +++ b/test/Preprocessor/dump-options.c @@ -1,3 +1,3 @@ -// RUN: clang %s -E -dD | grep __INTMAX_MAX__ -// RUN: clang %s -E -dM | grep __INTMAX_MAX__ +// RUN: %clang %s -E -dD | grep __INTMAX_MAX__ +// RUN: %clang %s -E -dM | grep __INTMAX_MAX__ diff --git a/test/Preprocessor/dump_macros.c b/test/Preprocessor/dump_macros.c index 5908fec4b6815..d420eb4066de8 100644 --- a/test/Preprocessor/dump_macros.c +++ b/test/Preprocessor/dump_macros.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -dM %s -o - | FileCheck %s -strict-whitespace +// RUN: %clang_cc1 -E -dM %s -o - | FileCheck %s -strict-whitespace // Space at end even without expansion tokens // CHECK: #define A(x) diff --git a/test/Preprocessor/dumptokens_phyloc.c b/test/Preprocessor/dumptokens_phyloc.c index c0e78c9b155dc..7321c0eeef7fa 100644 --- a/test/Preprocessor/dumptokens_phyloc.c +++ b/test/Preprocessor/dumptokens_phyloc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -dump-tokens %s 2>&1 | grep "Spelling=.*dumptokens_phyloc.c:3:20" +// RUN: %clang_cc1 -dump-tokens %s 2>&1 | grep "Spelling=.*dumptokens_phyloc.c:3:20" #define TESTPHYLOC 10 diff --git a/test/Preprocessor/expr_comma.c b/test/Preprocessor/expr_comma.c index 88ceabf8e4809..538727d12bf34 100644 --- a/test/Preprocessor/expr_comma.c +++ b/test/Preprocessor/expr_comma.c @@ -1,8 +1,8 @@ // Comma is not allowed in C89 -// RUN: not clang-cc -E %s -std=c89 -pedantic-errors +// RUN: not %clang_cc1 -E %s -std=c89 -pedantic-errors // Comma is allowed if unevaluated in C99 -// RUN: clang-cc -E %s -std=c99 -pedantic-errors +// RUN: %clang_cc1 -E %s -std=c99 -pedantic-errors // PR2279 diff --git a/test/Preprocessor/expr_invalid_tok.c b/test/Preprocessor/expr_invalid_tok.c index 8bc2b8eb75c97..5defcc5bfbbd7 100644 --- a/test/Preprocessor/expr_invalid_tok.c +++ b/test/Preprocessor/expr_invalid_tok.c @@ -1,6 +1,6 @@ -// RUN: not clang-cc -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' -// RUN: not clang-cc -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' -// RUN: not clang-cc -E %s 2>&1 | grep ':14: error: expected end of line in preprocessor expression' +// RUN: not %clang_cc1 -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' +// RUN: not %clang_cc1 -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' +// RUN: not %clang_cc1 -E %s 2>&1 | grep ':14: error: expected end of line in preprocessor expression' // PR2220 #if 1 * * 2 diff --git a/test/Preprocessor/expr_liveness.c b/test/Preprocessor/expr_liveness.c index d44b196afa831..c3b64210bb498 100644 --- a/test/Preprocessor/expr_liveness.c +++ b/test/Preprocessor/expr_liveness.c @@ -1,5 +1,5 @@ -/* RUN: clang-cc -E %s -DNO_ERRORS -Werror -Wundef - RUN: not clang-cc -E %s +/* RUN: %clang_cc1 -E %s -DNO_ERRORS -Werror -Wundef + RUN: not %clang_cc1 -E %s */ #ifdef NO_ERRORS diff --git a/test/Preprocessor/expr_multichar.c b/test/Preprocessor/expr_multichar.c index 4df8f3d4f9eac..8ab12d9ab8aa9 100644 --- a/test/Preprocessor/expr_multichar.c +++ b/test/Preprocessor/expr_multichar.c @@ -1,4 +1,4 @@ -// RUN: clang-cc < %s -E -verify -triple i686-pc-linux-gnu +// RUN: %clang_cc1 < %s -E -verify -triple i686-pc-linux-gnu #if (('1234' >> 24) != '1') #error Bad multichar constant calculation! diff --git a/test/Preprocessor/expr_usual_conversions.c b/test/Preprocessor/expr_usual_conversions.c index 47aca7beca6f6..b1bddd34546cf 100644 --- a/test/Preprocessor/expr_usual_conversions.c +++ b/test/Preprocessor/expr_usual_conversions.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E 2>&1 | grep warning | wc -l | grep 2 +// RUN: %clang_cc1 %s -E 2>&1 | grep warning | wc -l | grep 2 #define INTMAX_MIN (-9223372036854775807LL -1) diff --git a/test/Preprocessor/extension-warning.c b/test/Preprocessor/extension-warning.c index 7b5095f6e9237..4ba57f78f77d3 100644 --- a/test/Preprocessor/extension-warning.c +++ b/test/Preprocessor/extension-warning.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s // The preprocessor shouldn't warn about extensions within macro bodies that // aren't expanded. diff --git a/test/Preprocessor/feature_tests.c b/test/Preprocessor/feature_tests.c index 9ccff0e12025e..35592bd8e1c3e 100644 --- a/test/Preprocessor/feature_tests.c +++ b/test/Preprocessor/feature_tests.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -triple=i686-apple-darwin9 -// RUN: clang-cc %s -E -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -E -triple=i686-apple-darwin9 #ifndef __has_feature #error Should have __has_feature #endif diff --git a/test/Preprocessor/function_macro_file.c b/test/Preprocessor/function_macro_file.c index 6a266dd0790a7..c97bb75d8a33b 100644 --- a/test/Preprocessor/function_macro_file.c +++ b/test/Preprocessor/function_macro_file.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -E -P %s | grep f +/* RUN: %clang_cc1 -E -P %s | grep f */ #include "function_macro_file.h" diff --git a/test/Preprocessor/has_include.c b/test/Preprocessor/has_include.c index 40697c099f4fc..c34c3488036a3 100644 --- a/test/Preprocessor/has_include.c +++ b/test/Preprocessor/has_include.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Eonly -verify %s +// RUN: %clang_cc1 -Eonly -verify %s // Try different path permutations of __has_include with existing file. #if __has_include("stdio.h") diff --git a/test/Preprocessor/hash_line.c b/test/Preprocessor/hash_line.c index 31f708ce73ad3..4f724dfbba916 100644 --- a/test/Preprocessor/hash_line.c +++ b/test/Preprocessor/hash_line.c @@ -1,7 +1,7 @@ // The 1 and # should not go on the same line. -// RUN: clang-cc %s -E | not grep "1 #" -// RUN: clang-cc %s -E | grep '^1$' -// RUN: clang-cc %s -E | grep '^ #$' +// RUN: %clang_cc1 %s -E | not grep "1 #" +// RUN: %clang_cc1 %s -E | grep '^1$' +// RUN: %clang_cc1 %s -E | grep '^ #$' 1 #define EMPTY EMPTY # diff --git a/test/Preprocessor/hash_space.c b/test/Preprocessor/hash_space.c index e7dbd3bc617b7..ac97556cda0dd 100644 --- a/test/Preprocessor/hash_space.c +++ b/test/Preprocessor/hash_space.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep " #" +// RUN: %clang_cc1 %s -E | grep " #" // Should put a space before the # so that -fpreprocessed mode doesn't // macro expand this again. diff --git a/test/Preprocessor/header_lookup1.c b/test/Preprocessor/header_lookup1.c index 961e55161418d..f93d0afe331ea 100644 --- a/test/Preprocessor/header_lookup1.c +++ b/test/Preprocessor/header_lookup1.c @@ -1,2 +1,2 @@ -// RUN: clang -fno-ms-extensions -I /usr/include %s -E | grep 'stdio.h.*3.*4' +// RUN: %clang -fno-ms-extensions -I /usr/include %s -E | grep 'stdio.h.*3.*4' #include <stdio.h> diff --git a/test/Preprocessor/if_warning.c b/test/Preprocessor/if_warning.c index 2ce7b31599821..98653a8feef6d 100644 --- a/test/Preprocessor/if_warning.c +++ b/test/Preprocessor/if_warning.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -Eonly -Werror=undef -verify -// RUN: clang-cc %s -Eonly -Werror-undef -verify +// RUN: %clang_cc1 %s -Eonly -Werror=undef -verify +// RUN: %clang_cc1 %s -Eonly -Werror-undef -verify extern int x; diff --git a/test/Preprocessor/ifdef-recover.c b/test/Preprocessor/ifdef-recover.c index 3fffcc0290dec..51d06d1f1b6eb 100644 --- a/test/Preprocessor/ifdef-recover.c +++ b/test/Preprocessor/ifdef-recover.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -E %s 2>&1 >/dev/null | grep error: | count 3 +/* RUN: %clang_cc1 -E %s 2>&1 >/dev/null | grep error: | count 3 */ #ifdef diff --git a/test/Preprocessor/import_self.c b/test/Preprocessor/import_self.c index 2cabe3d71ca64..8ba0b19c94ae8 100644 --- a/test/Preprocessor/import_self.c +++ b/test/Preprocessor/import_self.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -I. %s | grep BODY_OF_FILE | wc -l | grep 1 +// RUN: %clang_cc1 -E -I. %s | grep BODY_OF_FILE | wc -l | grep 1 // This #import should have no effect, as we're importing the current file. #import <import_self.c> diff --git a/test/Preprocessor/include-directive1.c b/test/Preprocessor/include-directive1.c index 66f70fb3a9e59..20f45829eebb7 100644 --- a/test/Preprocessor/include-directive1.c +++ b/test/Preprocessor/include-directive1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 3 +// RUN: %clang_cc1 -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 3 // XX expands to nothing. #define XX diff --git a/test/Preprocessor/include-directive2.c b/test/Preprocessor/include-directive2.c index 123998246bff5..b205325f601ed 100644 --- a/test/Preprocessor/include-directive2.c +++ b/test/Preprocessor/include-directive2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Eonly -verify %s +// RUN: %clang_cc1 -Eonly -verify %s # define HEADER <float.h> # include HEADER diff --git a/test/Preprocessor/include-directive3.c b/test/Preprocessor/include-directive3.c index e5b7a940c6cb4..c0e2ae124cd70 100644 --- a/test/Preprocessor/include-directive3.c +++ b/test/Preprocessor/include-directive3.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -include %S/file_to_include.h -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 1 +// RUN: %clang_cc1 -include %S/file_to_include.h -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 1 // PR3464 diff --git a/test/Preprocessor/include-macros.c b/test/Preprocessor/include-macros.c index d64ee5e3e6d9c..b86cd0df26119 100644 --- a/test/Preprocessor/include-macros.c +++ b/test/Preprocessor/include-macros.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -Dtest=FOO -imacros %S/pr2086.h %s | grep 'HERE: test' +// RUN: %clang_cc1 -E -Dtest=FOO -imacros %S/pr2086.h %s | grep 'HERE: test' // This should not be expanded into FOO because pr2086.h undefs 'test'. HERE: test diff --git a/test/Preprocessor/include-pth.c b/test/Preprocessor/include-pth.c index 5634d719f5677..e1d6685d1fa5f 100644 --- a/test/Preprocessor/include-pth.c +++ b/test/Preprocessor/include-pth.c @@ -1,3 +1,3 @@ -// RUN: clang-cc -emit-pth %s -o %t -// RUN: clang-cc -include-pth %t %s -E | grep 'file_to_include' | count 2 +// RUN: %clang_cc1 -emit-pth %s -o %t +// RUN: %clang_cc1 -include-pth %t %s -E | grep 'file_to_include' | count 2 #include "file_to_include.h" diff --git a/test/Preprocessor/indent_macro.c b/test/Preprocessor/indent_macro.c index f6b411e93ff0e..e69500750f51a 100644 --- a/test/Preprocessor/indent_macro.c +++ b/test/Preprocessor/indent_macro.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep '^ zzap$' +// RUN: %clang_cc1 -E %s | grep '^ zzap$' // zzap is on a new line, should be indented. #define BLAH zzap diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 163734e185e39..5796b11e14bd4 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -1,15 +1,15 @@ -// RUN: clang-cc -E -dM -x assembler-with-cpp < /dev/null | FileCheck -check-prefix ASM %s +// RUN: %clang_cc1 -E -dM -x assembler-with-cpp < /dev/null | FileCheck -check-prefix ASM %s // // ASM:#define __ASSEMBLER__ 1 // // -// RUN: clang-cc -fblocks -E -dM < /dev/null | FileCheck -check-prefix BLOCKS %s +// RUN: %clang_cc1 -fblocks -E -dM < /dev/null | FileCheck -check-prefix BLOCKS %s // // BLOCKS:#define __BLOCKS__ 1 // BLOCKS:#define __block __attribute__((__blocks__(byref))) // // -// RUN: clang-cc -x c++ -std=c++0x -E -dM < /dev/null | FileCheck -check-prefix CXX0X %s +// RUN: %clang_cc1 -x c++ -std=c++0x -E -dM < /dev/null | FileCheck -check-prefix CXX0X %s // // CXX0X:#define _GNU_SOURCE 1 // CXX0X:#define __DEPRECATED 1 @@ -20,7 +20,7 @@ // CXX0X:#define __private_extern__ extern // // -// RUN: clang-cc -x c++ -std=c++98 -E -dM < /dev/null | FileCheck -check-prefix CXX98 %s +// RUN: %clang_cc1 -x c++ -std=c++98 -E -dM < /dev/null | FileCheck -check-prefix CXX98 %s // // CXX98:#define _GNU_SOURCE 1 // CXX98:#define __DEPRECATED 1 @@ -30,13 +30,13 @@ // CXX98:#define __private_extern__ extern // // -// RUN: clang-cc -std=c99 -E -dM < /dev/null | FileCheck -check-prefix C99 %s +// RUN: %clang_cc1 -std=c99 -E -dM < /dev/null | FileCheck -check-prefix C99 %s // // C99:#define __STDC_VERSION__ 199901L // C99:#define __STRICT_ANSI__ 1 // // -// RUN: clang-cc -E -dM < /dev/null | FileCheck -check-prefix COMMON %s +// RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -check-prefix COMMON %s // // COMMON:#define __CONSTANT_CFSTRINGS__ 1 // COMMON:#define __FINITE_MATH_ONLY__ 0 @@ -53,10 +53,10 @@ // COMMON:#define __llvm__ 1 // // -// RUN: clang-cc -ffreestanding -E -dM < /dev/null | FileCheck -check-prefix FREESTANDING %s +// RUN: %clang_cc1 -ffreestanding -E -dM < /dev/null | FileCheck -check-prefix FREESTANDING %s // FREESTANDING:#define __STDC_HOSTED__ 0 // -// RUN: clang-cc -x c++ -std=gnu++98 -E -dM < /dev/null | FileCheck -check-prefix GXX98 %s +// RUN: %clang_cc1 -x c++ -std=gnu++98 -E -dM < /dev/null | FileCheck -check-prefix GXX98 %s // // GXX98:#define _GNU_SOURCE 1 // GXX98:#define __DEPRECATED 1 @@ -66,12 +66,12 @@ // GXX98:#define __private_extern__ extern // // -// RUN: clang-cc -std=iso9899:199409 -E -dM < /dev/null | FileCheck -check-prefix C94 %s +// RUN: %clang_cc1 -std=iso9899:199409 -E -dM < /dev/null | FileCheck -check-prefix C94 %s // // C94:#define __STDC_VERSION__ 199409L // // -// RUN: clang-cc -fms-extensions -E -dM < /dev/null | FileCheck -check-prefix MSEXT %s +// RUN: %clang_cc1 -fms-extensions -E -dM < /dev/null | FileCheck -check-prefix MSEXT %s // // MSEXT-NOT:#define __STDC__ // MSEXT:#define __int16 __INT16_TYPE__ @@ -80,45 +80,45 @@ // MSEXT:#define __int8 __INT8_TYPE__ // // -// RUN: clang-cc -x objective-c -E -dM < /dev/null | FileCheck -check-prefix OBJC %s +// RUN: %clang_cc1 -x objective-c -E -dM < /dev/null | FileCheck -check-prefix OBJC %s // // OBJC:#define OBJC_NEW_PROPERTIES 1 // OBJC:#define __NEXT_RUNTIME__ 1 // OBJC:#define __OBJC__ 1 // // -// RUN: clang-cc -x objective-c -fobjc-gc -E -dM < /dev/null | FileCheck -check-prefix OBJCGC %s +// RUN: %clang_cc1 -x objective-c -fobjc-gc -E -dM < /dev/null | FileCheck -check-prefix OBJCGC %s // // OBJCGC:#define __OBJC_GC__ 1 // // -// RUN: clang-cc -x objective-c -fobjc-nonfragile-abi -E -dM < /dev/null | FileCheck -check-prefix NONFRAGILE %s +// RUN: %clang_cc1 -x objective-c -fobjc-nonfragile-abi -E -dM < /dev/null | FileCheck -check-prefix NONFRAGILE %s // // NONFRAGILE:#define OBJC_ZEROCOST_EXCEPTIONS 1 // NONFRAGILE:#define __OBJC2__ 1 // // -// RUN: clang-cc -O1 -E -dM < /dev/null | FileCheck -check-prefix O1 %s +// RUN: %clang_cc1 -O1 -E -dM < /dev/null | FileCheck -check-prefix O1 %s // // O1:#define __OPTIMIZE__ 1 // // -// RUN: clang-cc -fpascal-strings -E -dM < /dev/null | FileCheck -check-prefix PASCAL %s +// RUN: %clang_cc1 -fpascal-strings -E -dM < /dev/null | FileCheck -check-prefix PASCAL %s // // PASCAL:#define __PASCAL_STRINGS__ 1 // // -// RUN: clang-cc -E -dM < /dev/null | FileCheck -check-prefix SCHAR %s +// RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -check-prefix SCHAR %s // // SCHAR:#define __STDC__ 1 // SCHAR-NOT:#define __UNSIGNED_CHAR__ // SCHAR:#define __clang__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=arm-none-none < /dev/null | FileCheck -check-prefix ARM %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-none < /dev/null | FileCheck -check-prefix ARM %s // // ARM:#define __APCS_32__ 1 // ARM:#define __ARMEL__ 1 -// ARM:#define __ARM_ARCH_6K__ 1 +// ARM:#define __ARM_ARCH_6J__ 1 // ARM:#define __CHAR_BIT__ 8 // ARM:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 // ARM:#define __DBL_DIG__ 15 @@ -180,6 +180,7 @@ // ARM:#define __POINTER_WIDTH__ 32 // ARM:#define __PTRDIFF_TYPE__ int // ARM:#define __PTRDIFF_WIDTH__ 32 +// ARM:#define __REGISTER_PREFIX__ // ARM:#define __SCHAR_MAX__ 127 // ARM:#define __SHRT_MAX__ 32767 // ARM:#define __SIG_ATOMIC_WIDTH__ 32 @@ -188,7 +189,6 @@ // ARM:#define __THUMB_INTERWORK__ 1 // ARM:#define __UINTMAX_TYPE__ long long unsigned int // ARM:#define __USER_LABEL_PREFIX__ _ -// ARM:#define __VFP_FP__ 1 // ARM:#define __WCHAR_MAX__ 2147483647 // ARM:#define __WCHAR_TYPE__ int // ARM:#define __WCHAR_WIDTH__ 32 @@ -197,7 +197,7 @@ // ARM:#define __arm 1 // ARM:#define __arm__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=bfin-none-none < /dev/null | FileCheck -check-prefix BFIN %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=bfin-none-none < /dev/null | FileCheck -check-prefix BFIN %s // // BFIN:#define BFIN 1 // BFIN:#define __ADSPBLACKFIN__ 1 @@ -280,7 +280,7 @@ // BFIN:#define __bfin__ 1 // BFIN:#define bfin 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s // // I386:#define __CHAR_BIT__ 8 // I386:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 @@ -364,7 +364,7 @@ // I386:#define __tune_nocona__ 1 // I386:#define i386 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -check-prefix MSP430 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -check-prefix MSP430 %s // // MSP430:#define MSP430 1 // MSP430:#define __CHAR_BIT__ 8 @@ -441,7 +441,7 @@ // MSP430:#define __WINT_WIDTH__ 16 // MSP430:#define __clang__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=pic16-none-none < /dev/null | FileCheck -check-prefix PIC16 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=pic16-none-none < /dev/null | FileCheck -check-prefix PIC16 %s // // PIC16:#define _CONFIG(conf) asm("CONFIG "#conf) // PIC16:#define __CHAR_BIT__ 8 @@ -524,7 +524,7 @@ // PIC16:#define ram __attribute__((address_space(0))) // PIC16:#define rom __attribute__((address_space(1))) // -// RUN: clang-cc -E -dM -ffreestanding -triple=powerpc64-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix PPC64 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix PPC64 %s // // PPC64:#define _ARCH_PPC 1 // PPC64:#define _ARCH_PPC64 1 @@ -612,7 +612,7 @@ // PPC64:#define __ppc64__ 1 // PPC64:#define __ppc__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=powerpc-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix PPC %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix PPC %s // // PPC:#define _ARCH_PPC 1 // PPC:#define _BIG_ENDIAN 1 @@ -696,7 +696,7 @@ // PPC:#define __WINT_WIDTH__ 32 // PPC:#define __ppc__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=s390x-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix S390X %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=s390x-none-none -fno-signed-char < /dev/null | FileCheck -check-prefix S390X %s // // S390X:#define __CHAR_BIT__ 8 // S390X:#define __CHAR_UNSIGNED__ 1 @@ -774,7 +774,7 @@ // S390X:#define __s390__ 1 // S390X:#define __s390x__ 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=sparc-none-none < /dev/null | FileCheck -check-prefix SPARC %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc-none-none < /dev/null | FileCheck -check-prefix SPARC %s // // SPARC:#define __CHAR_BIT__ 8 // SPARC:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 @@ -836,7 +836,7 @@ // SPARC:#define __POINTER_WIDTH__ 32 // SPARC:#define __PTRDIFF_TYPE__ long int // SPARC:#define __PTRDIFF_WIDTH__ 32 -// SPARC:#define __REGISTER_PREFIX__ +// SPARC:#define __REGISTER_PREFIX__ // SPARC:#define __SCHAR_MAX__ 127 // SPARC:#define __SHRT_MAX__ 32767 // SPARC:#define __SIG_ATOMIC_WIDTH__ 32 @@ -855,7 +855,7 @@ // SPARC:#define __sparcv8 1 // SPARC:#define sparc 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s // // TCE:#define __CHAR_BIT__ 8 // TCE:#define __DBL_DENORM_MIN__ 1.40129846e-45F @@ -933,7 +933,7 @@ // TCE:#define __tce__ 1 // TCE:#define tce 1 // -// RUN: clang-cc -E -dM -ffreestanding -triple=x86_64-none-none < /dev/null | FileCheck -check-prefix X86_64 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none < /dev/null | FileCheck -check-prefix X86_64 %s // // X86_64:#define _LP64 1 // X86_64:#define __CHAR_BIT__ 8 diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c index 33dd9bb3fe166..878d067a30ddf 100644 --- a/test/Preprocessor/line-directive.c +++ b/test/Preprocessor/line-directive.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s -// RUN: clang-cc -E %s 2>&1 | grep 'blonk.c:92:2: error: #error ABC' -// RUN: clang-cc -E %s 2>&1 | grep 'blonk.c:93:2: error: #error DEF' +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -E %s 2>&1 | grep 'blonk.c:92:2: error: #error ABC' +// RUN: %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error: #error DEF' #line 'a' // expected-error {{#line directive requires a positive integer argument}} #line 0 // expected-error {{#line directive requires a positive integer argument}} diff --git a/test/Preprocessor/macro-multiline.c b/test/Preprocessor/macro-multiline.c index 9f24ae8e5563a..df7c40a954d69 100644 --- a/test/Preprocessor/macro-multiline.c +++ b/test/Preprocessor/macro-multiline.c @@ -1,4 +1,4 @@ -// RUN: clang -E %s "-DX=A +// RUN: %clang -E %s "-DX=A // RUN: THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" > %t // RUN: grep "GOOD: A" %t // RUN: not grep THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT %t diff --git a/test/Preprocessor/macro_arg_keyword.c b/test/Preprocessor/macro_arg_keyword.c index 92b1ae5357133..b9bbbf3ee2d81 100644 --- a/test/Preprocessor/macro_arg_keyword.c +++ b/test/Preprocessor/macro_arg_keyword.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep xxx-xxx +// RUN: %clang_cc1 -E %s | grep xxx-xxx #define foo(return) return-return diff --git a/test/Preprocessor/macro_disable.c b/test/Preprocessor/macro_disable.c index f102ddddafc74..d6509c35bf2cc 100644 --- a/test/Preprocessor/macro_disable.c +++ b/test/Preprocessor/macro_disable.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -E %s | grep 'a: 2 + M_0(3)(4)(5);' -// RUN: clang-cc -E %s | grep 'b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);' +// RUN: %clang_cc1 -E %s | grep 'a: 2 + M_0(3)(4)(5);' +// RUN: %clang_cc1 -E %s | grep 'b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);' #define M_0(x) M_ ## x #define M_1(x) x + M_0(0) diff --git a/test/Preprocessor/macro_disable2.c b/test/Preprocessor/macro_disable2.c index 286539e96f43d..229cf3264bfe0 100644 --- a/test/Preprocessor/macro_disable2.c +++ b/test/Preprocessor/macro_disable2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep 'A B C A B A C A B C A' +// RUN: %clang_cc1 -E %s | grep 'A B C A B A C A B C A' #define A A B C #define B B C A diff --git a/test/Preprocessor/macro_disable3.c b/test/Preprocessor/macro_disable3.c index d4a5664ae9998..eab0a5e046311 100644 --- a/test/Preprocessor/macro_disable3.c +++ b/test/Preprocessor/macro_disable3.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 %s -E | FileCheck -strict-whitespace %s // Check for C99 6.10.3.4p2. #define f(a) f(x * (a)) diff --git a/test/Preprocessor/macro_disable4.c b/test/Preprocessor/macro_disable4.c index b652b988d0201..820858c37f640 100644 --- a/test/Preprocessor/macro_disable4.c +++ b/test/Preprocessor/macro_disable4.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -P -E %s | grep 'int f(void)' +// RUN: %clang_cc1 -P -E %s | grep 'int f(void)' // PR1820 #define f(x) h(x diff --git a/test/Preprocessor/macro_expand.c b/test/Preprocessor/macro_expand.c index a93c04e373c66..4dc03576cf537 100644 --- a/test/Preprocessor/macro_expand.c +++ b/test/Preprocessor/macro_expand.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -E %s | grep '^A: Y$' -// RUN: clang-cc -E %s | grep '^B: f()$' -// RUN: clang-cc -E %s | grep '^C: for()$' +// RUN: %clang_cc1 -E %s | grep '^A: Y$' +// RUN: %clang_cc1 -E %s | grep '^B: f()$' +// RUN: %clang_cc1 -E %s | grep '^C: for()$' #define X() Y #define Y() X diff --git a/test/Preprocessor/macro_expandloc.c b/test/Preprocessor/macro_expandloc.c index ce1efd20a277f..f4660132f5426 100644 --- a/test/Preprocessor/macro_expandloc.c +++ b/test/Preprocessor/macro_expandloc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E 2>&1 | grep '#include' +// RUN: %clang_cc1 %s -E 2>&1 | grep '#include' #define FOO 1 // The error message should be on the #include line, not the 1. diff --git a/test/Preprocessor/macro_expandloc2.c b/test/Preprocessor/macro_expandloc2.c index 9adf3fd911f93..4aa7dfe94426c 100644 --- a/test/Preprocessor/macro_expandloc2.c +++ b/test/Preprocessor/macro_expandloc2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E 2>&1 | grep '#include' +// RUN: %clang_cc1 %s -E 2>&1 | grep '#include' #define FOO BAR // The error message should be on the #include line, not the 1. diff --git a/test/Preprocessor/macro_fn.c b/test/Preprocessor/macro_fn.c index 5c55c0ceed5f1..85733b4af0689 100644 --- a/test/Preprocessor/macro_fn.c +++ b/test/Preprocessor/macro_fn.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -Eonly -std=c89 -pedantic -verify +/* RUN: %clang_cc1 %s -Eonly -std=c89 -pedantic -verify */ /* PR3937 */ #define zero() 0 diff --git a/test/Preprocessor/macro_fn_comma_swallow.c b/test/Preprocessor/macro_fn_comma_swallow.c index c98e37823453f..57425910b8a9e 100644 --- a/test/Preprocessor/macro_fn_comma_swallow.c +++ b/test/Preprocessor/macro_fn_comma_swallow.c @@ -1,7 +1,7 @@ // Test the GNU comma swallowing extension. -// RUN: clang-cc %s -E | grep 'foo{A, }' -// RUN: clang-cc %s -E | grep 'fo2{A,}' -// RUN: clang-cc %s -E | grep '{foo}' +// RUN: %clang_cc1 %s -E | grep 'foo{A, }' +// RUN: %clang_cc1 %s -E | grep 'fo2{A,}' +// RUN: %clang_cc1 %s -E | grep '{foo}' #define X(Y) foo{A, Y} X() @@ -15,7 +15,7 @@ X3(foo) -// RUN: clang-cc %s -E | grep 'AA BB' +// RUN: %clang_cc1 %s -E | grep 'AA BB' // PR3880 #define X4(...) AA , ## __VA_ARGS__ BB X4() diff --git a/test/Preprocessor/macro_fn_disable_expand.c b/test/Preprocessor/macro_fn_disable_expand.c index d40ee2aa6ec7f..16948dc61c347 100644 --- a/test/Preprocessor/macro_fn_disable_expand.c +++ b/test/Preprocessor/macro_fn_disable_expand.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | FileCheck %s +// RUN: %clang_cc1 %s -E | FileCheck %s #define foo(x) bar x foo(foo) (2) diff --git a/test/Preprocessor/macro_fn_lparen_scan.c b/test/Preprocessor/macro_fn_lparen_scan.c index 77e1fb9a3d4bd..02184695c3fd6 100644 --- a/test/Preprocessor/macro_fn_lparen_scan.c +++ b/test/Preprocessor/macro_fn_lparen_scan.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -E %s | grep 'noexp: foo y' -// RUN: clang-cc -E %s | grep 'expand: abc' -// RUN: clang-cc -E %s | grep 'noexp2: foo nonexp' -// RUN: clang-cc -E %s | grep 'expand2: abc' +// RUN: %clang_cc1 -E %s | grep 'noexp: foo y' +// RUN: %clang_cc1 -E %s | grep 'expand: abc' +// RUN: %clang_cc1 -E %s | grep 'noexp2: foo nonexp' +// RUN: %clang_cc1 -E %s | grep 'expand2: abc' #define A foo #define foo() abc diff --git a/test/Preprocessor/macro_fn_lparen_scan2.c b/test/Preprocessor/macro_fn_lparen_scan2.c index fb64befaf1e9a..c23e7412b8505 100644 --- a/test/Preprocessor/macro_fn_lparen_scan2.c +++ b/test/Preprocessor/macro_fn_lparen_scan2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep 'FUNC (3 +1);' +// RUN: %clang_cc1 -E %s | grep 'FUNC (3 +1);' #define F(a) a #define FUNC(a) (a+1) diff --git a/test/Preprocessor/macro_fn_placemarker.c b/test/Preprocessor/macro_fn_placemarker.c index ff688ce2d7ae5..17910544b8993 100644 --- a/test/Preprocessor/macro_fn_placemarker.c +++ b/test/Preprocessor/macro_fn_placemarker.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep 'foo(A, )' +// RUN: %clang_cc1 %s -E | grep 'foo(A, )' #define X(Y) foo(A, Y) X() diff --git a/test/Preprocessor/macro_fn_preexpand.c b/test/Preprocessor/macro_fn_preexpand.c index ac3b3530dc82a..1b94c82a21630 100644 --- a/test/Preprocessor/macro_fn_preexpand.c +++ b/test/Preprocessor/macro_fn_preexpand.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -E | grep 'pre: 1 1 X' -// RUN: clang-cc %s -E | grep 'nopre: 1A(X)' +// RUN: %clang_cc1 %s -E | grep 'pre: 1 1 X' +// RUN: %clang_cc1 %s -E | grep 'nopre: 1A(X)' /* Preexpansion of argument. */ #define A(X) 1 X diff --git a/test/Preprocessor/macro_fn_varargs_iso.c b/test/Preprocessor/macro_fn_varargs_iso.c index b1e5c52823325..a1aab26bae396 100644 --- a/test/Preprocessor/macro_fn_varargs_iso.c +++ b/test/Preprocessor/macro_fn_varargs_iso.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -E %s | grep 'foo{a, b, c, d, e}' -// RUN: clang-cc -E %s | grep 'foo2{d, C, B}' -// RUN: clang-cc -E %s | grep 'foo2{d,e, C, B}' +// RUN: %clang_cc1 -E %s | grep 'foo{a, b, c, d, e}' +// RUN: %clang_cc1 -E %s | grep 'foo2{d, C, B}' +// RUN: %clang_cc1 -E %s | grep 'foo2{d,e, C, B}' #define va1(...) foo{a, __VA_ARGS__, e} va1(b, c, d) diff --git a/test/Preprocessor/macro_fn_varargs_named.c b/test/Preprocessor/macro_fn_varargs_named.c index 94770a241d2f7..b50d53d46d015 100644 --- a/test/Preprocessor/macro_fn_varargs_named.c +++ b/test/Preprocessor/macro_fn_varargs_named.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -E %s | grep '^a: x$' -// RUN: clang-cc -E %s | grep '^b: x y, z,h$' -// RUN: clang-cc -E %s | grep '^c: foo(x)$' +// RUN: %clang_cc1 -E %s | grep '^a: x$' +// RUN: %clang_cc1 -E %s | grep '^b: x y, z,h$' +// RUN: %clang_cc1 -E %s | grep '^c: foo(x)$' #define A(b, c...) b c a: A(x) diff --git a/test/Preprocessor/macro_misc.c b/test/Preprocessor/macro_misc.c index 169c5ec772a29..53d99821ccd49 100644 --- a/test/Preprocessor/macro_misc.c +++ b/test/Preprocessor/macro_misc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -Eonly -verify +// RUN: %clang_cc1 %s -Eonly -verify // This should not be rejected. #ifdef defined diff --git a/test/Preprocessor/macro_not_define.c b/test/Preprocessor/macro_not_define.c index a42240bab6078..82648d47d447b 100644 --- a/test/Preprocessor/macro_not_define.c +++ b/test/Preprocessor/macro_not_define.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep '^ # define X 3$' +// RUN: %clang_cc1 -E %s | grep '^ # define X 3$' #define H # #define D define diff --git a/test/Preprocessor/macro_paste_bad.c b/test/Preprocessor/macro_paste_bad.c index 1212c44c1aa73..2af0173040dc4 100644 --- a/test/Preprocessor/macro_paste_bad.c +++ b/test/Preprocessor/macro_paste_bad.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Eonly -verify -pedantic %s +// RUN: %clang_cc1 -Eonly -verify -pedantic %s // pasting ""x"" and ""+"" does not give a valid preprocessing token #define XYZ x ## + XYZ // expected-error {{pasting formed 'x+', an invalid preprocessing token}} diff --git a/test/Preprocessor/macro_paste_bcpl_comment.c b/test/Preprocessor/macro_paste_bcpl_comment.c index 8bbee5dc2dd95..fd07b1f7f2fc8 100644 --- a/test/Preprocessor/macro_paste_bcpl_comment.c +++ b/test/Preprocessor/macro_paste_bcpl_comment.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -Eonly 2>&1 | grep error +// RUN: %clang_cc1 %s -Eonly 2>&1 | grep error #define COMM1 / ## / COMM1 diff --git a/test/Preprocessor/macro_paste_c_block_comment.c b/test/Preprocessor/macro_paste_c_block_comment.c index 2e5a2141698e6..3441f273d4607 100644 --- a/test/Preprocessor/macro_paste_c_block_comment.c +++ b/test/Preprocessor/macro_paste_c_block_comment.c @@ -1,6 +1,6 @@ -// RUN: clang-cc %s -Eonly 2>&1 | grep error -// RUN: clang-cc %s -Eonly 2>&1 | not grep unterminated -// RUN: clang-cc %s -Eonly 2>&1 | not grep scratch +// RUN: %clang_cc1 %s -Eonly 2>&1 | grep error +// RUN: %clang_cc1 %s -Eonly 2>&1 | not grep unterminated +// RUN: %clang_cc1 %s -Eonly 2>&1 | not grep scratch #define COMM / ## * COMM diff --git a/test/Preprocessor/macro_paste_commaext.c b/test/Preprocessor/macro_paste_commaext.c index fe9c92ab88385..7cfe43d077bef 100644 --- a/test/Preprocessor/macro_paste_commaext.c +++ b/test/Preprocessor/macro_paste_commaext.c @@ -1,8 +1,8 @@ -// RUN: clang-cc %s -E | grep 'V);' -// RUN: clang-cc %s -E | grep 'W, 1, 2);' -// RUN: clang-cc %s -E | grep 'X, 1, 2);' -// RUN: clang-cc %s -E | grep 'Y, );' -// RUN: clang-cc %s -E | grep 'Z, );' +// RUN: %clang_cc1 %s -E | grep 'V);' +// RUN: %clang_cc1 %s -E | grep 'W, 1, 2);' +// RUN: %clang_cc1 %s -E | grep 'X, 1, 2);' +// RUN: %clang_cc1 %s -E | grep 'Y, );' +// RUN: %clang_cc1 %s -E | grep 'Z, );' #define debug(format, ...) format, ## __VA_ARGS__) debug(V); diff --git a/test/Preprocessor/macro_paste_empty.c b/test/Preprocessor/macro_paste_empty.c index 41843cd24c765..2e26f14195734 100644 --- a/test/Preprocessor/macro_paste_empty.c +++ b/test/Preprocessor/macro_paste_empty.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -E %s | grep 'a:Y' -// RUN: clang-cc -E %s | grep 'b:Y' -// RUN: clang-cc -E %s | grep 'c:YY' +// RUN: %clang_cc1 -E %s | grep 'a:Y' +// RUN: %clang_cc1 -E %s | grep 'b:Y' +// RUN: %clang_cc1 -E %s | grep 'c:YY' #define FOO(X) X ## Y a:FOO() diff --git a/test/Preprocessor/macro_paste_hard.c b/test/Preprocessor/macro_paste_hard.c index adc447c39f67b..fad84264d7f11 100644 --- a/test/Preprocessor/macro_paste_hard.c +++ b/test/Preprocessor/macro_paste_hard.c @@ -1,6 +1,6 @@ -// RUN: clang-cc -E %s | grep '1: aaab 2' -// RUN: clang-cc -E %s | grep '2: 2 baaa' -// RUN: clang-cc -E %s | grep '3: 2 xx' +// RUN: %clang_cc1 -E %s | grep '1: aaab 2' +// RUN: %clang_cc1 -E %s | grep '2: 2 baaa' +// RUN: %clang_cc1 -E %s | grep '3: 2 xx' #define a(n) aaa ## n #define b 2 diff --git a/test/Preprocessor/macro_paste_hashhash.c b/test/Preprocessor/macro_paste_hashhash.c index 42654fd1b18b0..e7993cc0a3517 100644 --- a/test/Preprocessor/macro_paste_hashhash.c +++ b/test/Preprocessor/macro_paste_hashhash.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep '^"x ## y";$' +// RUN: %clang_cc1 -E %s | grep '^"x ## y";$' #define hash_hash # ## # #define mkstr(a) # a #define in_between(a) mkstr(a) diff --git a/test/Preprocessor/macro_paste_mscomment.c b/test/Preprocessor/macro_paste_mscomment.c index ecd0b9d6a8504..71324064f7cd8 100644 --- a/test/Preprocessor/macro_paste_mscomment.c +++ b/test/Preprocessor/macro_paste_mscomment.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -P -E -fms-extensions %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -P -E -fms-extensions %s | FileCheck -strict-whitespace %s // This horrible stuff should preprocess into (other than whitespace): // int foo; // int bar; diff --git a/test/Preprocessor/macro_paste_none.c b/test/Preprocessor/macro_paste_none.c index e978fca225081..97ccd7c5cb021 100644 --- a/test/Preprocessor/macro_paste_none.c +++ b/test/Preprocessor/macro_paste_none.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep '!!' +// RUN: %clang_cc1 -E %s | grep '!!' #define A(B,C) B ## C diff --git a/test/Preprocessor/macro_paste_simple.c b/test/Preprocessor/macro_paste_simple.c index 2affbac0dec37..563d7f44958d5 100644 --- a/test/Preprocessor/macro_paste_simple.c +++ b/test/Preprocessor/macro_paste_simple.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep "barbaz123" +// RUN: %clang_cc1 %s -E | grep "barbaz123" #define FOO bar ## baz ## 123 diff --git a/test/Preprocessor/macro_paste_spacing.c b/test/Preprocessor/macro_paste_spacing.c index 130548dbf99ee..6498ffc9814da 100644 --- a/test/Preprocessor/macro_paste_spacing.c +++ b/test/Preprocessor/macro_paste_spacing.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep "^xy$" +// RUN: %clang_cc1 %s -E | grep "^xy$" #define A x ## y blah diff --git a/test/Preprocessor/macro_paste_spacing2.c b/test/Preprocessor/macro_paste_spacing2.c index 0db721aa7b41c..02cc12f5b0231 100644 --- a/test/Preprocessor/macro_paste_spacing2.c +++ b/test/Preprocessor/macro_paste_spacing2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep "movl %eax" +// RUN: %clang_cc1 %s -E | grep "movl %eax" // PR4132 #define R1E %eax #define epilogue(r1) movl r1 ## E; diff --git a/test/Preprocessor/macro_rescan.c b/test/Preprocessor/macro_rescan.c index c6a807ae4e02b..3a3854841cd9f 100644 --- a/test/Preprocessor/macro_rescan.c +++ b/test/Preprocessor/macro_rescan.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -E %s | grep 'ei_1 = (17 +1);' -// RUN: clang-cc -E %s | grep 'ei_2 = (M1)(17);' +// RUN: %clang_cc1 -E %s | grep 'ei_1 = (17 +1);' +// RUN: %clang_cc1 -E %s | grep 'ei_2 = (M1)(17);' #define M1(a) (a+1) #define M2(b) b diff --git a/test/Preprocessor/macro_rescan2.c b/test/Preprocessor/macro_rescan2.c index 9c198c995a543..826f4eefbebc4 100644 --- a/test/Preprocessor/macro_rescan2.c +++ b/test/Preprocessor/macro_rescan2.c @@ -1,5 +1,5 @@ -// RUN: clang-cc %s -E | grep 'a: 2\*f(9)' -// RUN: clang-cc %s -E | grep 'b: 2\*9\*g' +// RUN: %clang_cc1 %s -E | grep 'a: 2\*f(9)' +// RUN: %clang_cc1 %s -E | grep 'b: 2\*9\*g' #define f(a) a*g #define g f diff --git a/test/Preprocessor/macro_rescan_varargs.c b/test/Preprocessor/macro_rescan_varargs.c index 8a3ad151141fc..6c6415a8ee530 100644 --- a/test/Preprocessor/macro_rescan_varargs.c +++ b/test/Preprocessor/macro_rescan_varargs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define LPAREN ( #define RPAREN ) diff --git a/test/Preprocessor/macro_rparen_scan.c b/test/Preprocessor/macro_rparen_scan.c index 927509883845c..e4de5dbcef0c9 100644 --- a/test/Preprocessor/macro_rparen_scan.c +++ b/test/Preprocessor/macro_rparen_scan.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep '^3 ;$' +// RUN: %clang_cc1 -E %s | grep '^3 ;$' /* Right paren scanning, hard case. Should expand to 3. */ #define i(x) 3 diff --git a/test/Preprocessor/macro_rparen_scan2.c b/test/Preprocessor/macro_rparen_scan2.c index c7fb9e3b08c94..42aa5445e9051 100644 --- a/test/Preprocessor/macro_rparen_scan2.c +++ b/test/Preprocessor/macro_rparen_scan2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define R_PAREN ) diff --git a/test/Preprocessor/macro_space.c b/test/Preprocessor/macro_space.c index 4fdbb0a0ceef4..49a9a0fac2cf9 100644 --- a/test/Preprocessor/macro_space.c +++ b/test/Preprocessor/macro_space.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -E | grep '! ,' +// RUN: %clang_cc1 %s -E | grep '! ,' #define XX ! XX, diff --git a/test/Preprocessor/macro_undef.c b/test/Preprocessor/macro_undef.c index 4507cddcb7964..c842c850f3df4 100644 --- a/test/Preprocessor/macro_undef.c +++ b/test/Preprocessor/macro_undef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -dM -undef -Dfoo=1 -E %s | FileCheck %s +// RUN: %clang_cc1 -dM -undef -Dfoo=1 -E %s | FileCheck %s // CHECK-NOT: #define __clang__ // CHECK: #define foo 1 diff --git a/test/Preprocessor/mi_opt.c b/test/Preprocessor/mi_opt.c index aa69e2b4aeac3..597ac072b871b 100644 --- a/test/Preprocessor/mi_opt.c +++ b/test/Preprocessor/mi_opt.c @@ -1,4 +1,4 @@ -// RUN: not clang-cc -fsyntax-only %s +// RUN: not %clang_cc1 -fsyntax-only %s // PR1900 // This test should get a redefinition error from m_iopt.h: the MI opt // shouldn't apply. diff --git a/test/Preprocessor/non_fragile_feature.m b/test/Preprocessor/non_fragile_feature.m index dbf1f9a797e26..552209d4955e1 100644 --- a/test/Preprocessor/non_fragile_feature.m +++ b/test/Preprocessor/non_fragile_feature.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi %s #ifndef __has_feature #error Should have __has_feature #endif diff --git a/test/Preprocessor/non_fragile_feature1.m b/test/Preprocessor/non_fragile_feature1.m index 5943e01b517ee..89b52ed53bf58 100644 --- a/test/Preprocessor/non_fragile_feature1.m +++ b/test/Preprocessor/non_fragile_feature1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-unknown-unknown %s +// RUN: %clang_cc1 -triple i386-unknown-unknown %s #ifndef __has_feature #error Should have __has_feature #endif diff --git a/test/Preprocessor/objc-pp.m b/test/Preprocessor/objc-pp.m index 9f375efec2c02..3e093252c644e 100644 --- a/test/Preprocessor/objc-pp.m +++ b/test/Preprocessor/objc-pp.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic #import <stdint.h> // no warning on #import in objc mode. diff --git a/test/Preprocessor/optimize.c b/test/Preprocessor/optimize.c index 973d27f8c8b5a..c820ded909f76 100644 --- a/test/Preprocessor/optimize.c +++ b/test/Preprocessor/optimize.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Eonly %s -DOPT_O2 -O2 -verify +// RUN: %clang_cc1 -Eonly %s -DOPT_O2 -O2 -verify #ifdef OPT_O2 #ifndef __OPTIMIZE__ #error "__OPTIMIZE__ not defined" @@ -8,7 +8,7 @@ #endif #endif -// RUN: clang-cc -Eonly %s -DOPT_O0 -O0 -verify +// RUN: %clang_cc1 -Eonly %s -DOPT_O0 -O0 -verify #ifdef OPT_O0 #ifdef __OPTIMIZE__ #error "__OPTIMIZE__ defined" @@ -18,7 +18,7 @@ #endif #endif -// RUN: clang-cc -Eonly %s -DOPT_OS -Os -verify +// RUN: %clang_cc1 -Eonly %s -DOPT_OS -Os -verify #ifdef OPT_OS #ifndef __OPTIMIZE__ #error "__OPTIMIZE__ not defined" diff --git a/test/Preprocessor/output_paste_avoid.c b/test/Preprocessor/output_paste_avoid.c index 200ced9fba7a2..835a921fb7d62 100644 --- a/test/Preprocessor/output_paste_avoid.c +++ b/test/Preprocessor/output_paste_avoid.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s -o - | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s -o - | FileCheck -strict-whitespace %s #define y(a) ..a diff --git a/test/Preprocessor/overflow.c b/test/Preprocessor/overflow.c index 297a35e658fd8..a921441b006d6 100644 --- a/test/Preprocessor/overflow.c +++ b/test/Preprocessor/overflow.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Eonly %s -verify -triple i686-pc-linux-gnu +// RUN: %clang_cc1 -Eonly %s -verify -triple i686-pc-linux-gnu // Multiply signed overflow #if 0x7FFFFFFFFFFFFFFF*2 // expected-warning {{overflow}} diff --git a/test/Preprocessor/pic.c b/test/Preprocessor/pic.c index b8068faac8c09..886beb7159539 100644 --- a/test/Preprocessor/pic.c +++ b/test/Preprocessor/pic.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -static -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -static -dM -E -o %t %s // RUN: grep '#define __PIC__' %t | count 0 // RUN: grep '#define __pic__' %t | count 0 -// RUN: clang -ccc-host-triple i386-unknown-unknown -fpic -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -fpic -dM -E -o %t %s // RUN: grep '#define __PIC__ 1' %t | count 1 // RUN: grep '#define __pic__ 1' %t | count 1 -// RUN: clang -ccc-host-triple i386-unknown-unknown -fPIC -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -fPIC -dM -E -o %t %s // RUN: grep '#define __PIC__ 2' %t | count 1 // RUN: grep '#define __pic__ 2' %t | count 1 diff --git a/test/Preprocessor/pr2086.c b/test/Preprocessor/pr2086.c index 4df65a4f7c67e..d438e879c51c0 100644 --- a/test/Preprocessor/pr2086.c +++ b/test/Preprocessor/pr2086.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s +// RUN: %clang_cc1 -E %s #define test #include "pr2086.h" diff --git a/test/Preprocessor/pragma_diagnostic.c b/test/Preprocessor/pragma_diagnostic.c new file mode 100644 index 0000000000000..d157406b3dc6f --- /dev/null +++ b/test/Preprocessor/pragma_diagnostic.c @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-undef %s +// rdar://2362963 + +#if FOO // ok. +#endif + +#pragma GCC diagnostic warning "-Wundef" + +#if FOO // expected-warning {{'FOO' is not defined}} +#endif + +#pragma GCC diagnostic ignored "-Wun" "def" + +#if FOO // ok. +#endif + +#pragma GCC diagnostic error "-Wundef" + +#if FOO // expected-error {{'FOO' is not defined}} +#endif + + + +#define foo error +#pragma GCC diagnostic foo "-Wundef" // expected-warning {{pragma diagnostic expected 'error', 'warning', 'ignored', or 'fatal'}} + +#pragma GCC diagnostic error 42 // expected-warning {{unexpected token in pragma diagnostic}} + +#pragma GCC diagnostic error "-Wundef" 42 // expected-warning {{unexpected token in pragma diagnostic}} +#pragma GCC diagnostic error "invalid-name" // expected-warning {{pragma diagnostic expected option name (e.g. "-Wundef")}} + +#pragma GCC diagnostic error "-Winvalid-name" // expected-warning {{unknown warning group '-Winvalid-name', ignored}} + diff --git a/test/Preprocessor/pragma_microsoft.c b/test/Preprocessor/pragma_microsoft.c index 81e90e3de69fa..0201c451deaa0 100644 --- a/test/Preprocessor/pragma_microsoft.c +++ b/test/Preprocessor/pragma_microsoft.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fms-extensions +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions // rdar://6495941 diff --git a/test/Preprocessor/pragma_poison.c b/test/Preprocessor/pragma_poison.c index d91feb7ff2dee..5b39183b60d36 100644 --- a/test/Preprocessor/pragma_poison.c +++ b/test/Preprocessor/pragma_poison.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -Eonly -verify +// RUN: %clang_cc1 %s -Eonly -verify #pragma GCC poison rindex rindex(some_string, 'h'); // expected-error {{attempt to use a poisoned identifier}} diff --git a/test/Preprocessor/pragma_sysheader.c b/test/Preprocessor/pragma_sysheader.c index 49082b8c09d16..cf2843bffdea7 100644 --- a/test/Preprocessor/pragma_sysheader.c +++ b/test/Preprocessor/pragma_sysheader.c @@ -1,3 +1,3 @@ -// RUN: clang -verify -pedantic %s -fsyntax-only +// RUN: %clang -verify -pedantic %s -fsyntax-only // rdar://6899937 #include "pragma_sysheader.h" diff --git a/test/Preprocessor/pragma_unknown.c b/test/Preprocessor/pragma_unknown.c index c0355e7a96140..c1851534cc334 100644 --- a/test/Preprocessor/pragma_unknown.c +++ b/test/Preprocessor/pragma_unknown.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -E %s | grep '#pragma foo bar' -// RUN: clang-cc -fsyntax-only -Wunknown-pragmas -verify %s +// RUN: %clang_cc1 -E %s | grep '#pragma foo bar' +// RUN: %clang_cc1 -fsyntax-only -Wunknown-pragmas -verify %s // GCC doesn't expand macro args for unrecognized pragmas. #define bar xX diff --git a/test/Preprocessor/print_line_count.c b/test/Preprocessor/print_line_count.c index 2eb62df486880..6a02b0eede00a 100644 --- a/test/Preprocessor/print_line_count.c +++ b/test/Preprocessor/print_line_count.c @@ -1,4 +1,4 @@ -/* RUN: clang -E -C -P %s | wc -l | grep 4 +/* RUN: %clang -E -C -P %s | wc -l | grep 4 PR2741 comment */ y diff --git a/test/Preprocessor/print_line_track.c b/test/Preprocessor/print_line_track.c index 553c1861023a7..c87fe00f407e0 100644 --- a/test/Preprocessor/print_line_track.c +++ b/test/Preprocessor/print_line_track.c @@ -1,8 +1,8 @@ -/* RUN: clang-cc -E %s | grep 'a 3' - * RUN: clang-cc -E %s | grep 'b 16' - * RUN: clang-cc -E -P %s | grep 'a 3' - * RUN: clang-cc -E -P %s | grep 'b 16' - * RUN: clang-cc -E %s | not grep '# 0 ' +/* RUN: %clang_cc1 -E %s | grep 'a 3' + * RUN: %clang_cc1 -E %s | grep 'b 16' + * RUN: %clang_cc1 -E -P %s | grep 'a 3' + * RUN: %clang_cc1 -E -P %s | grep 'b 16' + * RUN: %clang_cc1 -E %s | not grep '# 0 ' * PR1848 * PR3437 */ diff --git a/test/Preprocessor/pushable-diagnostics.c b/test/Preprocessor/pushable-diagnostics.c index fe55122d66cd1..6c861a1b3b6be 100644 --- a/test/Preprocessor/pushable-diagnostics.c +++ b/test/Preprocessor/pushable-diagnostics.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s #pragma clang diagnostic pop // expected-warning{{pragma diagnostic pop could not pop, no matching push}} diff --git a/test/Preprocessor/skipping_unclean.c b/test/Preprocessor/skipping_unclean.c index 31ce9b460def9..52d1785030b68 100644 --- a/test/Preprocessor/skipping_unclean.c +++ b/test/Preprocessor/skipping_unclean.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep bark +// RUN: %clang_cc1 -E %s | grep bark #if 0 blah diff --git a/test/Preprocessor/stdint.c b/test/Preprocessor/stdint.c index 930474645f174..5f0842a616b06 100644 --- a/test/Preprocessor/stdint.c +++ b/test/Preprocessor/stdint.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s +// RUN: %clang_cc1 -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s // // ARM:typedef signed long long int int64_t; // ARM:typedef unsigned long long int uint64_t; @@ -106,7 +106,7 @@ // ARM:UINTMAX_C_(0) 0ULL // // -// RUN: clang-cc -E -ffreestanding -triple=bfin-none-none %s | FileCheck -check-prefix BFIN %s +// RUN: %clang_cc1 -E -ffreestanding -triple=bfin-none-none %s | FileCheck -check-prefix BFIN %s // // BFIN:typedef signed long long int int64_t; // BFIN:typedef unsigned long long int uint64_t; @@ -214,7 +214,7 @@ // BFIN:UINTMAX_C_(0) 0ULL // // -// RUN: clang-cc -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s +// RUN: %clang_cc1 -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s // // I386:typedef signed long long int int64_t; // I386:typedef unsigned long long int uint64_t; @@ -321,7 +321,7 @@ // I386:INTMAX_C_(0) 0LL // I386:UINTMAX_C_(0) 0ULL // -// RUN: clang-cc -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s +// RUN: %clang_cc1 -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s // // MSP430:typedef signed long int int32_t; // MSP430:typedef unsigned long int uint32_t; @@ -421,7 +421,7 @@ // MSP430:INTMAX_C_(0) 0L // MSP430:UINTMAX_C_(0) 0UL // -// RUN: clang-cc -E -ffreestanding -triple=pic16-none-none %s | FileCheck -check-prefix PIC16 %s +// RUN: %clang_cc1 -E -ffreestanding -triple=pic16-none-none %s | FileCheck -check-prefix PIC16 %s // // PIC16:typedef signed long int int32_t; // PIC16:typedef unsigned long int uint32_t; @@ -521,7 +521,7 @@ // PIC16:INTMAX_C_(0) 0L // PIC16:UINTMAX_C_(0) 0UL // -// RUN: clang-cc -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s +// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s // // PPC64:typedef signed long int int64_t; // PPC64:typedef unsigned long int uint64_t; @@ -628,7 +628,7 @@ // PPC64:INTMAX_C_(0) 0L // PPC64:UINTMAX_C_(0) 0UL // -// RUN: clang-cc -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s +// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s // // // PPC:typedef signed long long int int64_t; @@ -736,7 +736,7 @@ // PPC:INTMAX_C_(0) 0LL // PPC:UINTMAX_C_(0) 0ULL // -// RUN: clang-cc -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s +// RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s // // S390X:typedef signed long int int64_t; // S390X:typedef unsigned long int uint64_t; @@ -843,7 +843,7 @@ // S390X:INTMAX_C_(0) 0L // S390X:UINTMAX_C_(0) 0UL // -// RUN: clang-cc -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s +// RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s // // SPARC:typedef signed long long int int64_t; // SPARC:typedef unsigned long long int uint64_t; @@ -950,7 +950,7 @@ // SPARC:INTMAX_C_(0) 0LL // SPARC:UINTMAX_C_(0) 0ULL // -// RUN: clang-cc -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s +// RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s // // TCE:typedef signed int int32_t; // TCE:typedef unsigned int uint32_t; @@ -1050,7 +1050,7 @@ // TCE:INTMAX_C_(0) 0 // TCE:UINTMAX_C_(0) 0U // -// RUN: clang-cc -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s +// RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s // // // X86_64:typedef signed long int int64_t; @@ -1165,7 +1165,7 @@ // the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN, // _MAX, and _C(v)) are themselves macros. // -// RUN: clang-cc -E -ffreestanding -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s +// RUN: %clang_cc1 -E -ffreestanding -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s // JOIN:typedef int32_t intptr_t; // JOIN:typedef uint32_t uintptr_t; // JOIN:typedef int64_t intmax_t; diff --git a/test/Preprocessor/stringize_misc.c b/test/Preprocessor/stringize_misc.c index 60d66a0061f67..6c2c78d17ac3a 100644 --- a/test/Preprocessor/stringize_misc.c +++ b/test/Preprocessor/stringize_misc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -E %s | FileCheck -strict-whitespace %s #define M(x, y) #x #y diff --git a/test/Preprocessor/stringize_space.c b/test/Preprocessor/stringize_space.c index e41736c816834..263cff831b3f8 100644 --- a/test/Preprocessor/stringize_space.c +++ b/test/Preprocessor/stringize_space.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E %s | grep -- '-"" , - "" , -"" , - ""' +// RUN: %clang_cc1 -E %s | grep -- '-"" , - "" , -"" , - ""' #define A(b) -#b , - #b , -# b , - # b A() diff --git a/test/Preprocessor/stringize_space2.c b/test/Preprocessor/stringize_space2.c index 6a96894de6ee2..a87d78e404376 100644 --- a/test/Preprocessor/stringize_space2.c +++ b/test/Preprocessor/stringize_space2.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -E %s | grep 'a c' +/* RUN: %clang_cc1 -E %s | grep 'a c' */ #define t(x) #x t(a diff --git a/test/Preprocessor/undef-error.c b/test/Preprocessor/undef-error.c index f818e59a6d1fb..ad611decedda2 100644 --- a/test/Preprocessor/undef-error.c +++ b/test/Preprocessor/undef-error.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -pedantic-errors -verify +// RUN: %clang_cc1 %s -pedantic-errors -verify // PR2045 #define b diff --git a/test/Preprocessor/unterminated.c b/test/Preprocessor/unterminated.c index 2040aac17de2b..918065315dc63 100644 --- a/test/Preprocessor/unterminated.c +++ b/test/Preprocessor/unterminated.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -E -verify %s +// RUN: %clang_cc1 -E -verify %s // PR3096 #ifdef FOO // expected-error {{unterminated conditional directive}} /* /* */ diff --git a/test/Preprocessor/x86_target_features.c b/test/Preprocessor/x86_target_features.c index f8574e25d4747..f39c2208a4c18 100644 --- a/test/Preprocessor/x86_target_features.c +++ b/test/Preprocessor/x86_target_features.c @@ -1,6 +1,6 @@ // FIXME: Use -triple, not -ccc-host-triple. -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t // RUN: grep '#define __SSE2__ 1' %t // RUN: grep '#define __SSE3__ 1' %t @@ -10,7 +10,7 @@ // RUN: grep '#define __SSE__ 1' %t // RUN: grep '#define __SSSE3__ 1' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -mno-sse2 -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -mno-sse2 -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t | count 0 // RUN: grep '#define __SSE2__ 1' %t | count 0 // RUN: grep '#define __SSE3__ 1' %t | count 0 @@ -20,7 +20,7 @@ // RUN: grep '#define __SSE__ 1' %t // RUN: grep '#define __SSSE3__ 1' %t | count 0 -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=pentium-m -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=pentium-m -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t // RUN: grep '#define __SSE2__ 1' %t // RUN: grep '#define __SSE3__ 1' %t | count 0 diff --git a/test/Rewriter/block-test.c b/test/Rewriter/block-test.c deleted file mode 100644 index 5057056eb3d04..0000000000000 --- a/test/Rewriter/block-test.c +++ /dev/null @@ -1,38 +0,0 @@ -// RUN: clang -cc1 -rewrite-blocks %s -fblocks -o - - -static int (^block)(const void *, const void *) = (int (^)(const void *, const void *))0; -static int (*func)(int (^block)(void *, void *)) = (int (*)(int (^block)(void *, void *)))0; - -typedef int (^block_T)(const void *, const void *); -typedef int (*func_T)(int (^block)(void *, void *)); - -void foo(const void *a, const void *b, void *c) { - int (^block)(const void *, const void *) = (int (^)(const void *, const void *))c; - int (*func)(int (^block)(void *, void *)) = (int (*)(int (^block)(void *, void *)))c; -} - -typedef void (^test_block_t)(); - -int main(int argc, char **argv) { - int a; - - void (^test_block_v)(); - void (^test_block_v2)(int, float); - - void (^test_block_v3)(void (^barg)(int)); - - a = 77; - test_block_v = ^(){ int local=1; printf("a=%d\n",a+local); }; - test_block_v(); - a++; - test_block_v(); - - __block int b; - - b = 88; - test_block_v2 = ^(int x, float f){ printf("b=%d\n",b); }; - test_block_v2(1,2.0); - b++; - test_block_v2(3,4.0); - return 7; -} diff --git a/test/Rewriter/crash.m b/test/Rewriter/crash.m index 60d6d1534cdc4..107b7a54843d1 100644 --- a/test/Rewriter/crash.m +++ b/test/Rewriter/crash.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc -o - %s +// RUN: %clang_cc1 -rewrite-objc -o - %s // rdar://5950938 @interface NSArray {} + (id)arrayWithObjects:(id)firstObj, ...; diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m index ae650568abf12..67774b5d9cda2 100644 --- a/test/Rewriter/finally.m +++ b/test/Rewriter/finally.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc -verify %s -o - +// RUN: %clang_cc1 -rewrite-objc -verify %s -o - int main() { @try { diff --git a/test/Rewriter/id-test-3.m b/test/Rewriter/id-test-3.m index 0edd041197abe..8557f2baa6679 100644 --- a/test/Rewriter/id-test-3.m +++ b/test/Rewriter/id-test-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol P - (id<P>) Meth: (id<P>) Arg; diff --git a/test/Rewriter/ivar-encoding-1.m b/test/Rewriter/ivar-encoding-1.m index 667c7270e8350..af11ce2469399 100644 --- a/test/Rewriter/ivar-encoding-1.m +++ b/test/Rewriter/ivar-encoding-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface Intf { diff --git a/test/Rewriter/ivar-encoding-2.m b/test/Rewriter/ivar-encoding-2.m index 6a4966bb2760c..4650bdefcc6fd 100644 --- a/test/Rewriter/ivar-encoding-2.m +++ b/test/Rewriter/ivar-encoding-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @implementation Intf { diff --git a/test/Rewriter/metadata-test-1.m b/test/Rewriter/metadata-test-1.m index bfbe486ea487a..5dc1a33301e2c 100644 --- a/test/Rewriter/metadata-test-1.m +++ b/test/Rewriter/metadata-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface Intf @end diff --git a/test/Rewriter/metadata-test-2.m b/test/Rewriter/metadata-test-2.m index c9f937f187980..0fd0429b0b313 100644 --- a/test/Rewriter/metadata-test-2.m +++ b/test/Rewriter/metadata-test-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - typedef struct _NSPoint { float x; diff --git a/test/Rewriter/method-encoding-1.m b/test/Rewriter/method-encoding-1.m index 77bbd8c25cb22..08ee24b135c71 100644 --- a/test/Rewriter/method-encoding-1.m +++ b/test/Rewriter/method-encoding-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol P1 - (void) MyProtoMeth : (int **) arg1 : (void*) arg2; diff --git a/test/Rewriter/objc-encoding-bug-1.m b/test/Rewriter/objc-encoding-bug-1.m index 797b5bbc03a4c..5605b6627fac8 100644 --- a/test/Rewriter/objc-encoding-bug-1.m +++ b/test/Rewriter/objc-encoding-bug-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - typedef struct NSMethodFrameArgInfo { struct NSMethodFrameArgInfo *subInfo; diff --git a/test/Rewriter/objc-ivar-receiver-1.m b/test/Rewriter/objc-ivar-receiver-1.m index 7bf3544a36eaa..5fb028e808e94 100644 --- a/test/Rewriter/objc-ivar-receiver-1.m +++ b/test/Rewriter/objc-ivar-receiver-1.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - -// RUN: clang -cc1 -rewrite-objc %s -o - | grep 'newInv->_container' +// RUN: %clang_cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - | grep 'newInv->_container' @interface NSMutableArray - (void)addObject:(id)addObject; diff --git a/test/Rewriter/objc-string-concat-1.m b/test/Rewriter/objc-string-concat-1.m index bf189beef251c..32b25261465fb 100644 --- a/test/Rewriter/objc-string-concat-1.m +++ b/test/Rewriter/objc-string-concat-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @class NSString; diff --git a/test/Rewriter/objc-super-test.m b/test/Rewriter/objc-super-test.m index 7a3b3af656ae9..38f68b98535a9 100644 --- a/test/Rewriter/objc-super-test.m +++ b/test/Rewriter/objc-super-test.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - | grep objc_msgSendSuper | grep MainMethod +// RUN: %clang_cc1 -rewrite-objc %s -o - | grep objc_msgSendSuper | grep MainMethod typedef struct objc_selector *SEL; typedef struct objc_object *id; diff --git a/test/Rewriter/objc-synchronized-1.m b/test/Rewriter/objc-synchronized-1.m index 3359660e112de..27f2a0af8bdf9 100644 --- a/test/Rewriter/objc-synchronized-1.m +++ b/test/Rewriter/objc-synchronized-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - id SYNCH_EXPR(); void SYNCH_BODY(); diff --git a/test/Rewriter/properties.m b/test/Rewriter/properties.m index 3b49c22f8e26a..44c55b1b69c4a 100644 --- a/test/Rewriter/properties.m +++ b/test/Rewriter/properties.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface Foo { int i; diff --git a/test/Rewriter/protocol-rewrite-1.m b/test/Rewriter/protocol-rewrite-1.m index 66280ca1b0f20..440527b6737ca 100644 --- a/test/Rewriter/protocol-rewrite-1.m +++ b/test/Rewriter/protocol-rewrite-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - typedef struct MyWidget { int a; diff --git a/test/Rewriter/rewrite-api-bug.m b/test/Rewriter/rewrite-api-bug.m index 745efec5bd9e2..03fc89f34aadb 100644 --- a/test/Rewriter/rewrite-api-bug.m +++ b/test/Rewriter/rewrite-api-bug.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface MyDerived - (void) instanceMethod; diff --git a/test/Rewriter/rewrite-block-ivar-call.mm b/test/Rewriter/rewrite-block-ivar-call.mm new file mode 100644 index 0000000000000..80e8caab7271b --- /dev/null +++ b/test/Rewriter/rewrite-block-ivar-call.mm @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -o - %s + +@interface Foo { + void (^_block)(void); +} +@end + +@implementation Foo +- (void)bar { + _block(); +} +@end diff --git a/test/Rewriter/rewrite-block-literal.c b/test/Rewriter/rewrite-block-literal.c new file mode 100644 index 0000000000000..be9c06f7db259 --- /dev/null +++ b/test/Rewriter/rewrite-block-literal.c @@ -0,0 +1,80 @@ +// RUN: %clang_cc1 -rewrite-objc %s -fblocks -o - + +void I( void (^)(void)); +void (^noop)(void); + +void nothing(); +int printf(const char*, ...); + +typedef void (^T) (void); + +void takeblock(T); +int takeintint(int (^C)(int)) { return C(4); } + +T somefunction() { + if (^{ }) + nothing(); + + noop = ^{}; + + noop = ^{printf("\nClosure\n"); }; + + I(^{ }); + + return ^{printf("\nClosure\n"); }; +} +void test2() { + int x = 4; + + takeblock(^{ printf("%d\n", x); }); + + while (1) { + takeblock(^{ + while(1) break; // ok + }); + break; + } +} + + +void (^test3())(void) { + return ^{}; +} + +void test4() { + void (^noop)(void) = ^{}; + void (*noop2)() = 0; +} + +void myfunc(int (^block)(int)) {} + +void myfunc3(const int *x); + +void test5() { + int a; + + myfunc(^(int abcd) { + myfunc3(&a); + return 1; + }); +} + +void *X; + +void test_arguments() { + int y; + int (^c)(char); + (1 ? c : 0)('x'); + (1 ? 0 : c)('x'); + + (1 ? c : c)('x'); +} + +static int global_x = 10; +void (^global_block)(void) = ^{ printf("global x is %d\n", global_x); }; + +typedef void (^void_block_t)(void); + +static const void_block_t myBlock = ^{ }; + +static const void_block_t myBlock2 = ^ void(void) { }; diff --git a/test/Rewriter/rewrite-foreach-1.m b/test/Rewriter/rewrite-foreach-1.m index 9cf084c502ae3..e68b45d1df2da 100644 --- a/test/Rewriter/rewrite-foreach-1.m +++ b/test/Rewriter/rewrite-foreach-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol P @end diff --git a/test/Rewriter/rewrite-foreach-2.m b/test/Rewriter/rewrite-foreach-2.m index 5567d0169b938..5ed15a34ac07c 100644 --- a/test/Rewriter/rewrite-foreach-2.m +++ b/test/Rewriter/rewrite-foreach-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol P @end diff --git a/test/Rewriter/rewrite-foreach-3.m b/test/Rewriter/rewrite-foreach-3.m index 804f0204f5e9b..ffe8295954e4f 100644 --- a/test/Rewriter/rewrite-foreach-3.m +++ b/test/Rewriter/rewrite-foreach-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol P @end diff --git a/test/Rewriter/rewrite-foreach-4.m b/test/Rewriter/rewrite-foreach-4.m index 9870690325b2b..5b66e978bebf6 100644 --- a/test/Rewriter/rewrite-foreach-4.m +++ b/test/Rewriter/rewrite-foreach-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface MyList - (id) allKeys; diff --git a/test/Rewriter/rewrite-foreach-5.m b/test/Rewriter/rewrite-foreach-5.m index 141cb6a2c0aac..adfd7f8378416 100644 --- a/test/Rewriter/rewrite-foreach-5.m +++ b/test/Rewriter/rewrite-foreach-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface MyList - (id) allKeys; diff --git a/test/Rewriter/rewrite-foreach-6.m b/test/Rewriter/rewrite-foreach-6.m index bbc9a94a13f92..2aa19aecb82c5 100644 --- a/test/Rewriter/rewrite-foreach-6.m +++ b/test/Rewriter/rewrite-foreach-6.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -rewrite-objc -o - +// RUN: %clang_cc1 %s -rewrite-objc -o - // rdar://5716356 // FIXME: Should be able to pipe into clang, but code is not // yet correct for other reasons: rdar://5716940 diff --git a/test/Rewriter/rewrite-nest.m b/test/Rewriter/rewrite-nest.m index 594e1b1629a91..ebbcded414e93 100644 --- a/test/Rewriter/rewrite-nest.m +++ b/test/Rewriter/rewrite-nest.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface NSMapTable @end @interface NSEnumerator @end diff --git a/test/Rewriter/rewrite-protocol-type-1.m b/test/Rewriter/rewrite-protocol-type-1.m index e46a3badfeef6..902559dca6009 100644 --- a/test/Rewriter/rewrite-protocol-type-1.m +++ b/test/Rewriter/rewrite-protocol-type-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol MyProto1 @end diff --git a/test/Rewriter/rewrite-try-catch.m b/test/Rewriter/rewrite-try-catch.m index e9b002b2be396..d0c6d2acf67d1 100644 --- a/test/Rewriter/rewrite-try-catch.m +++ b/test/Rewriter/rewrite-try-catch.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface Foo @end @interface GARF @end diff --git a/test/Rewriter/static-type-protocol-1.m b/test/Rewriter/static-type-protocol-1.m index 735c94278dc56..a072c9f3ca3f1 100644 --- a/test/Rewriter/static-type-protocol-1.m +++ b/test/Rewriter/static-type-protocol-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @protocol Proto - (void) ProtoDidget; diff --git a/test/Rewriter/undecl-objc-h.m b/test/Rewriter/undecl-objc-h.m index b68c6b1757056..a60d81024ce20 100644 --- a/test/Rewriter/undecl-objc-h.m +++ b/test/Rewriter/undecl-objc-h.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - typedef struct S { int * pint; diff --git a/test/Rewriter/undeclared-method-1.m b/test/Rewriter/undeclared-method-1.m index 6c1460d02ec81..89d33ce4518a8 100644 --- a/test/Rewriter/undeclared-method-1.m +++ b/test/Rewriter/undeclared-method-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface Derived @end diff --git a/test/Rewriter/undef-field-reference-1.m b/test/Rewriter/undef-field-reference-1.m index ef80c26d7c505..039c500a2486f 100644 --- a/test/Rewriter/undef-field-reference-1.m +++ b/test/Rewriter/undef-field-reference-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - @interface MyDerived { diff --git a/test/Rewriter/va-method.m b/test/Rewriter/va-method.m index f808b8f596419..366552fd56ab2 100644 --- a/test/Rewriter/va-method.m +++ b/test/Rewriter/va-method.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -rewrite-objc %s -o - +// RUN: %clang_cc1 -rewrite-objc %s -o - #include <stdarg.h> diff --git a/test/Sema/128bitint.c b/test/Sema/128bitint.c index a068d81e49819..fe83d97ca4fc5 100644 --- a/test/Sema/128bitint.c +++ b/test/Sema/128bitint.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 %s typedef int i128 __attribute__((__mode__(TI))); typedef unsigned u128 __attribute__((__mode__(TI))); diff --git a/test/Sema/PR2727.c b/test/Sema/PR2727.c index 0829dc239df8c..332b0df728350 100644 --- a/test/Sema/PR2727.c +++ b/test/Sema/PR2727.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -verify -fsyntax-only -std=c90 %s -// RUN: clang-cc -verify -fsyntax-only -std=c99 %s +// RUN: %clang_cc1 -verify -fsyntax-only -std=c90 %s +// RUN: %clang_cc1 -verify -fsyntax-only -std=c99 %s int f (int x) { diff --git a/test/Sema/PR2728.c b/test/Sema/PR2728.c index e8c2e268b5d72..e9f1deaf7cd61 100644 --- a/test/Sema/PR2728.c +++ b/test/Sema/PR2728.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -verify -fsyntax-only -std=c90 %s -// RUN: clang-cc -verify -fsyntax-only -std=c99 %s +// RUN: %clang_cc1 -verify -fsyntax-only -std=c90 %s +// RUN: %clang_cc1 -verify -fsyntax-only -std=c99 %s struct s { diff --git a/test/Sema/PR2919-builtin-types-compat-strips-crv.c b/test/Sema/PR2919-builtin-types-compat-strips-crv.c index 160ec4a38058d..9c1335786a500 100644 --- a/test/Sema/PR2919-builtin-types-compat-strips-crv.c +++ b/test/Sema/PR2919-builtin-types-compat-strips-crv.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s typedef struct foo T0; typedef const struct foo T1; diff --git a/test/Sema/PR2923.c b/test/Sema/PR2923.c index c75e7baed1a11..f22e70dd8d3d5 100644 --- a/test/Sema/PR2923.c +++ b/test/Sema/PR2923.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test for absence of crash reported in PR 2923: // diff --git a/test/Sema/PR2963-enum-constant.c b/test/Sema/PR2963-enum-constant.c index 78f2326dae1bb..1900eefc7c624 100644 --- a/test/Sema/PR2963-enum-constant.c +++ b/test/Sema/PR2963-enum-constant.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -pedantic -fsyntax-only +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only typedef short short_fixed; diff --git a/test/Sema/address-constant.c b/test/Sema/address-constant.c index 69f2f79f6857c..e842a7396b8d8 100644 --- a/test/Sema/address-constant.c +++ b/test/Sema/address-constant.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int i; int a[] = {0}; diff --git a/test/Sema/address_spaces.c b/test/Sema/address_spaces.c index d9d23edb3cf48..badd2383abc2c 100644 --- a/test/Sema/address_spaces.c +++ b/test/Sema/address_spaces.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify #define _AS1 __attribute__((address_space(1))) #define _AS2 __attribute__((address_space(2))) diff --git a/test/Sema/align-arm-apcs.c b/test/Sema/align-arm-apcs.c index 9689906488b16..0a5d3fe921518 100644 --- a/test/Sema/align-arm-apcs.c +++ b/test/Sema/align-arm-apcs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s struct s0 { double f0; int f1; }; char chk0[__alignof__(struct s0) == 4 ? 1 : -1]; diff --git a/test/Sema/align-x86.c b/test/Sema/align-x86.c index 2bc1cc848554f..f67adecbf5172 100644 --- a/test/Sema/align-x86.c +++ b/test/Sema/align-x86.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s // PR3433 double g1; diff --git a/test/Sema/altivec-init.c b/test/Sema/altivec-init.c index 2a33e1e56f554..f22c1fc4db8a6 100644 --- a/test/Sema/altivec-init.c +++ b/test/Sema/altivec-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -faltivec -verify -pedantic -fsyntax-only +// RUN: %clang_cc1 %s -faltivec -verify -pedantic -fsyntax-only typedef int v4 __attribute((vector_size(16))); typedef short v8 __attribute((vector_size(16))); diff --git a/test/Sema/annotate.c b/test/Sema/annotate.c index aec2af8b022f4..4d550759a25fb 100644 --- a/test/Sema/annotate.c +++ b/test/Sema/annotate.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify void __attribute__((annotate("foo"))) foo(float *a) { __attribute__((annotate("bar"))) int x; diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index ca1133bd8aced..47fb2b6fba092 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { union { float f3; diff --git a/test/Sema/arg-duplicate.c b/test/Sema/arg-duplicate.c index e40a964234d9b..ca091eb309e4e 100644 --- a/test/Sema/arg-duplicate.c +++ b/test/Sema/arg-duplicate.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int f3(y, x, x) // expected-error {{redefinition of parameter}} diff --git a/test/Sema/arg-scope-c99.c b/test/Sema/arg-scope-c99.c index 1d81410b8d016..912776ab8ff6d 100644 --- a/test/Sema/arg-scope-c99.c +++ b/test/Sema/arg-scope-c99.c @@ -1,2 +1,2 @@ -// RUN: clang-cc -fsyntax-only -std=c99 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c99 -verify %s void bb(int sz, int ar[sz][sz]) { } diff --git a/test/Sema/arg-scope.c b/test/Sema/arg-scope.c index d5e59603cfbf7..ed9261941b583 100644 --- a/test/Sema/arg-scope.c +++ b/test/Sema/arg-scope.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void aa(int b, int x[sizeof b]) {} void foo(int i, int A[i]) {} diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c index 6407b5daf56a3..66f15c3a3cccc 100644 --- a/test/Sema/array-constraint.c +++ b/test/Sema/array-constraint.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s struct s; // expected-note 2 {{forward declaration of 'struct s'}} struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}} diff --git a/test/Sema/array-declared-as-incorrect-type.c b/test/Sema/array-declared-as-incorrect-type.c index 3f6fa33a3bd24..b93fa9a0edf73 100644 --- a/test/Sema/array-declared-as-incorrect-type.c +++ b/test/Sema/array-declared-as-incorrect-type.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s extern int a1[]; int a1[1]; diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index c78fd29a89c18..45d3183852990 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s extern int foof() = 1; // expected-error{{illegal initializer (only variables can be initialized)}} @@ -167,7 +167,7 @@ void charArrays() { void variableArrayInit() { int a = 4; - char strlit[a] = "foo"; //expected-error{{variable-sized object may not be initialized}} + char strlit[a] = "foo"; //expected-error{{array initializer must be an initializer list or string literal}} int b[a] = { 1, 2, 4 }; //expected-error{{variable-sized object may not be initialized}} } diff --git a/test/Sema/asm.c b/test/Sema/asm.c index 0a62545a1e084..18d900c80dd48 100644 --- a/test/Sema/asm.c +++ b/test/Sema/asm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -triple i386-pc-linux-gnu -verify -fsyntax-only +// RUN: %clang_cc1 %s -triple i386-pc-linux-gnu -verify -fsyntax-only void f() { int i; diff --git a/test/Sema/assign-null.c b/test/Sema/assign-null.c index a343c8069fdce..7f172b1953552 100644 --- a/test/Sema/assign-null.c +++ b/test/Sema/assign-null.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> diff --git a/test/Sema/assign.c b/test/Sema/assign.c index b25262c624388..2d57029fc05f8 100644 --- a/test/Sema/assign.c +++ b/test/Sema/assign.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void *test1(void) { return 0; } diff --git a/test/Sema/ast-print.c b/test/Sema/ast-print.c index a8988b029f492..ff66d35a1ba6d 100644 --- a/test/Sema/ast-print.c +++ b/test/Sema/ast-print.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -ast-print +// RUN: %clang_cc1 %s -ast-print typedef void func_typedef(); func_typedef xxx; diff --git a/test/Sema/attr-aligned.c b/test/Sema/attr-aligned.c index 6e641cb371f94..bcb12ee40de7f 100644 --- a/test/Sema/attr-aligned.c +++ b/test/Sema/attr-aligned.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}} diff --git a/test/Sema/attr-cleanup.c b/test/Sema/attr-cleanup.c index 0434981c6c4af..9057c27a56fe5 100644 --- a/test/Sema/attr-cleanup.c +++ b/test/Sema/attr-cleanup.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only void c1(int *a); diff --git a/test/Sema/attr-decl-after-definition.c b/test/Sema/attr-decl-after-definition.c index c1d1b536fc696..4d32e0028b542 100644 --- a/test/Sema/attr-decl-after-definition.c +++ b/test/Sema/attr-decl-after-definition.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void foo(); void foo() __attribute__((unused)); diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c index 4b889fc8aa4f7..e723255c0cfa6 100644 --- a/test/Sema/attr-deprecated.c +++ b/test/Sema/attr-deprecated.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only int f() __attribute__((deprecated)); void g() __attribute__((deprecated)); diff --git a/test/Sema/attr-format_arg.c b/test/Sema/attr-format_arg.c index 5f06f4ba3fc9d..64a23878317c6 100644 --- a/test/Sema/attr-format_arg.c +++ b/test/Sema/attr-format_arg.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int printf(const char *, ...); diff --git a/test/Sema/attr-malloc.c b/test/Sema/attr-malloc.c index 6483ffc4c1a65..9970b9de4f95a 100644 --- a/test/Sema/attr-malloc.c +++ b/test/Sema/attr-malloc.c @@ -1,5 +1,5 @@ -// RUN: clang -Xclang -verify -fsyntax-only %s -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -Xclang -verify -fsyntax-only %s +// RUN: %clang -emit-llvm -S -o %t %s #include <stdlib.h> diff --git a/test/Sema/attr-mode.c b/test/Sema/attr-mode.c index ac411d7c42ddd..9acd2c6f65d38 100644 --- a/test/Sema/attr-mode.c +++ b/test/Sema/attr-mode.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int i16_1 __attribute((mode(HI))); int i16_1_test[sizeof(i16_1) == 2 ? 1 : -1]; diff --git a/test/Sema/attr-nodebug.c b/test/Sema/attr-nodebug.c index 512ecfdcafc68..203c2a7300ab4 100644 --- a/test/Sema/attr-nodebug.c +++ b/test/Sema/attr-nodebug.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only int a __attribute__((nodebug)); // expected-warning {{'nodebug' attribute only applies to function types}} diff --git a/test/Sema/attr-noinline.c b/test/Sema/attr-noinline.c index cf695f0d21f55..92dc9007eb193 100644 --- a/test/Sema/attr-noinline.c +++ b/test/Sema/attr-noinline.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only int a __attribute__((noinline)); // expected-warning {{'noinline' attribute only applies to function types}} diff --git a/test/Sema/attr-noreturn.c b/test/Sema/attr-noreturn.c index 14011bedca1ae..0966989bf9a3c 100644 --- a/test/Sema/attr-noreturn.c +++ b/test/Sema/attr-noreturn.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s static void (*fp0)(void) __attribute__((noreturn)); @@ -33,3 +33,8 @@ f5 (unsigned long size) { } + +// PR2461 +__attribute__((noreturn)) void f(__attribute__((noreturn)) void (*x)(void)) { + x(); +} diff --git a/test/Sema/attr-regparm.c b/test/Sema/attr-regparm.c index 944f01489c8b9..045a41396e3f2 100644 --- a/test/Sema/attr-regparm.c +++ b/test/Sema/attr-regparm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s __attribute((regparm(2))) int x(void); __attribute((regparm(1.0))) int x(void); // expected-error{{'regparm' attribute requires integer constant}} diff --git a/test/Sema/attr-section.c b/test/Sema/attr-section.c index c61ed80cbf7a9..20ae2e3547b94 100644 --- a/test/Sema/attr-section.c +++ b/test/Sema/attr-section.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 -verify -fsyntax-only -triple x86_64-apple-darwin9 %s int x __attribute__((section( 42))); // expected-error {{argument to section attribute was not a string literal}} diff --git a/test/Sema/attr-unused.c b/test/Sema/attr-unused.c index dbb5e630d7a10..e45ec434f5338 100644 --- a/test/Sema/attr-unused.c +++ b/test/Sema/attr-unused.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s static void (*fp0)(void) __attribute__((unused)); diff --git a/test/Sema/attr-used.c b/test/Sema/attr-used.c index fdabf7ff2ad53..d50f4c09ac850 100644 --- a/test/Sema/attr-used.c +++ b/test/Sema/attr-used.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s extern int l0 __attribute__((used)); // expected-warning {{used attribute ignored}} __private_extern__ int l1 __attribute__((used)); // expected-warning {{used attribute ignored}} diff --git a/test/Sema/attr-weak.c b/test/Sema/attr-weak.c index 4532cccf98d90..8e3e626c5d34b 100644 --- a/test/Sema/attr-weak.c +++ b/test/Sema/attr-weak.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s extern int g0 __attribute__((weak)); extern int g1 __attribute__((weak_import)); diff --git a/test/Sema/bitfield-layout.c b/test/Sema/bitfield-layout.c index 4405c80fee6b9..edc44bdefa08e 100644 --- a/test/Sema/bitfield-layout.c +++ b/test/Sema/bitfield-layout.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -fsyntax-only -verify -triple=i686-apple-darwin9 #define CHECK_SIZE(kind, name, size) extern int name##1[sizeof(kind name) == size ? 1 : -1]; #define CHECK_ALIGN(kind, name, size) extern int name##2[__alignof(kind name) == size ? 1 : -1]; diff --git a/test/Sema/bitfield-promote-int-16bit.c b/test/Sema/bitfield-promote-int-16bit.c index 12d47205e87de..cd9adcffc0712 100644 --- a/test/Sema/bitfield-promote-int-16bit.c +++ b/test/Sema/bitfield-promote-int-16bit.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -triple pic16-unknown-unknown +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple pic16-unknown-unknown // Check that int-sized unsigned bit-fields promote to unsigned int // on targets where sizeof(unsigned short) == sizeof(unsigned int) diff --git a/test/Sema/bitfield-promote.c b/test/Sema/bitfield-promote.c index 066f5d78e7159..4d14ad191e1ed 100644 --- a/test/Sema/bitfield-promote.c +++ b/test/Sema/bitfield-promote.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct {unsigned x : 2;} x; __typeof__((x.x+=1)+1) y; __typeof__(x.x<<1) y; diff --git a/test/Sema/bitfield.c b/test/Sema/bitfield.c index 581af6d0c5ea5..6f129daceba58 100644 --- a/test/Sema/bitfield.c +++ b/test/Sema/bitfield.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify enum e0; // expected-note{{forward declaration of 'enum e0'}} struct a { diff --git a/test/Sema/block-args.c b/test/Sema/block-args.c index 3a58735f23a3b..08af9b377361f 100644 --- a/test/Sema/block-args.c +++ b/test/Sema/block-args.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks void take(void*); diff --git a/test/Sema/block-as-object.m b/test/Sema/block-as-object.m index 1197a1972feca..a85b6067571ee 100644 --- a/test/Sema/block-as-object.m +++ b/test/Sema/block-as-object.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify -fblocks +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks @interface Whatever - copy; diff --git a/test/Sema/block-byref-args.c b/test/Sema/block-byref-args.c index 06bab121f9177..7b7cc3d2c49b4 100644 --- a/test/Sema/block-byref-args.c +++ b/test/Sema/block-byref-args.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks int printf(const char *, ...); diff --git a/test/Sema/block-call.c b/test/Sema/block-call.c index 893a8f61da8d0..0aba75e14a9a4 100644 --- a/test/Sema/block-call.c +++ b/test/Sema/block-call.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks int (*FP)(); int (^IFP) (); diff --git a/test/Sema/block-labels.c b/test/Sema/block-labels.c index f0f8c4856d811..af364b4f863a9 100644 --- a/test/Sema/block-labels.c +++ b/test/Sema/block-labels.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fblocks -fsyntax-only +// RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only int a() { A:if (1) xx(); diff --git a/test/Sema/block-literal.c b/test/Sema/block-literal.c index 9f5022dc63876..e9c2341a99c75 100644 --- a/test/Sema/block-literal.c +++ b/test/Sema/block-literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks void I( void (^)(void)); void (^noop)(void); diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c index 8661fd8a5227e..9f1bc4025fac6 100644 --- a/test/Sema/block-misc.c +++ b/test/Sema/block-misc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks void donotwarn(); int (^IFP) (); diff --git a/test/Sema/block-printf-attribute-1.c b/test/Sema/block-printf-attribute-1.c index 4941ae7bc6794..8ea77ece12d89 100644 --- a/test/Sema/block-printf-attribute-1.c +++ b/test/Sema/block-printf-attribute-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks int main() { void (^b) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 1, 3))) = // expected-error {{format argument not a string type}} diff --git a/test/Sema/block-return-1.c b/test/Sema/block-return-1.c index 2da87351e4f5b..631a2d443e1f2 100644 --- a/test/Sema/block-return-1.c +++ b/test/Sema/block-return-1.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks int j; void foo() { diff --git a/test/Sema/block-return-2.c b/test/Sema/block-return-2.c index d389f4e4ffcc7..d5fbc6f70c5dd 100644 --- a/test/Sema/block-return-2.c +++ b/test/Sema/block-return-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks void foo() { ^ (void) __attribute__((noreturn)) { }(); // expected-error {{block declared 'noreturn' should not return}} diff --git a/test/Sema/block-return-3.c b/test/Sema/block-return-3.c index e7e9342e02f4c..cd942a7f30473 100644 --- a/test/Sema/block-return-3.c +++ b/test/Sema/block-return-3.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks void foo() { ^ int (void) { }(); // expected-error {{control reaches end of non-void block}} diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c index 98a72731d672d..4240b0985625a 100644 --- a/test/Sema/block-return.c +++ b/test/Sema/block-return.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks typedef void (^CL)(void); diff --git a/test/Sema/block-sentinel-attribute.c b/test/Sema/block-sentinel-attribute.c index 5628a2c7801fe..b5ce0da15c60d 100644 --- a/test/Sema/block-sentinel-attribute.c +++ b/test/Sema/block-sentinel-attribute.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fblocks -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s void (^e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1))); diff --git a/test/Sema/block-storageclass.c b/test/Sema/block-storageclass.c index aacf8be2c06dd..9bfbfbd614e59 100644 --- a/test/Sema/block-storageclass.c +++ b/test/Sema/block-storageclass.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks int printf(const char *, ...); void _Block_byref_release(void*src){} diff --git a/test/Sema/builtin-object-size.c b/test/Sema/builtin-object-size.c index 0c6d288d8c18f..0abc27ba187a6 100644 --- a/test/Sema/builtin-object-size.c +++ b/test/Sema/builtin-object-size.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fsyntax-only -verify %s -// RUN: clang-cc -fsyntax-only -triple x86_64-apple-darwin9 -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin9 -verify %s int a[10]; diff --git a/test/Sema/builtin-prefetch.c b/test/Sema/builtin-prefetch.c index 4ee9f8947bbb5..4f09da6c28cfc 100644 --- a/test/Sema/builtin-prefetch.c +++ b/test/Sema/builtin-prefetch.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void foo() { int a; diff --git a/test/Sema/builtin-stackaddress.c b/test/Sema/builtin-stackaddress.c index 67582a549f5f2..1feb57ea52670 100644 --- a/test/Sema/builtin-stackaddress.c +++ b/test/Sema/builtin-stackaddress.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void* a(unsigned x) { return __builtin_return_address(0); } diff --git a/test/Sema/builtin-unary-fp.c b/test/Sema/builtin-unary-fp.c index 70c7a297fbe39..8f48d7ffc56c9 100644 --- a/test/Sema/builtin-unary-fp.c +++ b/test/Sema/builtin-unary-fp.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic void check(int); void a() { check(__builtin_isfinite(1.0f)); diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index e133d626ee52d..7b2f2afbd9cad 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic -triple=i686-apple-darwin9 +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic -triple=i686-apple-darwin9 // This test needs to set the target because it uses __builtin_ia32_vec_ext_v4si int test1(float a, int b) { @@ -25,10 +25,11 @@ int test6(float a, long double b) { #define CFSTR __builtin___CFStringMakeConstantString void test7() { - CFSTR("\242"); - CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }} - CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible integer to pointer conversion}} - CFSTR("foo", "bar"); // expected-error {{too many arguments to function call}} + const void *X; + X = CFSTR("\242"); + X = CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }} + X = CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible integer to pointer conversion}} + X = CFSTR("foo", "bar"); // expected-error {{too many arguments to function call}} } diff --git a/test/Sema/c89-2.c b/test/Sema/c89-2.c index 50c5f4e5a8400..f6f6bd972090c 100644 --- a/test/Sema/c89-2.c +++ b/test/Sema/c89-2.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -std=c89 -pedantic-errors -verify +/* RUN: %clang_cc1 %s -std=c89 -pedantic-errors -verify */ #if 1LL /* expected-error {{long long}} */ diff --git a/test/Sema/c89.c b/test/Sema/c89.c index fc50ebed66312..8a9e622d87498 100644 --- a/test/Sema/c89.c +++ b/test/Sema/c89.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -std=c89 -pedantic -fsyntax-only -verify +/* RUN: %clang_cc1 %s -std=c89 -pedantic -fsyntax-only -verify */ void test1() { { diff --git a/test/Sema/callingconv.c b/test/Sema/callingconv.c index f65aab463f572..a32a4953084d0 100644 --- a/test/Sema/callingconv.c +++ b/test/Sema/callingconv.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify void __attribute__((fastcall)) foo(float *a) { } diff --git a/test/Sema/carbon.c b/test/Sema/carbon.c index 8292ba8a506b2..f0affd254088d 100644 --- a/test/Sema/carbon.c +++ b/test/Sema/carbon.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -mcpu pentium4 %s -print-stats +// RUN: %clang_cc1 -target-cpu pentium4 %s -print-stats #ifdef __APPLE__ #include <Carbon/Carbon.h> #endif diff --git a/test/Sema/cast-to-union.c b/test/Sema/cast-to-union.c index 24f913b9ea33f..6856c17c721a9 100644 --- a/test/Sema/cast-to-union.c +++ b/test/Sema/cast-to-union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s union u { int i; }; void f(union u); diff --git a/test/Sema/cast.c b/test/Sema/cast.c index d2e3e0c7e3a1b..e52dcaebbddb6 100644 --- a/test/Sema/cast.c +++ b/test/Sema/cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t; cpumask_t x; diff --git a/test/Sema/check-increment.c b/test/Sema/check-increment.c index 72eae06bfa1be..070ea74f68001 100644 --- a/test/Sema/check-increment.c +++ b/test/Sema/check-increment.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int printf(const char *, ...); typedef int *pint; diff --git a/test/Sema/compare.c b/test/Sema/compare.c index fa2d3a062ed15..75a3cf1f62b84 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s int test(char *C) { // nothing here should warn. return C != ((void*)0); diff --git a/test/Sema/complex-int.c b/test/Sema/complex-int.c index 6c660899e8a1d..2bd03744d7a04 100644 --- a/test/Sema/complex-int.c +++ b/test/Sema/complex-int.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only void a() { __complex__ int arr; diff --git a/test/Sema/complex-promotion.c b/test/Sema/complex-promotion.c index 3d86c20eb2482..23c3b6895314b 100644 --- a/test/Sema/complex-promotion.c +++ b/test/Sema/complex-promotion.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only float a; diff --git a/test/Sema/compound-literal.c b/test/Sema/compound-literal.c index b51bcfe2a233a..a650d12de9738 100644 --- a/test/Sema/compound-literal.c +++ b/test/Sema/compound-literal.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s struct foo { int a, b; }; diff --git a/test/Sema/conditional-expr.c b/test/Sema/conditional-expr.c index 8cac32c82f45b..5f01374be3669 100644 --- a/test/Sema/conditional-expr.c +++ b/test/Sema/conditional-expr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic -Wsign-compare %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -Wsign-compare %s void foo() { *(0 ? (double *)0 : (void *)0) = 0; // FIXME: GCC doesn't consider the the following two statements to be errors. diff --git a/test/Sema/conditional.c b/test/Sema/conditional.c index 9f48c349c964e..e67580ace6006 100644 --- a/test/Sema/conditional.c +++ b/test/Sema/conditional.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r"; diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c index 39a24b3269912..fee8d97f9bb41 100644 --- a/test/Sema/const-eval.c +++ b/test/Sema/const-eval.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];}); int x; diff --git a/test/Sema/const-ptr-int-ptr-cast.c b/test/Sema/const-ptr-int-ptr-cast.c index 4e08bfff2cbbd..c6e70b8b2455c 100644 --- a/test/Sema/const-ptr-int-ptr-cast.c +++ b/test/Sema/const-ptr-int-ptr-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stdint.h> diff --git a/test/Sema/constant-builtins-2.c b/test/Sema/constant-builtins-2.c index 18dbb1e7c54aa..23aa314e0c32e 100644 --- a/test/Sema/constant-builtins-2.c +++ b/test/Sema/constant-builtins-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s // Math stuff diff --git a/test/Sema/constant-builtins.c b/test/Sema/constant-builtins.c index f8cea33d67626..5d67fc7cb7177 100644 --- a/test/Sema/constant-builtins.c +++ b/test/Sema/constant-builtins.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -pedantic +// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic // Math stuff diff --git a/test/Sema/constructor-attribute.c b/test/Sema/constructor-attribute.c index bf876f344a8f5..3dfbbcbe281cb 100644 --- a/test/Sema/constructor-attribute.c +++ b/test/Sema/constructor-attribute.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int x __attribute__((constructor)); // expected-warning {{'constructor' attribute only applies to function types}} int f() __attribute__((constructor)); diff --git a/test/Sema/conversion-64-32.c b/test/Sema/conversion-64-32.c index 53830fd061c45..104399641d280 100644 --- a/test/Sema/conversion-64-32.c +++ b/test/Sema/conversion-64-32.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wshorten-64-to-32 -triple x86_64-apple-darwin %s int test0(long v) { return v; // expected-warning {{implicit cast loses integer precision}} diff --git a/test/Sema/conversion.c b/test/Sema/conversion.c index bca23f8f8df88..264e0430dacdc 100644 --- a/test/Sema/conversion.c +++ b/test/Sema/conversion.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -Wconversion -triple x86_64-apple-darwin %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wconversion -triple x86_64-apple-darwin %s #define BIG 0x7f7f7f7f7f7f7f7fL diff --git a/test/Sema/darwin-align-cast.c b/test/Sema/darwin-align-cast.c index fed8983191575..208097481cdc8 100644 --- a/test/Sema/darwin-align-cast.c +++ b/test/Sema/darwin-align-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef long unsigned int __darwin_size_t; typedef long __darwin_ssize_t; typedef __darwin_size_t size_t; diff --git a/test/Sema/decl-invalid.c b/test/Sema/decl-invalid.c index 823551f02e6fe..815e6dd9ca508 100644 --- a/test/Sema/decl-invalid.c +++ b/test/Sema/decl-invalid.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // See Sema::ParsedFreeStandingDeclSpec about the double diagnostic typedef union <anonymous> __mbstate_t; // expected-error {{declaration of anonymous union must be a definition}} expected-error {{declaration does not declare anything}} diff --git a/test/Sema/decl-type-merging.c b/test/Sema/decl-type-merging.c index 1a8601298e9ab..259b0ddf1545d 100644 --- a/test/Sema/decl-type-merging.c +++ b/test/Sema/decl-type-merging.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c99 -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -std=c99 -verify -pedantic %s int x[10]; int x[] = {1,2,3}; diff --git a/test/Sema/declspec.c b/test/Sema/declspec.c index e325cc83521ab..2cf49aa29da1c 100644 --- a/test/Sema/declspec.c +++ b/test/Sema/declspec.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only typedef char T[4]; T foo(int n, int m) { } // expected-error {{cannot return array or function}} @@ -21,3 +21,4 @@ __restrict__ f* v2; // expected-error {{restrict requires a pointer or referenc __restrict__ fptr v3; // expected-error {{pointer to function type 'f' (aka 'int (void)') may not be 'restrict' qualified}} f *__restrict__ v4; // expected-error {{pointer to function type 'f' (aka 'int (void)') may not be 'restrict' qualified}} +restrict struct hallo; // expected-error {{restrict requires a pointer or reference}} diff --git a/test/Sema/default.c b/test/Sema/default.c index 5dac99131b6b5..1318601845016 100644 --- a/test/Sema/default.c +++ b/test/Sema/default.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f5 (int z) { if (z) diff --git a/test/Sema/default1.c b/test/Sema/default1.c index 6e8a27bf57337..631e848df16cb 100644 --- a/test/Sema/default1.c +++ b/test/Sema/default1.c @@ -1,2 +1,2 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(int i = 0); // expected-error {{C does not support default arguments}} diff --git a/test/Sema/deref.c b/test/Sema/deref.c index 965940e26d5ec..845b28645a483 100644 --- a/test/Sema/deref.c +++ b/test/Sema/deref.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only -verify -std=c90 -pedantic %s +/* RUN: %clang_cc1 -fsyntax-only -verify -std=c90 -pedantic %s */ void foo (void) diff --git a/test/Sema/designated-initializers.c b/test/Sema/designated-initializers.c index ae951d42a1a60..7e4ed6892aee9 100644 --- a/test/Sema/designated-initializers.c +++ b/test/Sema/designated-initializers.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -triple x86_64-unknown-unknown %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-unknown %s int complete_array_from_init[] = { 1, 2, [10] = 5, 1, 2, [5] = 2, 6 }; @@ -231,4 +231,21 @@ int crazy_Y[] = { [ 0 ? crazy_x : 4] = 1 }; +// PR5843 +struct expr { + int nargs; + union { + unsigned long int num; + struct expr *args[3]; + } val; +}; +struct expr expr0 = { + .nargs = 2, + .val = { + .args = { + [0] = (struct expr *)0, + [1] = (struct expr *)0 + } + } +}; diff --git a/test/Sema/dllimport-dllexport.c b/test/Sema/dllimport-dllexport.c index 90ed1456d24de..a1e7a18166c50 100644 --- a/test/Sema/dllimport-dllexport.c +++ b/test/Sema/dllimport-dllexport.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s inline void __attribute__((dllexport)) foo1(){} // expected-warning{{dllexport attribute ignored}} inline void __attribute__((dllimport)) foo2(){} // expected-warning{{dllimport attribute ignored}} diff --git a/test/Sema/enum.c b/test/Sema/enum.c index 31649e0ae9edc..262cab50a55f0 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic enum e {A, B = 42LL << 32, // expected-warning {{ISO C restricts enumerator values to range of 'int'}} C = -4, D = 12456 }; diff --git a/test/Sema/expr-address-of.c b/test/Sema/expr-address-of.c index 909acfb266625..8f9f795d00ddf 100644 --- a/test/Sema/expr-address-of.c +++ b/test/Sema/expr-address-of.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only struct xx { int bitf:1; }; struct entry { struct xx *whatever; diff --git a/test/Sema/expr-comma-c89.c b/test/Sema/expr-comma-c89.c index ffe8b696f6089..d0883ba202f9b 100644 --- a/test/Sema/expr-comma-c89.c +++ b/test/Sema/expr-comma-c89.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -std=c99 +// RUN: %clang_cc1 %s -fsyntax-only -verify -std=c99 // rdar://6095180 struct s { char c[17]; }; diff --git a/test/Sema/expr-comma.c b/test/Sema/expr-comma.c index 3a05130eae325..d3e4020af637f 100644 --- a/test/Sema/expr-comma.c +++ b/test/Sema/expr-comma.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -std=c89 +// RUN: %clang_cc1 %s -fsyntax-only -verify -std=c89 // rdar://6095180 struct s { char c[17]; }; diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index 10fcde6e75769..e6cfa5fbe3e4f 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -pedantic -fsyntax-only +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only // PR1966 _Complex double test1() { diff --git a/test/Sema/ext_vector_casts.c b/test/Sema/ext_vector_casts.c index dbcd1c9b3ac05..cbda021cd282f 100644 --- a/test/Sema/ext_vector_casts.c +++ b/test/Sema/ext_vector_casts.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef __attribute__(( ext_vector_type(2) )) float float2; typedef __attribute__(( ext_vector_type(4) )) int int4; diff --git a/test/Sema/ext_vector_components.c b/test/Sema/ext_vector_components.c index 48903024d3c61..7d3d52aa95468 100644 --- a/test/Sema/ext_vector_components.c +++ b/test/Sema/ext_vector_components.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef __attribute__(( ext_vector_type(2) )) float float2; typedef __attribute__(( ext_vector_type(3) )) float float3; @@ -26,8 +26,6 @@ static void test() { f = vec2.x; // legal, shorten f = vec4.xy.x; // legal, shorten - vec2 = vec3.hi; // expected-error {{vector component access invalid for odd-sized type 'float3'}} - vec4_2.xyzx = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} vec4_2.xyzz = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} vec4_2.xyyw = vec4.xyzw; // expected-error {{vector is not assignable (contains duplicate components)}} @@ -42,3 +40,8 @@ static void test() { vec4p->yz = vec4p->xy; } + +float2 lo(float3 x) { return x.lo; } +float2 hi(float3 x) { return x.hi; } +float2 ev(float3 x) { return x.even; } +float2 od(float3 x) { return x.odd; } diff --git a/test/Sema/flexible-array-init.c b/test/Sema/flexible-array-init.c index afe31fb8294fa..e03881cdbcbe3 100644 --- a/test/Sema/flexible-array-init.c +++ b/test/Sema/flexible-array-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s struct one { int a; int values[]; // expected-note 3{{initialized flexible array member 'values' is here}} diff --git a/test/Sema/floating-point-compare.c b/test/Sema/floating-point-compare.c index 9888105518d91..60f971c6df97f 100644 --- a/test/Sema/floating-point-compare.c +++ b/test/Sema/floating-point-compare.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wfloat-equal -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wfloat-equal -verify %s int f1(float x, float y) { return x == y; // expected-warning {{comparing floating point with ==}} diff --git a/test/Sema/for.c b/test/Sema/for.c index 183a95d0ab44f..b998f4b07cf0b 100644 --- a/test/Sema/for.c +++ b/test/Sema/for.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Check C99 6.8.5p3 void b1 (void) { for (void (*f) (void);;); } diff --git a/test/Sema/format-attr-pr4470.c b/test/Sema/format-attr-pr4470.c index 24eece8878e22..374d8b3af03f6 100644 --- a/test/Sema/format-attr-pr4470.c +++ b/test/Sema/format-attr-pr4470.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -Wformat=2 %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wformat=2 %s #include <stdarg.h> int vprintf(const char *, va_list); diff --git a/test/Sema/format-attribute-printf0.c b/test/Sema/format-attribute-printf0.c index fa7eafd52fb8c..33e8d40076dc0 100644 --- a/test/Sema/format-attribute-printf0.c +++ b/test/Sema/format-attribute-printf0.c @@ -1,4 +1,4 @@ -//RUN: clang-cc -fsyntax-only -verify %s +//RUN: %clang_cc1 -fsyntax-only -verify %s #include <stdarg.h> diff --git a/test/Sema/format-attribute.c b/test/Sema/format-attribute.c index cb823318592eb..6e1bd0f1ab655 100644 --- a/test/Sema/format-attribute.c +++ b/test/Sema/format-attribute.c @@ -1,4 +1,4 @@ -//RUN: clang-cc -fsyntax-only -verify %s +//RUN: %clang_cc1 -fsyntax-only -verify %s #include <stdarg.h> diff --git a/test/Sema/format-string-percentm.c b/test/Sema/format-string-percentm.c index f531372fd4512..f2e9dd81bab34 100644 --- a/test/Sema/format-string-percentm.c +++ b/test/Sema/format-string-percentm.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -triple i686-pc-linux-gnu +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-pc-linux-gnu int printf(char const*,...); void percentm(void) { diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index 0a9fccebd7fdf..67081b5e26035 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -Wformat-nonliteral %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral %s #include <stdarg.h> typedef __typeof(sizeof(int)) size_t; @@ -50,6 +50,7 @@ void check_conditional_literal(const char* s, int i) { printf(i == 1 ? "yes" : "no"); // no-warning printf(i == 0 ? (i == 1 ? "yes" : "no") : "dont know"); // no-warning printf(i == 0 ? (i == 1 ? s : "no") : "dont know"); // expected-warning{{format string is not a string literal}} + printf("yes" ?: "no %d", 1); // expected-warning{{more data arguments than '%' conversions}} } void check_writeback_specifier() diff --git a/test/Sema/freemain.c b/test/Sema/freemain.c index a2364df259bfa..eed644d483acb 100644 --- a/test/Sema/freemain.c +++ b/test/Sema/freemain.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -ffreestanding %s // Tests that -ffreestanding disables all special treatment of main(). diff --git a/test/Sema/function-pointer-sentinel-attribute.c b/test/Sema/function-pointer-sentinel-attribute.c index 6d3fb17180764..5f17a260b26f3 100644 --- a/test/Sema/function-pointer-sentinel-attribute.c +++ b/test/Sema/function-pointer-sentinel-attribute.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void (*e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1))); diff --git a/test/Sema/function-ptr.c b/test/Sema/function-ptr.c index 6b410018f4b72..c1ff8e1d7b1f3 100644 --- a/test/Sema/function-ptr.c +++ b/test/Sema/function-ptr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -pedantic +// RUN: %clang_cc1 %s -verify -pedantic typedef int unary_int_func(int arg); unary_int_func *func; diff --git a/test/Sema/function-redecl.c b/test/Sema/function-redecl.c index 28593b0678d13..9544dc9baef69 100644 --- a/test/Sema/function-redecl.c +++ b/test/Sema/function-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR3588 void g0(int, int); diff --git a/test/Sema/function-sentinel-attr.c b/test/Sema/function-sentinel-attr.c index b33b4a063ce23..9bcbec4c0c368 100644 --- a/test/Sema/function-sentinel-attr.c +++ b/test/Sema/function-sentinel-attr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define NULL (void*)0 diff --git a/test/Sema/function.c b/test/Sema/function.c index e7a37f1a2fc12..9a83519a90b52 100644 --- a/test/Sema/function.c +++ b/test/Sema/function.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic // PR1892 void f(double a[restrict][5]); // should promote to restrict ptr. void f(double (* restrict a)[5]); diff --git a/test/Sema/gnu89.c b/test/Sema/gnu89.c index 4601cbe93f6e2..fc21dcd5cd45e 100644 --- a/test/Sema/gnu89.c +++ b/test/Sema/gnu89.c @@ -1,3 +1,3 @@ -// RUN: clang-cc %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify int f(int restrict); diff --git a/test/Sema/heinous-extensions-off.c b/test/Sema/heinous-extensions-off.c index 3a9880ce7f758..9b80d3496de90 100644 --- a/test/Sema/heinous-extensions-off.c +++ b/test/Sema/heinous-extensions-off.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify +// RUN: %clang_cc1 %s -verify int foo() { int a; diff --git a/test/Sema/heinous-extensions-on.c b/test/Sema/heinous-extensions-on.c index a56f1f6f625cf..176f4727ef2b1 100644 --- a/test/Sema/heinous-extensions-on.c +++ b/test/Sema/heinous-extensions-on.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fheinous-gnu-extensions +// RUN: %clang_cc1 %s -verify -fheinous-gnu-extensions void foo() { int a; diff --git a/test/Sema/i-c-e.c b/test/Sema/i-c-e.c index 6e14833166d80..c561fe01c6eed 100644 --- a/test/Sema/i-c-e.c +++ b/test/Sema/i-c-e.c @@ -1,4 +1,4 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -pedantic -fpascal-strings +// RUN: %clang %s -fsyntax-only -Xclang -verify -pedantic -fpascal-strings #include <stdint.h> #include <limits.h> diff --git a/test/Sema/if-empty-body.c b/test/Sema/if-empty-body.c index 1d1df40bd6a34..af1e62f6b1b61 100644 --- a/test/Sema/if-empty-body.c +++ b/test/Sema/if-empty-body.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f1(int a) { if (a); // expected-warning {{if statement has empty body}} diff --git a/test/Sema/illegal-types.c b/test/Sema/illegal-types.c index c932bb28dccaa..3c59df8298c0a 100644 --- a/test/Sema/illegal-types.c +++ b/test/Sema/illegal-types.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s void a (void []()); // expected-error{{'type name' declared as array of functions}} void b (void p[]()); // expected-error{{'p' declared as array of functions}} diff --git a/test/Sema/implicit-builtin-decl.c b/test/Sema/implicit-builtin-decl.c index 696a2b926c9b6..09ecd23ca1bab 100644 --- a/test/Sema/implicit-builtin-decl.c +++ b/test/Sema/implicit-builtin-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { int *ptr = malloc(sizeof(int) * 10); // expected-warning{{implicitly declaring C library function 'malloc' with type}} \ // expected-note{{please include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \ diff --git a/test/Sema/implicit-builtin-freestanding.c b/test/Sema/implicit-builtin-freestanding.c index 9bd5c05892ece..505e5221eff84 100644 --- a/test/Sema/implicit-builtin-freestanding.c +++ b/test/Sema/implicit-builtin-freestanding.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -ffreestanding %s int malloc(int a) { return a; } diff --git a/test/Sema/implicit-builtin-redecl.c b/test/Sema/implicit-builtin-redecl.c index fc51312f1770f..1e520d2ae9023 100644 --- a/test/Sema/implicit-builtin-redecl.c +++ b/test/Sema/implicit-builtin-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR3592 static void* malloc(int); diff --git a/test/Sema/implicit-cast.c b/test/Sema/implicit-cast.c index ce34ad6d1c651..088b1958d9b85 100644 --- a/test/Sema/implicit-cast.c +++ b/test/Sema/implicit-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s static char *test1(int cf) { return cf ? "abc" : 0; diff --git a/test/Sema/implicit-decl.c b/test/Sema/implicit-decl.c index 8873e76098cac..fc48895f4eb1f 100644 --- a/test/Sema/implicit-decl.c +++ b/test/Sema/implicit-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only typedef int int32_t; typedef unsigned char Boolean; diff --git a/test/Sema/implicit-def.c b/test/Sema/implicit-def.c index 3b31b999667ce..6caa090631e69 100644 --- a/test/Sema/implicit-def.c +++ b/test/Sema/implicit-def.c @@ -1,5 +1,5 @@ -/* RUN: clang-cc -fsyntax-only %s -std=c89 - * RUN: not clang-cc -fsyntax-only %s -std=c99 -pedantic-errors +/* RUN: %clang_cc1 -fsyntax-only %s -std=c89 + * RUN: not %clang_cc1 -fsyntax-only %s -std=c99 -pedantic-errors */ int A() { diff --git a/test/Sema/implicit-int.c b/test/Sema/implicit-int.c index 5190bdbf934b1..1bb9a83853066 100644 --- a/test/Sema/implicit-int.c +++ b/test/Sema/implicit-int.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -pedantic +// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic foo() { // expected-warning {{type specifier missing, defaults to 'int'}} return 0; diff --git a/test/Sema/incompatible-sign.c b/test/Sema/incompatible-sign.c index a62f9a8ba7099..a1592efc4c47d 100644 --- a/test/Sema/incompatible-sign.c +++ b/test/Sema/incompatible-sign.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only int a(int* x); int b(unsigned* y) { return a(y); } // expected-warning {{pointer types point to integer types with different sign}} diff --git a/test/Sema/incomplete-call.c b/test/Sema/incomplete-call.c index 15d97683c5a0b..3ef578d59f6f2 100644 --- a/test/Sema/incomplete-call.c +++ b/test/Sema/incomplete-call.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct foo; // expected-note 3 {{forward declaration of 'struct foo'}} diff --git a/test/Sema/incomplete-decl.c b/test/Sema/incomplete-decl.c index 6a6ba753f3fe3..753d9c0a3c1a0 100644 --- a/test/Sema/incomplete-decl.c +++ b/test/Sema/incomplete-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct foo; // expected-note 5 {{forward declaration of 'struct foo'}} diff --git a/test/Sema/indirect-goto.c b/test/Sema/indirect-goto.c index 35fb5e6315e2b..134ccd8a70760 100644 --- a/test/Sema/indirect-goto.c +++ b/test/Sema/indirect-goto.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct c {int x;}; int a(struct c x, long long y) { diff --git a/test/Sema/init-struct-qualified.c b/test/Sema/init-struct-qualified.c index 539820ae418c0..49ec7cc5e060c 100644 --- a/test/Sema/init-struct-qualified.c +++ b/test/Sema/init-struct-qualified.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify < %s +// RUN: %clang_cc1 -fsyntax-only -verify < %s typedef float CGFloat; typedef struct _NSPoint { CGFloat x; CGFloat y; } NSPoint; typedef struct _NSSize { CGFloat width; CGFloat height; } NSSize; diff --git a/test/Sema/init-vector.c b/test/Sema/init-vector.c index 691ea97268fd4..f0cf32bd3f9c8 100644 --- a/test/Sema/init-vector.c +++ b/test/Sema/init-vector.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef float __attribute__((vector_size (16))) v4f_t; diff --git a/test/Sema/init.c b/test/Sema/init.c index 4ba6867d0b0f2..c2712480c6164 100644 --- a/test/Sema/init.c +++ b/test/Sema/init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only #include <stddef.h> #include <stdint.h> @@ -20,7 +20,7 @@ int *h = &x; int test() { int a[10]; -int b[10] = a; // expected-error {{initialization with '{...}' expected}} +int b[10] = a; // expected-error {{array initializer must be an initializer list}} int +; // expected-error {{expected identifier or '('}} } diff --git a/test/Sema/inline.c b/test/Sema/inline.c index adcde51363eb3..3c99f24337830 100644 --- a/test/Sema/inline.c +++ b/test/Sema/inline.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Check that we don't allow illegal uses of inline inline int a; // expected-error{{'inline' can only appear on functions}} diff --git a/test/Sema/int-arith-convert.c b/test/Sema/int-arith-convert.c index 5bbab7d9af961..c56ab3b763026 100644 --- a/test/Sema/int-arith-convert.c +++ b/test/Sema/int-arith-convert.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple=i686-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple=i686-linux-gnu -fsyntax-only -verify %s // Check types are the same through redeclaration unsigned long x; diff --git a/test/Sema/invalid-decl.c b/test/Sema/invalid-decl.c index 8c458008cb5c5..7f471a1526812 100644 --- a/test/Sema/invalid-decl.c +++ b/test/Sema/invalid-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify void test() { char = 4; // expected-error {{expected identifier}} diff --git a/test/Sema/invalid-init-diag.c b/test/Sema/invalid-init-diag.c index 724d0ea368ba1..a215fa7c254ba 100644 --- a/test/Sema/invalid-init-diag.c +++ b/test/Sema/invalid-init-diag.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only int a; struct {int x;} x = a; // expected-error {{incompatible type initializing 'int', expected 'struct <anonymous>'}} diff --git a/test/Sema/invalid-struct-init.c b/test/Sema/invalid-struct-init.c index 73e2e446f1311..a598d577f006d 100644 --- a/test/Sema/invalid-struct-init.c +++ b/test/Sema/invalid-struct-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only typedef struct _zend_module_entry zend_module_entry; struct _zend_module_entry { diff --git a/test/Sema/knr-def-call.c b/test/Sema/knr-def-call.c index 6b033fc3a21f8..8ae0550dc8b1d 100644 --- a/test/Sema/knr-def-call.c +++ b/test/Sema/knr-def-call.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C DR #316, PR 3626. void f0(a, b, c, d) int a,b,c,d; {} diff --git a/test/Sema/knr-variadic-def.c b/test/Sema/knr-variadic-def.c index 070ba071ca679..6d5d63208bf05 100644 --- a/test/Sema/knr-variadic-def.c +++ b/test/Sema/knr-variadic-def.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s // PR4287 #include <stdarg.h> diff --git a/test/Sema/member-reference.c b/test/Sema/member-reference.c index b810ccf15b72d..7bda14303a2d6 100644 --- a/test/Sema/member-reference.c +++ b/test/Sema/member-reference.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only struct simple { int i; }; diff --git a/test/Sema/merge-decls.c b/test/Sema/merge-decls.c index f4c25f511429e..1a84d33b7943c 100644 --- a/test/Sema/merge-decls.c +++ b/test/Sema/merge-decls.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only void foo(void); void foo(void) {} diff --git a/test/Sema/ms-fuzzy-asm.c b/test/Sema/ms-fuzzy-asm.c index 2113949f237be..9ace6569348e9 100644 --- a/test/Sema/ms-fuzzy-asm.c +++ b/test/Sema/ms-fuzzy-asm.c @@ -1,4 +1,5 @@ -// RUN: clang-cc %s -verify -fms-extensions +// RUN: %clang_cc1 %s -verify -fms-extensions +// XFAIL: * #define M __asm int 0x2c #define M2 int diff --git a/test/Sema/nested-redef.c b/test/Sema/nested-redef.c index 54a970f044212..6a19921f47fa5 100644 --- a/test/Sema/nested-redef.c +++ b/test/Sema/nested-redef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { // expected-note{{previous definition is here}} struct X { } x; // expected-error{{nested redefinition of 'X'}} \ // expected-error{{field has incomplete type}} diff --git a/test/Sema/offsetof.c b/test/Sema/offsetof.c index dfae99216f8a1..49d4eb43e4236 100644 --- a/test/Sema/offsetof.c +++ b/test/Sema/offsetof.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) diff --git a/test/Sema/overloadable-complex.c b/test/Sema/overloadable-complex.c index 62b3882133476..e8dbf3a6094ab 100644 --- a/test/Sema/overloadable-complex.c +++ b/test/Sema/overloadable-complex.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s char *foo(float) __attribute__((__overloadable__)); // expected-note 3 {{candidate function}} void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) { diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c index 0d5db3a984548..72d3673c825e6 100644 --- a/test/Sema/overloadable.c +++ b/test/Sema/overloadable.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute can only be applied to a function}} diff --git a/test/Sema/parentheses.c b/test/Sema/parentheses.c index f9f647c9cff73..f7a7fbd37db34 100644 --- a/test/Sema/parentheses.c +++ b/test/Sema/parentheses.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -Wparentheses -fsyntax-only -verify %s -// RUN: clang-cc -Wparentheses -fixit %s -o - | clang-cc -Wparentheses -Werror - +// RUN: %clang_cc1 -Wparentheses -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wparentheses -fixit %s -o - | %clang_cc1 -Wparentheses -Werror - // Test the various warnings under -Wparentheses void if_assign(void) { diff --git a/test/Sema/pointer-addition.c b/test/Sema/pointer-addition.c index 87d5eaf39c991..34f8bbbfcd6d6 100644 --- a/test/Sema/pointer-addition.c +++ b/test/Sema/pointer-addition.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic typedef struct S S; // expected-note 3 {{forward declaration of 'struct S'}} void a(S* b, void* c) { diff --git a/test/Sema/pointer-conversion.c b/test/Sema/pointer-conversion.c index 5f41ff67411b9..7191bf7c63f46 100644 --- a/test/Sema/pointer-conversion.c +++ b/test/Sema/pointer-conversion.c @@ -1,4 +1,4 @@ -//RUN: clang-cc -fsyntax-only -verify %s +//RUN: %clang_cc1 -fsyntax-only -verify %s char * c; char const ** c2 = &c; // expected-warning {{initializing, 'char const **' and 'char **' have different qualifiers in nested pointer types}} diff --git a/test/Sema/pointer-subtract-compat.c b/test/Sema/pointer-subtract-compat.c index b3be37e7f185f..70340c6a4cd33 100644 --- a/test/Sema/pointer-subtract-compat.c +++ b/test/Sema/pointer-subtract-compat.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic typedef const char rchar; int a(char* a, rchar* b) { diff --git a/test/Sema/pragma-pack-2.c b/test/Sema/pragma-pack-2.c index 25be5539783e6..3e6234c57f0ee 100644 --- a/test/Sema/pragma-pack-2.c +++ b/test/Sema/pragma-pack-2.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-apple-darwin9 %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify #include <stddef.h> diff --git a/test/Sema/pragma-pack-3.c b/test/Sema/pragma-pack-3.c index a2d665ea74179..d97359e45b71e 100644 --- a/test/Sema/pragma-pack-3.c +++ b/test/Sema/pragma-pack-3.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-apple-darwin9 %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify // Stack: [], Alignment: 8 diff --git a/test/Sema/pragma-pack-4.c b/test/Sema/pragma-pack-4.c index 3ccaf7e96ce67..b06fc0eaf15fd 100644 --- a/test/Sema/pragma-pack-4.c +++ b/test/Sema/pragma-pack-4.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple i686-apple-darwin9 %s -fsyntax-only -verify -// RUN: clang-cc -triple x86_64-apple-darwin9 %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only -verify // rdar://problem/7095436 #pragma pack(4) diff --git a/test/Sema/pragma-pack.c b/test/Sema/pragma-pack.c index 51398fa0a5547..e93ce42148caf 100644 --- a/test/Sema/pragma-pack.c +++ b/test/Sema/pragma-pack.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s /* expected-warning {{value of #pragma pack(show) == 8}} */ #pragma pack(show) /* expected-warning {{expected #pragma pack parameter to be}} */ #pragma pack(3) diff --git a/test/Sema/pragma-unused.c b/test/Sema/pragma-unused.c index 8b94989626469..8a051a3ec9ef7 100644 --- a/test/Sema/pragma-unused.c +++ b/test/Sema/pragma-unused.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f1(void) { int x, y, z; diff --git a/test/Sema/predef.c b/test/Sema/predef.c index 7b3fe5038f967..9c1994699da76 100644 --- a/test/Sema/predef.c +++ b/test/Sema/predef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void abcdefghi12(void) { const char (*ss)[12] = &__func__; diff --git a/test/Sema/predefined-function.c b/test/Sema/predefined-function.c index c8d17f0078e66..665d0fa1a8b78 100644 --- a/test/Sema/predefined-function.c +++ b/test/Sema/predefined-function.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s char *funk(int format); enum Test {A=-1}; diff --git a/test/Sema/private-extern.c b/test/Sema/private-extern.c index 5dd37f430efa4..d3c12651098a0 100644 --- a/test/Sema/private-extern.c +++ b/test/Sema/private-extern.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s static int g0; // expected-note{{previous definition}} int g0; // expected-error{{non-static declaration of 'g0' follows static declaration}} diff --git a/test/Sema/promote-int-16bit.c b/test/Sema/promote-int-16bit.c index fbd1215d90d23..6446720a815e7 100644 --- a/test/Sema/promote-int-16bit.c +++ b/test/Sema/promote-int-16bit.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -triple pic16-unknown-unknown +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple pic16-unknown-unknown // Check that unsigned short promotes to unsigned int on targets where // sizeof(unsigned short) == sizeof(unsigned int) diff --git a/test/Sema/rdar6248119.m b/test/Sema/rdar6248119.m index d4ee305c2912a..6b120b2847561 100644 --- a/test/Sema/rdar6248119.m +++ b/test/Sema/rdar6248119.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify // Test case for: // <rdar://problem/6248119> @finally doesn't introduce a new scope diff --git a/test/Sema/rdr6094103-unordered-compare-promote.c b/test/Sema/rdr6094103-unordered-compare-promote.c index 636f770e3ee0f..9991982a20b27 100644 --- a/test/Sema/rdr6094103-unordered-compare-promote.c +++ b/test/Sema/rdr6094103-unordered-compare-promote.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-dump %s 2>&1 | grep ImplicitCastExpr | count 2 +// RUN: %clang_cc1 -ast-dump %s 2>&1 | grep ImplicitCastExpr | count 2 int foo (double x, long double y) { // There needs to be an implicit cast on x here. diff --git a/test/Sema/recover-goto.c b/test/Sema/recover-goto.c index e7b9f3c8eafc5..0d665f9a60f5a 100644 --- a/test/Sema/recover-goto.c +++ b/test/Sema/recover-goto.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify void a() {goto A; // expected-error {{use of undeclared label}} // expected-error {{expected '}'}} diff --git a/test/Sema/redefinition.c b/test/Sema/redefinition.c index 9339bb935f6c6..1092b33ca35d5 100644 --- a/test/Sema/redefinition.c +++ b/test/Sema/redefinition.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify int f(int a) { return 0; } // expected-note {{previous definition is here}} int f(int); int f(int a) { return 0; } // expected-error {{redefinition of 'f'}} diff --git a/test/Sema/return-noreturn.c b/test/Sema/return-noreturn.c index 8868c9ee0aeb3..198ab11c6760e 100644 --- a/test/Sema/return-noreturn.c +++ b/test/Sema/return-noreturn.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks -Wmissing-noreturn +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wmissing-noreturn int j; void test1() { // expected-warning {{function could be attribute 'noreturn'}} diff --git a/test/Sema/return-silent.c b/test/Sema/return-silent.c index b3b2a56218192..eb9641b7f3bec 100644 --- a/test/Sema/return-silent.c +++ b/test/Sema/return-silent.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -Wno-return-type -fsyntax-only -verify +// RUN: %clang_cc1 %s -Wno-return-type -fsyntax-only -verify int t14() { return; diff --git a/test/Sema/return.c b/test/Sema/return.c index 2e8120a7542e4..17d21789f05ad 100644 --- a/test/Sema/return.c +++ b/test/Sema/return.c @@ -1,4 +1,4 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -fblocks +// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks // clang emits the following warning by default. // With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the @@ -222,7 +222,3 @@ void test32() { void test33() { if (j) while (1) { } } - -int test34() { - asm("nop"); -} diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c index 76041c4916536..4d3f6cbcf2b84 100644 --- a/test/Sema/scope-check.c +++ b/test/Sema/scope-check.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fblocks -std=gnu99 %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -std=gnu99 %s int test1(int x) { goto L; // expected-error{{illegal goto into protected scope}} diff --git a/test/Sema/self-comparison.c b/test/Sema/self-comparison.c index db56e8bf17d80..b2b06c209a613 100644 --- a/test/Sema/self-comparison.c +++ b/test/Sema/self-comparison.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int foo(int x) { return x == x; // expected-warning {{self-comparison always results}} diff --git a/test/Sema/sentinel-attribute.c b/test/Sema/sentinel-attribute.c index c40f8df29c332..4c09273967639 100644 --- a/test/Sema/sentinel-attribute.c +++ b/test/Sema/sentinel-attribute.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int x __attribute__((sentinel)); //expected-warning{{'sentinel' attribute only applies to function, method or block types}} void f1(int a, ...) __attribute__ ((sentinel)); diff --git a/test/Sema/shift.c b/test/Sema/shift.c index fdfebc589a77b..558a7d20065a2 100644 --- a/test/Sema/shift.c +++ b/test/Sema/shift.c @@ -1,4 +1,4 @@ -// RUN: clang -Wall -fsyntax-only -Xclang -verify %s +// RUN: %clang -Wall -fsyntax-only -Xclang -verify %s #include <limits.h> diff --git a/test/Sema/statements.c b/test/Sema/statements.c index 8eac052a25c7b..3cd2460e79d92 100644 --- a/test/Sema/statements.c +++ b/test/Sema/statements.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify typedef unsigned __uint32_t; diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c index 510f3ab099afd..8011943755c02 100644 --- a/test/Sema/static-init.c +++ b/test/Sema/static-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-pc-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-pc-linux-gnu -fsyntax-only -verify %s #include <stdint.h> diff --git a/test/Sema/stdcall-fastcall.c b/test/Sema/stdcall-fastcall.c index e0db63822fb3a..c45f93e07c055 100644 --- a/test/Sema/stdcall-fastcall.c +++ b/test/Sema/stdcall-fastcall.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // CC qualifier can be applied only to functions int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}} diff --git a/test/Sema/struct-cast.c b/test/Sema/struct-cast.c index 063e8e32c02d0..dc7db130dc19a 100644 --- a/test/Sema/struct-cast.c +++ b/test/Sema/struct-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify struct S { int one; diff --git a/test/Sema/struct-compat.c b/test/Sema/struct-compat.c index 35d8fb1aa0c27..2e112e17dade7 100644 --- a/test/Sema/struct-compat.c +++ b/test/Sema/struct-compat.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -fsyntax-only -pedantic -verify +/* RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify */ extern struct {int a;} x; // expected-note {{previous definition is here}} diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c index a5a299bf09b24..f8880530f9502 100644 --- a/test/Sema/struct-decl.c +++ b/test/Sema/struct-decl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR3459 struct bar { char n[1]; diff --git a/test/Sema/struct-packed-align.c b/test/Sema/struct-packed-align.c index 8250c14d44209..60a9febafbad1 100644 --- a/test/Sema/struct-packed-align.c +++ b/test/Sema/struct-packed-align.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // Packed structs. struct s { diff --git a/test/Sema/surpress-deprecated.c b/test/Sema/surpress-deprecated.c index 8dbe9dd365813..78faf22328a43 100644 --- a/test/Sema/surpress-deprecated.c +++ b/test/Sema/surpress-deprecated.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Wno-deprecated-declarations -verify %s +// RUN: %clang -fsyntax-only -Wno-deprecated-declarations -verify %s extern void OldFunction() __attribute__((deprecated)); int main (int argc, const char * argv[]) { diff --git a/test/Sema/switch.c b/test/Sema/switch.c index 3ee371202f91d..f815ba4627f9c 100644 --- a/test/Sema/switch.c +++ b/test/Sema/switch.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f (int z) { while (z) { default: z--; // expected-error {{statement not in switch}} diff --git a/test/Sema/tentative-decls.c b/test/Sema/tentative-decls.c index c94af1160b898..b15537bfa0cdc 100644 --- a/test/Sema/tentative-decls.c +++ b/test/Sema/tentative-decls.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // PR3310 struct a x1; // expected-note 2{{forward declaration of 'struct a'}} diff --git a/test/Sema/text-diag.c b/test/Sema/text-diag.c index 19847c6d1e918..6dcaaa87a9a60 100644 --- a/test/Sema/text-diag.c +++ b/test/Sema/text-diag.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s unsigned char *foo = "texto\ que continua\ e continua"; diff --git a/test/Sema/thread-specifier.c b/test/Sema/thread-specifier.c index 8d66e539c875d..ed27c7063df70 100644 --- a/test/Sema/thread-specifier.c +++ b/test/Sema/thread-specifier.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i686-pc-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s __thread int t1; __thread extern int t2; diff --git a/test/Sema/transparent-union-pointer.c b/test/Sema/transparent-union-pointer.c index a58bd42f821fc..31c93914b819d 100644 --- a/test/Sema/transparent-union-pointer.c +++ b/test/Sema/transparent-union-pointer.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify typedef union { union wait *__uptr; diff --git a/test/Sema/transparent-union.c b/test/Sema/transparent-union.c index 90ecaadea6e77..03f6a53d059a0 100644 --- a/test/Sema/transparent-union.c +++ b/test/Sema/transparent-union.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Xclang -verify %s +// RUN: %clang -fsyntax-only -Xclang -verify %s typedef union { int *ip; float *fp; diff --git a/test/Sema/type-spec-struct-union.c b/test/Sema/type-spec-struct-union.c index 003efb14620bb..ce65095873ef6 100644 --- a/test/Sema/type-spec-struct-union.c +++ b/test/Sema/type-spec-struct-union.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s /* This test checks the introduction of struct and union types based on a type specifier of the form "struct-or-union identifier" when they diff --git a/test/Sema/typecheck-binop.c b/test/Sema/typecheck-binop.c index f5bdcbb70e835..712dad279db52 100644 --- a/test/Sema/typecheck-binop.c +++ b/test/Sema/typecheck-binop.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc %s -fsyntax-only -pedantic -verify +/* RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify */ struct incomplete; // expected-note{{forward declaration of 'struct incomplete'}} diff --git a/test/Sema/typedef-prototype.c b/test/Sema/typedef-prototype.c index fc0e05ead2922..8372154ce0efd 100644 --- a/test/Sema/typedef-prototype.c +++ b/test/Sema/typedef-prototype.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int unary_int_func(int arg); unary_int_func add_one; diff --git a/test/Sema/typedef-redef.c b/test/Sema/typedef-redef.c index 9a1c488732420..025f65cb35a54 100644 --- a/test/Sema/typedef-redef.c +++ b/test/Sema/typedef-redef.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef const int x; // expected-note {{previous definition is here}} extern x a; diff --git a/test/Sema/typedef-retain.c b/test/Sema/typedef-retain.c index ef9ec76f467b9..0ef15fdec6cd7 100644 --- a/test/Sema/typedef-retain.c +++ b/test/Sema/typedef-retain.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -fno-lax-vector-conversions +// RUN: %clang_cc1 -fsyntax-only -verify %s -fno-lax-vector-conversions typedef float float4 __attribute__((vector_size(16))); typedef int int4 __attribute__((vector_size(16))); diff --git a/test/Sema/typedef-variable-type.c b/test/Sema/typedef-variable-type.c index 7a9bb4879bc2b..f29896850b1b2 100644 --- a/test/Sema/typedef-variable-type.c +++ b/test/Sema/typedef-variable-type.c @@ -1,3 +1,3 @@ -// RUN: clang-cc %s -verify -fsyntax-only -pedantic +// RUN: %clang_cc1 %s -verify -fsyntax-only -pedantic typedef int (*a)[!.0]; // expected-warning{{size of static array must be an integer constant expression}} diff --git a/test/Sema/types.c b/test/Sema/types.c index e7d4b00a4d2af..1770bf5bd03e3 100644 --- a/test/Sema/types.c +++ b/test/Sema/types.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -pedantic -verify -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9 // rdar://6097662 typedef int (*T)[2]; diff --git a/test/Sema/ucn-cstring.c b/test/Sema/ucn-cstring.c index fb9a3b604eb74..f5bf457ed144e 100644 --- a/test/Sema/ucn-cstring.c +++ b/test/Sema/ucn-cstring.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only -pedantic +// RUN: %clang_cc1 %s -verify -fsyntax-only -pedantic int printf(const char *, ...); diff --git a/test/Sema/unnamed-bitfield-init.c b/test/Sema/unnamed-bitfield-init.c index 249f06e07d949..f3cc49c34bf27 100644 --- a/test/Sema/unnamed-bitfield-init.c +++ b/test/Sema/unnamed-bitfield-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct { int a; int : 24; char b; } S; diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c index 522fda42a169a..f5c64e6715cd0 100644 --- a/test/Sema/unused-expr.c +++ b/test/Sema/unused-expr.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fno-math-errno %s +// RUN: %clang_cc1 -fsyntax-only -verify -fno-math-errno %s int foo(int X, int Y); @@ -87,12 +87,20 @@ int fn3() __attribute__ ((const)); int t6() { if (fn1() < 0 || fn2(2,1) < 0 || fn3(2) < 0) // no warnings return -1; - + fn1(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}} fn2(92, 21); // expected-warning {{ignoring return value of function declared with pure attribute}} fn3(42); // expected-warning {{ignoring return value of function declared with const attribute}} + __builtin_fabsf(0); // expected-warning {{ignoring return value of function declared with const attribute}} return 0; } -int t7 __attribute__ ((warn_unused_result)); // expected-warning {{warning: 'warn_unused_result' attribute only applies to function types}} +int t7 __attribute__ ((warn_unused_result)); // expected-warning {{'warn_unused_result' attribute only applies to function types}} + +// PR4010 +int (*fn4)(void) __attribute__ ((warn_unused_result)); +void t8() { + fn4(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}} +} +void t9() __attribute__((warn_unused_result)); // expected-warning {{attribute 'warn_unused_result' cannot be applied to functions without return value}} diff --git a/test/Sema/usual-float.c b/test/Sema/usual-float.c index 40c0bde4e0cfa..5a9ab344ce360 100644 --- a/test/Sema/usual-float.c +++ b/test/Sema/usual-float.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only +// RUN: %clang_cc1 %s -fsyntax-only typedef float CGFloat; diff --git a/test/Sema/va_arg_x86_32.c b/test/Sema/va_arg_x86_32.c index 850d324dbfc99..e49f0a42ccf94 100644 --- a/test/Sema/va_arg_x86_32.c +++ b/test/Sema/va_arg_x86_32.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -triple=i686-pc-linux-gnu %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple=i686-pc-linux-gnu %s int a() { __builtin_va_arg((char*)0, int); // expected-error {{expression is not assignable}} diff --git a/test/Sema/va_arg_x86_64.c b/test/Sema/va_arg_x86_64.c index 61ac97b7d4518..9f514c1f59e40 100644 --- a/test/Sema/va_arg_x86_64.c +++ b/test/Sema/va_arg_x86_64.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s // PR2631 char* foo(char *fmt, __builtin_va_list ap) diff --git a/test/Sema/var-redecl.c b/test/Sema/var-redecl.c index 129fd17cd5338..e67499bcc4c98 100644 --- a/test/Sema/var-redecl.c +++ b/test/Sema/var-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int outer1; // expected-note{{previous definition is here}} extern int outer2; // expected-note{{previous definition is here}} @@ -53,7 +53,8 @@ void outer_shadowing_test() { void g18(void) { extern int g19; } -int *p=&g19; // expected-error{{use of undeclared identifier 'g19'}} +int *p=&g19; // expected-error{{use of undeclared identifier 'g19'}} \ + // expected-warning{{incompatible pointer types}} // PR3645 static int a; diff --git a/test/Sema/varargs-x86-64.c b/test/Sema/varargs-x86-64.c index 7c71c96738911..2cfedc1b37e7a 100644 --- a/test/Sema/varargs-x86-64.c +++ b/test/Sema/varargs-x86-64.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-apple-darwin9 // rdar://6726818 void f1() { diff --git a/test/Sema/varargs.c b/test/Sema/varargs.c index e928997dd8bab..e399f89ae0aa5 100644 --- a/test/Sema/varargs.c +++ b/test/Sema/varargs.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -fsyntax-only -verify %s -// RUN: clang-cc -fsyntax-only -verify %s -triple x86_64-apple-darwin9 +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-apple-darwin9 void f1(int a) { diff --git a/test/Sema/variadic-block.c b/test/Sema/variadic-block.c index 29f597b006720..ba4bb71c97507 100644 --- a/test/Sema/variadic-block.c +++ b/test/Sema/variadic-block.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only -fblocks +// RUN: %clang_cc1 %s -verify -fsyntax-only -fblocks #include <stdarg.h> diff --git a/test/Sema/vector-assign.c b/test/Sema/vector-assign.c index bf9c7f37ca6dc..d074a958fa0f3 100644 --- a/test/Sema/vector-assign.c +++ b/test/Sema/vector-assign.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only -Wvector-conversions +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversions typedef unsigned int v2u __attribute__ ((vector_size (8))); typedef signed int v2s __attribute__ ((vector_size (8))); typedef signed int v1s __attribute__ ((vector_size (4))); diff --git a/test/Sema/vector-cast.c b/test/Sema/vector-cast.c index 8c607aad073e7..aab0ab4775abb 100644 --- a/test/Sema/vector-cast.c +++ b/test/Sema/vector-cast.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify -Wvector-conversions +// RUN: %clang_cc1 -fsyntax-only %s -verify -Wvector-conversions typedef long long t1 __attribute__ ((vector_size (8))); typedef char t2 __attribute__ ((vector_size (16))); diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c index 1eec6c57a68c9..8f81adc05ba3c 100644 --- a/test/Sema/vector-init.c +++ b/test/Sema/vector-init.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify //typedef __attribute__(( ext_vector_type(4) )) float float4; typedef float float4 __attribute__((vector_size(16))); diff --git a/test/Sema/vfprintf-invalid-redecl.c b/test/Sema/vfprintf-invalid-redecl.c index 02c5061d8cd5b..cbf47a69a9a1c 100644 --- a/test/Sema/vfprintf-invalid-redecl.c +++ b/test/Sema/vfprintf-invalid-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // PR4290 // The following declaration is not compatible with vfprintf(), but make diff --git a/test/Sema/vfprintf-valid-redecl.c b/test/Sema/vfprintf-valid-redecl.c index cc8e2c40d30bf..14fbbc47ddbcc 100644 --- a/test/Sema/vfprintf-valid-redecl.c +++ b/test/Sema/vfprintf-valid-redecl.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -pedantic -verify +// RUN: %clang_cc1 %s -fsyntax-only -pedantic -verify // PR4290 // The following declaration is compatible with vfprintf, so we shouldn't diff --git a/test/Sema/vla.c b/test/Sema/vla.c index 70ba08b7eb0a8..7ddd432fbc0f7 100644 --- a/test/Sema/vla.c +++ b/test/Sema/vla.c @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only -pedantic +// RUN: %clang_cc1 %s -verify -fsyntax-only -pedantic int test1() { typedef int x[test1()]; // vla diff --git a/test/Sema/void_arg.c b/test/Sema/void_arg.c index 6799146a5ff98..337972fd149bb 100644 --- a/test/Sema/void_arg.c +++ b/test/Sema/void_arg.c @@ -1,4 +1,4 @@ -/* RUN: clang-cc -fsyntax-only %s -verify +/* RUN: %clang_cc1 -fsyntax-only %s -verify */ typedef void Void; diff --git a/test/Sema/warn-char-subscripts.c b/test/Sema/warn-char-subscripts.c index c6fd78cc1f745..374a609e81f70 100644 --- a/test/Sema/warn-char-subscripts.c +++ b/test/Sema/warn-char-subscripts.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -Wchar-subscripts -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wchar-subscripts -fsyntax-only -verify %s void t1() { int array[1] = { 0 }; diff --git a/test/Sema/warn-freestanding-complex.c b/test/Sema/warn-freestanding-complex.c index a4d3f5be31897..14e063f83c1b8 100644 --- a/test/Sema/warn-freestanding-complex.c +++ b/test/Sema/warn-freestanding-complex.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -ffreestanding -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -ffreestanding -pedantic -verify %s void foo(float _Complex c) { // expected-warning{{complex numbers are an extension in a freestanding C99 implementation}} } diff --git a/test/Sema/warn-missing-prototypes.c b/test/Sema/warn-missing-prototypes.c index 299d8a726585b..bfd1459b41d0b 100644 --- a/test/Sema/warn-missing-prototypes.c +++ b/test/Sema/warn-missing-prototypes.c @@ -1,4 +1,4 @@ -// RUN: clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s +// RUN: %clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s int f(); diff --git a/test/Sema/warn-unused-parameters.c b/test/Sema/warn-unused-parameters.c index afb95166cbce2..c6458cf9712bc 100644 --- a/test/Sema/warn-unused-parameters.c +++ b/test/Sema/warn-unused-parameters.c @@ -1,4 +1,4 @@ -// RUN: clang -fblocks -fsyntax-only -Wunused-parameter %s -Xclang -verify +// RUN: %clang -fblocks -fsyntax-only -Wunused-parameter %s -Xclang -verify int f0(int x, int y, // expected-warning{{unused}} diff --git a/test/Sema/warn-unused-variables.c b/test/Sema/warn-unused-variables.c index fd225436be82b..36615061fe6fd 100644 --- a/test/Sema/warn-unused-variables.c +++ b/test/Sema/warn-unused-variables.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wunused-variable -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -verify %s struct s0 { unsigned int i; diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c index ed6649a31d981..28ec2f14ceb79 100644 --- a/test/Sema/wchar.c +++ b/test/Sema/wchar.c @@ -1,5 +1,5 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -// RUN: clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR +// RUN: %clang %s -fsyntax-only -Xclang -verify +// RUN: %clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR typedef __WCHAR_TYPE__ wchar_t; @@ -17,6 +17,6 @@ int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1]; void foo() { WCHAR_T_TYPE t1[] = L"x"; wchar_t tab[] = L"x"; - WCHAR_T_TYPE t2[] = "x"; // expected-error {{initialization}} - char t3[] = L"x"; // expected-error {{initialization}} + WCHAR_T_TYPE t2[] = "x"; // expected-error {{initializer}} + char t3[] = L"x"; // expected-error {{initializer}} } diff --git a/test/Sema/x86-intrinsics-headers.c b/test/Sema/x86-intrinsics-headers.c index 5b43e2bd07a40..006716ef5ba4d 100644 --- a/test/Sema/x86-intrinsics-headers.c +++ b/test/Sema/x86-intrinsics-headers.c @@ -1,6 +1,6 @@ -// RUN: clang -fsyntax-only %s -// RUN: clang -fsyntax-only -fno-lax-vector-conversions %s -// RUN: clang -fsyntax-only -x c++ %s +// RUN: %clang -fsyntax-only %s +// RUN: %clang -fsyntax-only -fno-lax-vector-conversions %s +// RUN: %clang -fsyntax-only -x c++ %s #if defined(i386) || defined(__x86_64__) diff --git a/test/SemaCXX/PR5086-ambig-resolution-enum.cpp b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp index 838bc6f3c716a..720566a69b055 100644 --- a/test/SemaCXX/PR5086-ambig-resolution-enum.cpp +++ b/test/SemaCXX/PR5086-ambig-resolution-enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x class C { public: diff --git a/test/SemaCXX/__null.cpp b/test/SemaCXX/__null.cpp index cf78514440927..3583655134a74 100644 --- a/test/SemaCXX/__null.cpp +++ b/test/SemaCXX/__null.cpp @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown %s -fsyntax-only -verify -// RUN: clang-cc -triple i686-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-unknown-unknown %s -fsyntax-only -verify void f() { int* i = __null; diff --git a/test/SemaCXX/abstract.cpp b/test/SemaCXX/abstract.cpp index 3db607a365c09..0ae6c446f3da9 100644 --- a/test/SemaCXX/abstract.cpp +++ b/test/SemaCXX/abstract.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x #ifndef __GXX_EXPERIMENTAL_CXX0X__ #define __CONCAT(__X, __Y) __CONCAT1(__X, __Y) @@ -155,3 +155,17 @@ namespace PR5550 { }; C x; } + +namespace PureImplicit { + // A pure virtual destructor should be implicitly overridden. + struct A { virtual ~A() = 0; }; + struct B : A {}; + B x; + + // A pure virtual assignment operator should be implicitly overridden. + struct D; + struct C { virtual D& operator=(const D&) = 0; }; + struct D : C {}; + D y; +} + diff --git a/test/SemaCXX/access-base-class.cpp b/test/SemaCXX/access-base-class.cpp index 4a9ee51dbfb5b..f4c58d940b636 100644 --- a/test/SemaCXX/access-base-class.cpp +++ b/test/SemaCXX/access-base-class.cpp @@ -1,12 +1,11 @@ -// RUN: clang-cc -fsyntax-only -faccess-control -verify %s +// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s namespace T1 { class A { }; class B : private A { }; // expected-note {{'private' inheritance specifier here}} void f(B* b) { - A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} \ - expected-error{{incompatible type initializing 'class T1::B *', expected 'class T1::A *'}} + A *a = b; // expected-error{{conversion from 'class T1::B' to inaccessible base class 'class T1::A'}} } } @@ -17,8 +16,7 @@ class A { }; class B : A { }; // expected-note {{inheritance is implicitly 'private'}} void f(B* b) { - A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} \ - expected-error {{incompatible type initializing 'class T2::B *', expected 'class T2::A *'}} + A *a = b; // expected-error {{conversion from 'class T2::B' to inaccessible base class 'class T2::A'}} } } @@ -71,8 +69,7 @@ namespace T6 { class C : public B { void f(C *c) { - A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} \ - expected-error {{incompatible type initializing 'class T6::C *', expected 'class T6::A *'}} + A* a = c; // expected-error {{conversion from 'class T6::C' to inaccessible base class 'class T6::A'}} } }; diff --git a/test/SemaCXX/access-control-check.cpp b/test/SemaCXX/access-control-check.cpp index fb124a932a121..e6e261c1a89f8 100644 --- a/test/SemaCXX/access-control-check.cpp +++ b/test/SemaCXX/access-control-check.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -faccess-control -verify %s +// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s class M { int iM; diff --git a/test/SemaCXX/access.cpp b/test/SemaCXX/access.cpp index cfbc9c80692b2..6115ff6a94f40 100644 --- a/test/SemaCXX/access.cpp +++ b/test/SemaCXX/access.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { struct S; // expected-note {{previously declared 'private' here}} @@ -21,3 +21,14 @@ protected: private: template<typename T> struct A {}; // expected-error {{'A' redeclared with 'private' access}} }; + +// PR5573 +namespace test1 { + class A { + private: + class X; // expected-note {{previously declared 'private' here}} + public: + class X; // expected-error {{ 'X' redeclared with 'public' access}} + class X {}; + }; +} diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp index 80ea02bafd412..3b06119393d00 100644 --- a/test/SemaCXX/addr-of-overloaded-function.cpp +++ b/test/SemaCXX/addr-of-overloaded-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int f(double); int f(int); @@ -9,7 +9,7 @@ int (*pfi)(int) = &f; // selects f(int) // FIXME: This error message is not very good. We need to keep better // track of what went wrong when the implicit conversion failed to // give a better error message here. -int (*pfe)(...) = &f; // expected-error{{incompatible type initializing '<overloaded function type>', expected 'int (*)(...)'}} +int (*pfe)(...) = &f; // expected-error{{cannot initialize a variable of type 'int (*)(...)' with an rvalue of type '<overloaded function type>'}} int (&rfi)(int) = f; // selects f(int) int (&rfd)(double) = f; // selects f(double) diff --git a/test/SemaCXX/address-of.cpp b/test/SemaCXX/address-of.cpp index 4e436d6e98b2c..a7e712b04c1db 100644 --- a/test/SemaCXX/address-of.cpp +++ b/test/SemaCXX/address-of.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR clang/3175 void bar(int*); diff --git a/test/SemaCXX/aggregate-initialization.cpp b/test/SemaCXX/aggregate-initialization.cpp index c96eda4480323..255b3529823ee 100644 --- a/test/SemaCXX/aggregate-initialization.cpp +++ b/test/SemaCXX/aggregate-initialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // Verify that we can't initialize non-aggregates with an initializer // list. @@ -22,7 +22,7 @@ struct NonAggr4 { virtual void f(); }; -NonAggr1 na1 = { 17 }; // expected-error{{initialization of non-aggregate type 'struct NonAggr1' with an initializer list}} -NonAggr2 na2 = { 17 }; // expected-error{{initialization of non-aggregate type 'struct NonAggr2' with an initializer list}} -NonAggr3 na3 = { 17 }; // expected-error{{initialization of non-aggregate type 'class NonAggr3' with an initializer list}} -NonAggr4 na4 = { 17 }; // expected-error{{initialization of non-aggregate type 'struct NonAggr4' with an initializer list}} +NonAggr1 na1 = { 17 }; // expected-error{{non-aggregate type 'struct NonAggr1' cannot be initialized with an initializer list}} +NonAggr2 na2 = { 17 }; // expected-error{{non-aggregate type 'struct NonAggr2' cannot be initialized with an initializer list}} +NonAggr3 na3 = { 17 }; // expected-error{{non-aggregate type 'class NonAggr3' cannot be initialized with an initializer list}} +NonAggr4 na4 = { 17 }; // expected-error{{non-aggregate type 'struct NonAggr4' cannot be initialized with an initializer list}} diff --git a/test/SemaCXX/alignof-sizeof-reference.cpp b/test/SemaCXX/alignof-sizeof-reference.cpp index 27d98ab6491e3..f02282d72d309 100644 --- a/test/SemaCXX/alignof-sizeof-reference.cpp +++ b/test/SemaCXX/alignof-sizeof-reference.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -std=c++0x -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s struct s0; // expected-note {{forward declaration}} char ar[sizeof(s0&)]; // expected-error {{invalid application of 'sizeof' to an incomplete type}} diff --git a/test/SemaCXX/ambig-user-defined-conversions.cpp b/test/SemaCXX/ambig-user-defined-conversions.cpp index 94598f0e8ef2f..0820bc93c39f9 100644 --- a/test/SemaCXX/ambig-user-defined-conversions.cpp +++ b/test/SemaCXX/ambig-user-defined-conversions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test1 struct BASE { diff --git a/test/SemaCXX/ambiguous-builtin-unary-operator.cpp b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp index 5affd19a2fdf0..1aa09a6827a0f 100644 --- a/test/SemaCXX/ambiguous-builtin-unary-operator.cpp +++ b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct A { operator int&(); diff --git a/test/SemaCXX/anonymous-union.cpp b/test/SemaCXX/anonymous-union.cpp index f77fa03328f61..374241c9e4e60 100644 --- a/test/SemaCXX/anonymous-union.cpp +++ b/test/SemaCXX/anonymous-union.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { union { float f3; diff --git a/test/SemaCXX/array-bound-merge.cpp b/test/SemaCXX/array-bound-merge.cpp index 579c7933684db..74f58fa123601 100644 --- a/test/SemaCXX/array-bound-merge.cpp +++ b/test/SemaCXX/array-bound-merge.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5515 extern int a[]; diff --git a/test/SemaCXX/arrow-operator.cpp b/test/SemaCXX/arrow-operator.cpp index 08b3cd4cc7169..fd1ec0120a71a 100644 --- a/test/SemaCXX/arrow-operator.cpp +++ b/test/SemaCXX/arrow-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct T { void f(); }; diff --git a/test/SemaCXX/attr-after-definition.cpp b/test/SemaCXX/attr-after-definition.cpp index 2ef5acfbc0f15..148a63e4d6c1c 100644 --- a/test/SemaCXX/attr-after-definition.cpp +++ b/test/SemaCXX/attr-after-definition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { }; struct Y { }; diff --git a/test/SemaCXX/attr-cxx0x.cpp b/test/SemaCXX/attr-cxx0x.cpp index d68779cc88869..9924d1bc5707b 100644 --- a/test/SemaCXX/attr-cxx0x.cpp +++ b/test/SemaCXX/attr-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s int final_fail [[final]]; //expected-error {{'final' attribute only applies to virtual method or class types}} diff --git a/test/SemaCXX/attr-deprecated.cpp b/test/SemaCXX/attr-deprecated.cpp index 54f8b5b57fcdc..d5662d3f6313c 100644 --- a/test/SemaCXX/attr-deprecated.cpp +++ b/test/SemaCXX/attr-deprecated.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only class A { void f() __attribute__((deprecated)); void g(A* a); diff --git a/test/SemaCXX/attr-format.cpp b/test/SemaCXX/attr-format.cpp index 369099a848002..0c1eb53ea07fb 100644 --- a/test/SemaCXX/attr-format.cpp +++ b/test/SemaCXX/attr-format.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S { static void f(const char*, ...) __attribute__((format(printf, 1, 2))); diff --git a/test/SemaCXX/attr-noreturn.cpp b/test/SemaCXX/attr-noreturn.cpp index e4fdc08ae9e7b..b7d39992b8fb1 100644 --- a/test/SemaCXX/attr-noreturn.cpp +++ b/test/SemaCXX/attr-noreturn.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5620 void f0() __attribute__((__noreturn__)); @@ -28,3 +28,12 @@ void test_f3() { f3(f0); // okay f3(f2); // expected-error{{no matching function for call}} } + + +class xpto { + int blah() __attribute__((noreturn)); +}; + +int xpto::blah() { + return 3; // expected-warning {{function 'blah' declared 'noreturn' should not return}} +} diff --git a/test/SemaCXX/attr-sentinel.cpp b/test/SemaCXX/attr-sentinel.cpp index 0293a5dce00c6..56c8f881600b9 100644 --- a/test/SemaCXX/attr-sentinel.cpp +++ b/test/SemaCXX/attr-sentinel.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(int, ...) __attribute__((sentinel)); void g() { diff --git a/test/SemaCXX/attr-unavailable.cpp b/test/SemaCXX/attr-unavailable.cpp index 8e5f76bcacfa7..bebd4cb18e5da 100644 --- a/test/SemaCXX/attr-unavailable.cpp +++ b/test/SemaCXX/attr-unavailable.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int &foo(int); double &foo(double); diff --git a/test/SemaCXX/auto-cxx0x.cpp b/test/SemaCXX/auto-cxx0x.cpp index aa92bbe4f1f17..654acb5ad20c3 100644 --- a/test/SemaCXX/auto-cxx0x.cpp +++ b/test/SemaCXX/auto-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x void f() { auto int a; // expected-error{{cannot combine with previous 'auto' declaration specifier}} // expected-error{{declaration of variable 'a' with type 'auto' requires an initializer}} int auto b; // expected-error{{cannot combine with previous 'int' declaration specifier}} diff --git a/test/SemaCXX/auto-cxx98.cpp b/test/SemaCXX/auto-cxx98.cpp index 14670cd699421..fe028114880a3 100644 --- a/test/SemaCXX/auto-cxx98.cpp +++ b/test/SemaCXX/auto-cxx98.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++98 +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 void f() { auto int a; int auto b; diff --git a/test/SemaCXX/blocks.cpp b/test/SemaCXX/blocks.cpp index 9d789bb3252ad..94295437e1614 100644 --- a/test/SemaCXX/blocks.cpp +++ b/test/SemaCXX/blocks.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks void tovoid(void*); diff --git a/test/SemaCXX/bool.cpp b/test/SemaCXX/bool.cpp index 259c09c6cb833..44e17ce62b793 100644 --- a/test/SemaCXX/bool.cpp +++ b/test/SemaCXX/bool.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Bool literals can be enum values. enum { @@ -14,7 +14,7 @@ void test(bool b) --b; // expected-error {{cannot decrement expression of type bool}} b--; // expected-error {{cannot decrement expression of type bool}} - bool *b1 = (int *)0; // expected-error{{expected 'bool *'}} + bool *b1 = (int *)0; // expected-error{{cannot initialize}} } // static_assert_arg_is_bool(x) compiles only if x is a bool. diff --git a/test/SemaCXX/builtin-ptrtomember-ambig.cpp b/test/SemaCXX/builtin-ptrtomember-ambig.cpp index 1b52651910d95..3e0dfbb48edaa 100644 --- a/test/SemaCXX/builtin-ptrtomember-ambig.cpp +++ b/test/SemaCXX/builtin-ptrtomember-ambig.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct A {}; diff --git a/test/SemaCXX/builtin-ptrtomember-overload-1.cpp b/test/SemaCXX/builtin-ptrtomember-overload-1.cpp index 27ca6dc77897d..137503b2a4e0c 100644 --- a/test/SemaCXX/builtin-ptrtomember-overload-1.cpp +++ b/test/SemaCXX/builtin-ptrtomember-overload-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct A {}; struct E {}; diff --git a/test/SemaCXX/builtin-ptrtomember-overload.cpp b/test/SemaCXX/builtin-ptrtomember-overload.cpp index ed52d47f2cda7..6c132366199be 100644 --- a/test/SemaCXX/builtin-ptrtomember-overload.cpp +++ b/test/SemaCXX/builtin-ptrtomember-overload.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct A {}; diff --git a/test/SemaCXX/builtins.cpp b/test/SemaCXX/builtins.cpp index 9e9d1522f4f63..a75b4f2e403a8 100644 --- a/test/SemaCXX/builtins.cpp +++ b/test/SemaCXX/builtins.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify typedef const struct __CFString * CFStringRef; #define CFSTR __builtin___CFStringMakeConstantString void f() { (void)CFStringRef(CFSTR("Hello")); -}
\ No newline at end of file +} diff --git a/test/SemaCXX/c99.cpp b/test/SemaCXX/c99.cpp index b0ee056ef379e..f4c3639e16a90 100644 --- a/test/SemaCXX/c99.cpp +++ b/test/SemaCXX/c99.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f0(int i) { char array[i]; // expected-error{{variable length arrays}} diff --git a/test/SemaCXX/cast-conversion.cpp b/test/SemaCXX/cast-conversion.cpp index 3b6a9d6f8c492..77f4a528906d6 100644 --- a/test/SemaCXX/cast-conversion.cpp +++ b/test/SemaCXX/cast-conversion.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct R { R(int); diff --git a/test/SemaCXX/cast-explicit-ctor.cpp b/test/SemaCXX/cast-explicit-ctor.cpp index 62134ae658dbf..0052856d2ff92 100644 --- a/test/SemaCXX/cast-explicit-ctor.cpp +++ b/test/SemaCXX/cast-explicit-ctor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct B { explicit B(bool); }; void f() { (void)(B)true; diff --git a/test/SemaCXX/class-base-member-init.cpp b/test/SemaCXX/class-base-member-init.cpp index 2092847bc02d5..67bc43c2e80be 100644 --- a/test/SemaCXX/class-base-member-init.cpp +++ b/test/SemaCXX/class-base-member-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class S { public: diff --git a/test/SemaCXX/class-layout.cpp b/test/SemaCXX/class-layout.cpp index b5971723a70d7..2b8d1d3210b34 100644 --- a/test/SemaCXX/class-layout.cpp +++ b/test/SemaCXX/class-layout.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify #define SA(n, p) int a##n[(p) ? 1 : -1] diff --git a/test/SemaCXX/class-names.cpp b/test/SemaCXX/class-names.cpp index da9014574d2c9..2962988bec5b7 100644 --- a/test/SemaCXX/class-names.cpp +++ b/test/SemaCXX/class-names.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { }; C c; diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp index 2637f320207f8..743983cd34619 100644 --- a/test/SemaCXX/class.cpp +++ b/test/SemaCXX/class.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { public: auto int errx; // expected-error {{error: storage class specified for a member declaration}} diff --git a/test/SemaCXX/compare.cpp b/test/SemaCXX/compare.cpp index 7188678b74db8..cd243e3d6b23f 100644 --- a/test/SemaCXX/compare.cpp +++ b/test/SemaCXX/compare.cpp @@ -1,7 +1,7 @@ // Force x86-64 because some of our heuristics are actually based // on integer sizes. -// RUN: clang-cc -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -pedantic -verify -Wsign-compare %s int test0(long a, unsigned long b) { enum EnumA {A}; diff --git a/test/SemaCXX/complex-overload.cpp b/test/SemaCXX/complex-overload.cpp index 55d3c76d06382..337875507245a 100644 --- a/test/SemaCXX/complex-overload.cpp +++ b/test/SemaCXX/complex-overload.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s char *foo(float); // expected-note 3 {{candidate function}} void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) { diff --git a/test/SemaCXX/composite-pointer-type.cpp b/test/SemaCXX/composite-pointer-type.cpp index 1eec525f4834b..829e64f6c72ed 100644 --- a/test/SemaCXX/composite-pointer-type.cpp +++ b/test/SemaCXX/composite-pointer-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class Base { }; class Derived1 : public Base { }; diff --git a/test/SemaCXX/condition.cpp b/test/SemaCXX/condition.cpp index b2645d4fe0fa6..a0b57e1baa53a 100644 --- a/test/SemaCXX/condition.cpp +++ b/test/SemaCXX/condition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void test() { int x; @@ -6,7 +6,7 @@ void test() { if (int x=0) ++x; typedef int arr[10]; - while (arr x=0) ; // expected-error {{an array type is not allowed here}} expected-error {{initialization with '{...}' expected for array}} + while (arr x=0) ; // expected-error {{an array type is not allowed here}} expected-error {{array initializer must be an initializer list}} while (int f()=0) ; // expected-error {{a function type is not allowed here}} struct S {} s; @@ -16,9 +16,9 @@ void test() { for (;s;) ; // expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}} switch (s) {} // expected-error {{statement requires expression of integer type ('struct S' invalid)}} - while (struct S {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize 'x' with an rvalue of type 'int'}} expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}} - while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize 'x' with an rvalue of type 'int'}} expected-error {{value of type 'struct <anonymous>' is not contextually convertible to 'bool'}} - switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}} + while (struct S {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}} expected-note{{candidate function}} + while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{no viable conversion}} expected-error {{value of type 'struct <anonymous>' is not contextually convertible to 'bool'}} expected-note{{candidate function}} + switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize}} if (int x=0) { // expected-note 2 {{previous definition is here}} int x; // expected-error {{redefinition of 'x'}} diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp index f76472bf2f427..0617cd5702c65 100644 --- a/test/SemaCXX/conditional-expr.cpp +++ b/test/SemaCXX/conditional-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -faccess-control -std=c++0x -Wsign-compare %s +// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control -std=c++0x -Wsign-compare %s // C++ rules for ?: are a lot stricter than C rules, and have to take into // account more conversion options. @@ -25,7 +25,7 @@ struct Derived : Base { void fn2(); }; struct Convertible { operator Base&(); }; -struct Priv : private Base {}; // expected-note 2 {{'private' inheritance specifier here}} +struct Priv : private Base {}; // expected-note 4 {{'private' inheritance specifier here}} struct Mid : Base {}; struct Fin : Mid, Derived {}; typedef void (Derived::*DFnPtr)(); @@ -109,13 +109,12 @@ void test() (void)(i1 ? Base() : constder()); // expected-error {{incompatible operand types ('struct Base' and 'struct Derived const')}} (void)(i1 ? constder() : Base()); // expected-error {{incompatible operand types ('struct Derived const' and 'struct Base')}} - // FIXME: these are invalid hierarchy conversions Priv priv; Fin fin; - (void)(i1 ? Base() : Priv()); // xpected-error private base - (void)(i1 ? Priv() : Base()); // xpected-error private base - (void)(i1 ? Base() : Fin()); // xpected-error ambiguous base - (void)(i1 ? Fin() : Base()); // xpected-error ambiguous base + (void)(i1 ? Base() : Priv()); // expected-error{{conversion from 'struct Priv' to inaccessible base class 'struct Base'}} + (void)(i1 ? Priv() : Base()); // expected-error{{error: conversion from 'struct Priv' to inaccessible base class 'struct Base'}} + (void)(i1 ? Base() : Fin()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}} + (void)(i1 ? Fin() : Base()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}} (void)(i1 ? base : priv); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}} (void)(i1 ? priv : base); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}} (void)(i1 ? base : fin); // expected-error {{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}} diff --git a/test/SemaCXX/const-cast.cpp b/test/SemaCXX/const-cast.cpp index ee0048bd73bee..220e6faeee3c4 100644 --- a/test/SemaCXX/const-cast.cpp +++ b/test/SemaCXX/const-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A {}; @@ -28,8 +28,9 @@ char ***good_const_cast_test(ccvpcvpp var) char ***&var4 = const_cast<cpppr>(var3); // Drop reference. Intentionally without qualifier change. char *** var5 = const_cast<cppp>(var4); + // Const array to array reference. const int ar[100] = {0}; - int (&rar)[100] = const_cast<iarr>(ar); // expected-error {{const_cast from 'int const [100]' to 'iarr' (aka 'iar &') is not allowed}} + int (&rar)[100] = const_cast<iarr>(ar); // Array decay. Intentionally without qualifier change. int *pi = const_cast<int*>(ar); f fp = 0; diff --git a/test/SemaCXX/constant-expression.cpp b/test/SemaCXX/constant-expression.cpp index 02ea802c7265a..0d4d387433001 100644 --- a/test/SemaCXX/constant-expression.cpp +++ b/test/SemaCXX/constant-expression.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // C++ [expr.const]p1: // In several places, C++ requires expressions that evaluate to an integral diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index 43186013aaa67..67d4074cbcdc9 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -Wreorder -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wreorder -fsyntax-only -verify %s class A { int m; A() : A::m(17) { } // expected-error {{member initializer 'm' does not name a non-static data member or base class}} diff --git a/test/SemaCXX/constructor-recovery.cpp b/test/SemaCXX/constructor-recovery.cpp index 50fdc9622e4c7..c1bb43628356e 100644 --- a/test/SemaCXX/constructor-recovery.cpp +++ b/test/SemaCXX/constructor-recovery.cpp @@ -1,10 +1,9 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -struct C { // expected-note {{candidate function}} - virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} \ - expected-note {{candidate function}} +struct C { + virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} }; void f() { - C c; // expected-error {{call to constructor of 'c' is ambiguous}} + C c; } diff --git a/test/SemaCXX/constructor.cpp b/test/SemaCXX/constructor.cpp index 58d28b55184c3..9ef5c98e9e2cf 100644 --- a/test/SemaCXX/constructor.cpp +++ b/test/SemaCXX/constructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int INT; class Foo { diff --git a/test/SemaCXX/conversion-delete-expr.cpp b/test/SemaCXX/conversion-delete-expr.cpp index 708289c362dc0..2338778ebaac2 100644 --- a/test/SemaCXX/conversion-delete-expr.cpp +++ b/test/SemaCXX/conversion-delete-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s // Test1 struct B { diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index c0c318ed33680..db322f4a3d34e 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { public: operator bool(); @@ -9,7 +9,7 @@ public: } float g() { - return operator float(); // expected-error{{no matching function for call to 'operator float'}} + return operator float(); // expected-error{{use of undeclared 'operator float'}} } }; @@ -56,14 +56,14 @@ public: // This used to crash Clang. struct Flip; -struct Flop { +struct Flop { // expected-note{{candidate function}} Flop(); - Flop(const Flip&); + Flop(const Flip&); // expected-note{{candidate function}} }; struct Flip { - operator Flop() const; + operator Flop() const; // expected-note{{candidate function}} }; -Flop flop = Flip(); // expected-error {{cannot initialize 'flop' with an rvalue of type 'struct Flip'}} +Flop flop = Flip(); // expected-error {{conversion from 'struct Flip' to 'struct Flop' is ambiguous}} // This tests that we don't add the second conversion declaration to the list of user conversions struct C { @@ -99,7 +99,7 @@ class AutoPtrRef { }; class AutoPtr { // FIXME: Using 'unavailable' since we do not have access control yet. // FIXME: The error message isn't so good. - AutoPtr(AutoPtr &) __attribute__((unavailable)); + AutoPtr(AutoPtr &) __attribute__((unavailable)); // expected-note{{explicitly marked}} public: AutoPtr(); @@ -115,9 +115,19 @@ AutoPtr test_auto_ptr(bool Cond) { AutoPtr p; if (Cond) - return p; // expected-error{{incompatible type returning}} + return p; // expected-error{{call to deleted constructor}} return AutoPtr(); } +struct A1 { + A1(const char *); + ~A1(); +private: + A1(const A1&) __attribute__((unavailable)); // expected-note{{here}} +}; + +A1 f() { + return "Hello"; // expected-error{{invokes deleted copy constructor}} +} diff --git a/test/SemaCXX/convert-to-bool.cpp b/test/SemaCXX/convert-to-bool.cpp index 277bfc6c68884..4b5002e44a018 100644 --- a/test/SemaCXX/convert-to-bool.cpp +++ b/test/SemaCXX/convert-to-bool.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct ConvToBool { operator bool() const; }; @@ -44,7 +44,7 @@ struct ExplicitConvToRef { void test_explicit_bool(ExplicitConvToBool ecb) { bool b1(ecb); // okay - bool b2 = ecb; // expected-error{{incompatible type initializing 'struct ExplicitConvToBool', expected 'bool'}} + bool b2 = ecb; // expected-error{{no viable conversion from 'struct ExplicitConvToBool' to 'bool'}} accepts_bool(ecb); // expected-error{{no matching function for call to}} } diff --git a/test/SemaCXX/converting-constructor.cpp b/test/SemaCXX/converting-constructor.cpp index 3f347b49022ef..e78798b82cb76 100644 --- a/test/SemaCXX/converting-constructor.cpp +++ b/test/SemaCXX/converting-constructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class Z { }; class Y { @@ -27,7 +27,7 @@ public: FromShort(short s); }; -class FromShortExplicitly { +class FromShortExplicitly { // expected-note{{candidate function}} public: explicit FromShortExplicitly(short s); }; @@ -36,7 +36,7 @@ void explicit_constructor(short s) { FromShort fs1(s); FromShort fs2 = s; FromShortExplicitly fse1(s); - FromShortExplicitly fse2 = s; // expected-error{{error: cannot initialize 'fse2' with an lvalue of type 'short'}} + FromShortExplicitly fse2 = s; // expected-error{{no viable conversion}} } // PR5519 diff --git a/test/SemaCXX/copy-assignment.cpp b/test/SemaCXX/copy-assignment.cpp index 413e4d1933676..315e29a5b5ec0 100644 --- a/test/SemaCXX/copy-assignment.cpp +++ b/test/SemaCXX/copy-assignment.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { }; diff --git a/test/SemaCXX/copy-constructor-error.cpp b/test/SemaCXX/copy-constructor-error.cpp index 2e42fcc3b1cd8..9cae77504b514 100644 --- a/test/SemaCXX/copy-constructor-error.cpp +++ b/test/SemaCXX/copy-constructor-error.cpp @@ -1,13 +1,12 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -struct S { // expected-note {{candidate function}} - S (S); // expected-error {{copy constructor must pass its first argument by reference}} \\ - // expected-note {{candidate function}} +struct S { + S (S); // expected-error {{copy constructor must pass its first argument by reference}} }; S f(); void g() { - S a( f() ); // expected-error {{call to constructor of 'a' is ambiguous}} + S a( f() ); } diff --git a/test/SemaCXX/copy-initialization.cpp b/test/SemaCXX/copy-initialization.cpp index 5b1fbaa46052e..ad149232a4e36 100644 --- a/test/SemaCXX/copy-initialization.cpp +++ b/test/SemaCXX/copy-initialization.cpp @@ -1,18 +1,18 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { public: explicit X(const X&); - X(int*); // expected-note{{candidate function}} + X(int*); // expected-note 2{{candidate function}} explicit X(float*); }; class Y : public X { }; void f(Y y, int *ip, float *fp) { - X x1 = y; // expected-error{{no matching constructor for initialization of 'x1'; candidate is:}} + X x1 = y; // expected-error{{no matching constructor for initialization of 'class X'}} X x2 = 0; X x3 = ip; - X x4 = fp; // expected-error{{cannot initialize 'x4' with an lvalue of type 'float *'}} + X x4 = fp; // expected-error{{no viable conversion}} } struct foo { diff --git a/test/SemaCXX/cstyle-cast.cpp b/test/SemaCXX/cstyle-cast.cpp index 9c47df927e7b3..dbb1e4a18a2ec 100644 --- a/test/SemaCXX/cstyle-cast.cpp +++ b/test/SemaCXX/cstyle-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -faccess-control %s +// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s struct A {}; diff --git a/test/SemaCXX/cxx-member-pointer-op.cpp b/test/SemaCXX/cxx-member-pointer-op.cpp index 63b29c723e072..f43d438eb46fc 100644 --- a/test/SemaCXX/cxx-member-pointer-op.cpp +++ b/test/SemaCXX/cxx-member-pointer-op.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s struct C { static int (C::* a); diff --git a/test/SemaCXX/dcl_ambig_res.cpp b/test/SemaCXX/dcl_ambig_res.cpp index 495a6e6e42c85..859d2045da099 100644 --- a/test/SemaCXX/dcl_ambig_res.cpp +++ b/test/SemaCXX/dcl_ambig_res.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s // [dcl.ambig.res]p1: struct S { diff --git a/test/SemaCXX/dcl_init_aggr.cpp b/test/SemaCXX/dcl_init_aggr.cpp index 20b787a225263..87b51e32e5cf3 100644 --- a/test/SemaCXX/dcl_init_aggr.cpp +++ b/test/SemaCXX/dcl_init_aggr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s // C++ [dcl.init.aggr]p2 struct A { int x; @@ -13,7 +13,7 @@ struct NonAggregate { int a, b; }; -NonAggregate non_aggregate_test = { 1, 2 }; // expected-error{{initialization of non-aggregate type 'struct NonAggregate' with an initializer list}} +NonAggregate non_aggregate_test = { 1, 2 }; // expected-error{{non-aggregate type 'struct NonAggregate' cannot be initialized with an initializer list}} NonAggregate non_aggregate_test2[2] = { { 1, 2 }, { 3, 4 } }; // expected-error 2 {{initialization of non-aggregate type 'struct NonAggregate' with an initializer list}} @@ -40,17 +40,18 @@ char cv[4] = { 'a', 's', 'd', 'f', 0 }; // expected-error{{excess elements in ar struct TooFew { int a; char* b; int c; }; TooFew too_few = { 1, "asdf" }; // okay -struct NoDefaultConstructor { // expected-note 3 {{candidate function}} +struct NoDefaultConstructor { // expected-note 3 {{candidate function}} \ + // expected-note{{declared here}} NoDefaultConstructor(int); // expected-note 3 {{candidate function}} }; -struct TooFewError { +struct TooFewError { // expected-error{{implicit default constructor for}} int a; - NoDefaultConstructor nodef; + NoDefaultConstructor nodef; // expected-note{{member is declared here}} }; TooFewError too_few_okay = { 1, 1 }; TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}} -TooFewError too_few_okay2[2] = { 1, 1 }; +TooFewError too_few_okay2[2] = { 1, 1 }; // expected-note{{implicit default constructor for 'struct TooFewError' first required here}} TooFewError too_few_error2[2] = { 1 }; // expected-error{{no matching constructor}} NoDefaultConstructor too_few_error3[3] = { }; // expected-error {{no matching constructor}} @@ -114,9 +115,9 @@ B2 b2_2 = { 4, d2, 0 }; B2 b2_3 = { c2, a2, a2 }; // C++ [dcl.init.aggr]p15: -union u { int a; char* b; }; +union u { int a; char* b; }; // expected-note{{candidate function}} u u1 = { 1 }; u u2 = u1; -u u3 = 1; // expected-error{{cannot initialize 'u3' with an rvalue of type 'int'}} +u u3 = 1; // expected-error{{no viable conversion}} u u4 = { 0, "asdf" }; // expected-error{{excess elements in union initializer}} u u5 = { "asdf" }; // expected-error{{incompatible type initializing 'char const [5]', expected 'int'}} diff --git a/test/SemaCXX/decl-expr-ambiguity.cpp b/test/SemaCXX/decl-expr-ambiguity.cpp index 8d34a9ee7df99..81f68392d85aa 100644 --- a/test/SemaCXX/decl-expr-ambiguity.cpp +++ b/test/SemaCXX/decl-expr-ambiguity.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -pedantic-errors %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic-errors %s void f() { int a; diff --git a/test/SemaCXX/decl-init-ref.cpp b/test/SemaCXX/decl-init-ref.cpp index 20eb91a608cad..294543f495dbd 100644 --- a/test/SemaCXX/decl-init-ref.cpp +++ b/test/SemaCXX/decl-init-ref.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s struct A {}; // expected-note {{candidate function}} @@ -18,9 +18,9 @@ class B : public BASE , public BASE1 extern B f(); -const int& ri = (void)0; // expected-error {{invalid initialization of reference of type 'int const &' from expression of type 'void'}} +const int& ri = (void)0; // expected-error {{reference to type 'int const' could not bind to an rvalue of type 'void'}} int main() { - const A& rca = f(); // expected-error {{conversion from 'class B' to 'struct A const' is ambiguous}} + const A& rca = f(); // expected-error {{reference initialization of type 'struct A const &' with initializer of type 'class B' is ambiguous}} A& ra = f(); // expected-error {{non-const lvalue reference to type 'struct A' cannot bind to a temporary of type 'class B'}} } diff --git a/test/SemaCXX/decltype-crash.cpp b/test/SemaCXX/decltype-crash.cpp index b56a7f602987f..f94ba453ffb4a 100644 --- a/test/SemaCXX/decltype-crash.cpp +++ b/test/SemaCXX/decltype-crash.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int& a(); void f() { - decltype(a()) c; // expected-error {{no matching function for call to 'decltype'}} + decltype(a()) c; // expected-error {{use of undeclared identifier 'decltype'}} } diff --git a/test/SemaCXX/decltype-overloaded-functions.cpp b/test/SemaCXX/decltype-overloaded-functions.cpp index 4c5349b858681..906e868a42821 100644 --- a/test/SemaCXX/decltype-overloaded-functions.cpp +++ b/test/SemaCXX/decltype-overloaded-functions.cpp @@ -1,11 +1,11 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x void f(); void f(int); -decltype(f) a; // expected-error{{can't determine the declared type of an overloaded function}} +decltype(f) a; // expected-error{{cannot determine the declared type of an overloaded function}} template<typename T> struct S { - decltype(T::f) * f; // expected-error{{can't determine the declared type of an overloaded function}} + decltype(T::f) * f; // expected-error{{cannot determine the declared type of an overloaded function}} }; struct K { void f(); void f(int); }; diff --git a/test/SemaCXX/decltype-pr4444.cpp b/test/SemaCXX/decltype-pr4444.cpp index 8b2f584d24dd5..456b22c5f7f23 100644 --- a/test/SemaCXX/decltype-pr4444.cpp +++ b/test/SemaCXX/decltype-pr4444.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x template<typename T, T t> struct TestStruct { diff --git a/test/SemaCXX/decltype-pr4448.cpp b/test/SemaCXX/decltype-pr4448.cpp index fbf5da1d53eab..ead24ce0ca860 100644 --- a/test/SemaCXX/decltype-pr4448.cpp +++ b/test/SemaCXX/decltype-pr4448.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x template< typename T, T t, decltype(t+2) v > struct Convoluted {}; diff --git a/test/SemaCXX/decltype-this.cpp b/test/SemaCXX/decltype-this.cpp index c6bf299f3f3bf..f9bf49973b5c7 100644 --- a/test/SemaCXX/decltype-this.cpp +++ b/test/SemaCXX/decltype-this.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s template<typename T, typename U> struct is_same { static const bool value = false; diff --git a/test/SemaCXX/default-argument-temporaries.cpp b/test/SemaCXX/default-argument-temporaries.cpp index 232351dcff3db..3ab7bf4eb13d6 100644 --- a/test/SemaCXX/default-argument-temporaries.cpp +++ b/test/SemaCXX/default-argument-temporaries.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct B { B(void* = 0); }; struct A { diff --git a/test/SemaCXX/default-assignment-operator.cpp b/test/SemaCXX/default-assignment-operator.cpp index 0377657a82d24..9c99ad594458b 100644 --- a/test/SemaCXX/default-assignment-operator.cpp +++ b/test/SemaCXX/default-assignment-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class Base { // expected-error {{cannot define the implicit default assignment operator for 'class Base'}} int &ref; // expected-note {{declared at}} diff --git a/test/SemaCXX/default-constructor-initializers.cpp b/test/SemaCXX/default-constructor-initializers.cpp index 6adcdca3e177b..4269991adecfe 100644 --- a/test/SemaCXX/default-constructor-initializers.cpp +++ b/test/SemaCXX/default-constructor-initializers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X1 { // has no implicit default constructor X1(int); diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp index be264ad62b130..790208aa1d050 100644 --- a/test/SemaCXX/default1.cpp +++ b/test/SemaCXX/default1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(int i); void f(int i = 0); // expected-note {{previous definition is here}} void f(int i = 17); // expected-error {{redefinition of default argument}} @@ -14,7 +14,7 @@ void h(int i, int j = 2, int k = 3, int n);// expected-error {{missing default argument on parameter 'n'}} struct S { } s; -void i(int = s) { } // expected-error {{incompatible type}} +void i(int = s) { } // expected-error {{no viable conversion}} struct X { X(int); @@ -22,10 +22,10 @@ struct X { void j(X x = 17); -struct Y { +struct Y { // expected-note 2{{candidate}} explicit Y(int); }; -void k(Y y = 17); // expected-error{{cannot initialize 'y' with an rvalue of type 'int'}} +void k(Y y = 17); // expected-error{{no viable conversion}} -void kk(Y = 17); // expected-error{{cannot initialize a value of type 'struct Y' with an rvalue of type 'int'}} +void kk(Y = 17); // expected-error{{no viable conversion}} diff --git a/test/SemaCXX/default2.cpp b/test/SemaCXX/default2.cpp index 183452070da43..880255e4531b1 100644 --- a/test/SemaCXX/default2.cpp +++ b/test/SemaCXX/default2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(int i, int j, int k = 3); void f(int i, int j, int k); @@ -82,7 +82,7 @@ int Y::mem4(int i = a) // expected-error{{invalid use of nonstatic data member ' // constructors. class Z { public: - Z(Z&, int i = 17); // expected-note 2 {{candidate function}} + Z(Z&, int i = 17); // expected-note 3 {{candidate function}} void f(Z& z) { Z z2; // expected-error{{no matching constructor for initialization}} @@ -90,12 +90,12 @@ public: } void test_Z(const Z& z) { - Z z2(z); // expected-error{{no matching constructor for initialization of 'z2'}} + Z z2(z); // expected-error{{no matching constructor for initialization of 'class Z'}} } }; void test_Z(const Z& z) { - Z z2(z); // expected-error{{no matching constructor for initialization of 'z2'}} + Z z2(z); // expected-error{{no matching constructor for initialization of 'class Z'}} } struct ZZ { diff --git a/test/SemaCXX/deleted-function.cpp b/test/SemaCXX/deleted-function.cpp index 637b2b1b2d5c9..d9df1bf5b05ac 100644 --- a/test/SemaCXX/deleted-function.cpp +++ b/test/SemaCXX/deleted-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s int i = delete; // expected-error {{only functions can have deleted definitions}} @@ -16,9 +16,9 @@ void ov(int) {} // expected-note {{candidate function}} void ov(double) = delete; // expected-note {{candidate function has been explicitly deleted}} struct WithDel { - WithDel() = delete; // expected-note {{candidate function has been explicitly deleted}} + WithDel() = delete; // expected-note {{function has been explicitly marked deleted here}} void fn() = delete; // expected-note {{function has been explicitly marked deleted here}} - operator int() = delete; + operator int() = delete; // expected-note {{function has been explicitly marked deleted here}} void operator +(int) = delete; int i = delete; // expected-error {{only functions can have deleted definitions}} @@ -29,8 +29,8 @@ void test() { ov(1); ov(1.0); // expected-error {{call to deleted function 'ov'}} - WithDel dd; // expected-error {{call to deleted constructor of 'dd'}} + WithDel dd; // expected-error {{call to deleted constructor of 'struct WithDel'}} WithDel *d = 0; d->fn(); // expected-error {{attempt to use a deleted function}} - int i = *d; // expected-error {{incompatible type initializing}} + int i = *d; // expected-error {{invokes a deleted function}} } diff --git a/test/SemaCXX/dependent-types.cpp b/test/SemaCXX/dependent-types.cpp index 300312580a8fd..d9b53230c9947 100644 --- a/test/SemaCXX/dependent-types.cpp +++ b/test/SemaCXX/dependent-types.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s template<typename T, int Size> void f() { T x1; diff --git a/test/SemaCXX/derived-to-base-ambig.cpp b/test/SemaCXX/derived-to-base-ambig.cpp index e15ddde9d91f0..cfcad7989aa23 100644 --- a/test/SemaCXX/derived-to-base-ambig.cpp +++ b/test/SemaCXX/derived-to-base-ambig.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { }; class B : public A { }; class C : public A { }; diff --git a/test/SemaCXX/destructor.cpp b/test/SemaCXX/destructor.cpp index 790a401ae99c4..6837cd40157c7 100644 --- a/test/SemaCXX/destructor.cpp +++ b/test/SemaCXX/destructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { public: ~A(); diff --git a/test/SemaCXX/direct-initializer.cpp b/test/SemaCXX/direct-initializer.cpp index a9e2b2bb6e456..03a5da3a303b2 100644 --- a/test/SemaCXX/direct-initializer.cpp +++ b/test/SemaCXX/direct-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int x(1); int (x2)(1); @@ -20,19 +20,19 @@ public: X(float, Y); // expected-note{{candidate function}} }; -class Z { +class Z { // expected-note{{candidate function}} public: - Z(int); + Z(int); // expected-note{{candidate function}} }; void g() { X x1(5); X x2(1.0, 3, 4.2); - X x3(1.0, 1.0); // expected-error{{no matching constructor for initialization of 'x3'; candidates are:}} + X x3(1.0, 1.0); // expected-error{{no matching constructor for initialization of 'class X'}} Y y(1.0); X x4(3.14, y); - Z z; // expected-error{{no matching constructor for initialization of 'z'}} + Z z; // expected-error{{no matching constructor for initialization of 'class Z'}} } struct Base { @@ -40,11 +40,11 @@ struct Base { }; struct Derived : Base { - operator int*(); + operator int*(); // expected-note {{candidate function}} }; void foo(const Derived cd, Derived d) { - int *pi = cd; // expected-error {{incompatible type initializing 'struct Derived const', expected 'int *'}} + int *pi = cd; // expected-error {{no viable conversion from 'struct Derived const' to 'int *'}} int *ppi = d; } diff --git a/test/SemaCXX/do-while-scope.cpp b/test/SemaCXX/do-while-scope.cpp index 4e4a48325c1c6..2602ae12f243b 100644 --- a/test/SemaCXX/do-while-scope.cpp +++ b/test/SemaCXX/do-while-scope.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void test() { int x; diff --git a/test/SemaCXX/dynamic-cast.cpp b/test/SemaCXX/dynamic-cast.cpp index 42c5e0132a82e..53d0b9d0189ce 100644 --- a/test/SemaCXX/dynamic-cast.cpp +++ b/test/SemaCXX/dynamic-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A {}; struct B : A {}; diff --git a/test/SemaCXX/elaborated-type-specifier.cpp b/test/SemaCXX/elaborated-type-specifier.cpp index 70478e0f32c47..8d2d67f705cdb 100644 --- a/test/SemaCXX/elaborated-type-specifier.cpp +++ b/test/SemaCXX/elaborated-type-specifier.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test the use of elaborated-type-specifiers to inject the names of // structs (or classes or unions) into an outer scope as described in @@ -27,7 +27,7 @@ namespace NS { void test_X_elab(NS::X x) { struct S4 *s4 = 0; - x.test_elab2(s4); // expected-error{{incompatible type passing 'struct S4 *', expected 'struct NS::S4 *'}} + x.test_elab2(s4); // expected-error{{cannot initialize a parameter of type 'struct NS::S4 *' with an lvalue of type 'struct S4 *'}} } namespace NS { diff --git a/test/SemaCXX/empty-class-layout.cpp b/test/SemaCXX/empty-class-layout.cpp index 8b54ea1c66f28..c3dc7330fe765 100644 --- a/test/SemaCXX/empty-class-layout.cpp +++ b/test/SemaCXX/empty-class-layout.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify #define SA(n, p) int a##n[(p) ? 1 : -1] diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp index 3315de00ca83e..f1b02f5d4c6db 100644 --- a/test/SemaCXX/enum.cpp +++ b/test/SemaCXX/enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s enum E { Val1, @@ -42,26 +42,17 @@ namespace test1 { template <class A> struct is_same<A,A> { static const int value = 1; }; enum enum0 { v0 }; - int test0[is_same<typeof(+v0), int>::value]; + int test0[is_same<__typeof(+v0), int>::value]; enum enum1 { v1 = __INT_MAX__ }; - int test1[is_same<typeof(+v1), int>::value]; + int test1[is_same<__typeof(+v1), int>::value]; enum enum2 { v2 = __INT_MAX__ * 2U }; - int test2[is_same<typeof(+v2), unsigned int>::value]; + int test2[is_same<__typeof(+v2), unsigned int>::value]; - // This kindof assumes that 'int' is smaller than 'long long'. -#if defined(__LP64__) - enum enum3 { v3 = __LONG_LONG_MAX__ }; - int test3[is_same<typeof(+v3), long>::value]; + enum enum3 { v3 = __LONG_MAX__ }; + int test3[is_same<__typeof(+v3), long>::value]; - enum enum4 { v4 = __LONG_LONG_MAX__ * 2ULL }; - int test4[is_same<typeof(+v4), unsigned long>::value]; -#else - enum enum3 { v3 = __LONG_LONG_MAX__ }; - int test3[is_same<typeof(+v3), long long>::value]; - - enum enum4 { v4 = __LONG_LONG_MAX__ * 2ULL }; - int test4[is_same<typeof(+v4), unsigned long long>::value]; -#endif + enum enum4 { v4 = __LONG_MAX__ * 2UL }; + int test4[is_same<__typeof(+v4), unsigned long>::value]; } diff --git a/test/SemaCXX/exception-spec.cpp b/test/SemaCXX/exception-spec.cpp index efc983322ae5d..291b359dfdc4a 100644 --- a/test/SemaCXX/exception-spec.cpp +++ b/test/SemaCXX/exception-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fms-extensions %s +// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s // Straight from the standard: // Plain function with spec @@ -160,11 +160,11 @@ void fnptrs() // return types and arguments must match exactly, no inheritance allowed void (*(*t7)())() throw(B1) = &s8; // valid - void (*(*t8)())() throw(A) = &s8; // expected-error {{return types differ}} expected-error {{incompatible type}} - void (*(*t9)())() throw(D) = &s8; // expected-error {{return types differ}} expected-error {{incompatible type}} + void (*(*t8)())() throw(A) = &s8; // expected-error {{return types differ}} + void (*(*t9)())() throw(D) = &s8; // expected-error {{return types differ}} void (*t10)(void (*)() throw(B1)) = &s9; // valid expected-warning{{disambiguated}} - void (*t11)(void (*)() throw(A)) = &s9; // expected-error {{argument types differ}} expected-error {{incompatible type}} expected-warning{{disambiguated}} - void (*t12)(void (*)() throw(D)) = &s9; // expected-error {{argument types differ}} expected-error {{incompatible type}} expected-warning{{disambiguated}} + void (*t11)(void (*)() throw(A)) = &s9; // expected-error {{argument types differ}} expected-warning{{disambiguated}} + void (*t12)(void (*)() throw(D)) = &s9; // expected-error {{argument types differ}} expected-warning{{disambiguated}} } // Member function stuff @@ -178,7 +178,7 @@ void mfnptr() { void (Str1::*pfn1)() throw(int) = &Str1::f; // valid void (Str1::*pfn2)() = &Str1::f; // valid - void (Str1::*pfn3)() throw() = &Str1::f; // expected-error {{not superset}} expected-error {{incompatible type}} + void (Str1::*pfn3)() throw() = &Str1::f; // expected-error {{not superset}} } // Don't suppress errors in template instantiation. diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp index 5882b9cb70833..924b48aad26fc 100644 --- a/test/SemaCXX/exceptions.cpp +++ b/test/SemaCXX/exceptions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A; // expected-note 4 {{forward declaration of 'struct A'}} diff --git a/test/SemaCXX/expressions.cpp b/test/SemaCXX/expressions.cpp index 6a2f30d33e5eb..f3a05c1dbcedc 100644 --- a/test/SemaCXX/expressions.cpp +++ b/test/SemaCXX/expressions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void choice(int); int choice(bool); diff --git a/test/SemaCXX/fntype-decl.cpp b/test/SemaCXX/fntype-decl.cpp index ae85ff45353d7..b8ae625710dbb 100644 --- a/test/SemaCXX/fntype-decl.cpp +++ b/test/SemaCXX/fntype-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR2942 typedef void fn(int); diff --git a/test/SemaCXX/format-attribute.cpp b/test/SemaCXX/format-attribute.cpp index a21ebe1130663..92b7cf517effe 100644 --- a/test/SemaCXX/format-attribute.cpp +++ b/test/SemaCXX/format-attribute.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5521 struct A { void a(const char*,...) __attribute((format(printf,2,3))); }; diff --git a/test/SemaCXX/friend-class-nodecl.cpp b/test/SemaCXX/friend-class-nodecl.cpp index 13330f815db76..41e2da6a554d2 100644 --- a/test/SemaCXX/friend-class-nodecl.cpp +++ b/test/SemaCXX/friend-class-nodecl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-print %s -o %t +// RUN: %clang_cc1 -ast-print %s -o %t // RUN: not grep '^ *class B' %t // Tests that the tag decls in friend declarations aren't added to the diff --git a/test/SemaCXX/friend.cpp b/test/SemaCXX/friend.cpp index d1c42eb9fbb53..ffad0e2b44ef4 100644 --- a/test/SemaCXX/friend.cpp +++ b/test/SemaCXX/friend.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s friend class A; // expected-error {{'friend' used outside of class}} void f() { friend class A; } // expected-error {{'friend' used outside of class}} @@ -15,3 +15,35 @@ namespace test0 { friend void ns::f(int a); }; } + +// Test derived from LLVM's Registry.h +namespace test1 { + template <class T> struct Outer { + void foo(T); + struct Inner { + friend void Outer::foo(T); + }; + }; + + void test() { + (void) Outer<int>::Inner(); + } +} + +// PR5476 +namespace test2 { + namespace foo { + void Func(int x); + } + + class Bar { + friend void ::test2::foo::Func(int x); + }; +} + +// PR5134 +namespace test3 { + class Foo { + friend const int getInt(int inInt = 0); + }; +} diff --git a/test/SemaCXX/function-overloaded-redecl.cpp b/test/SemaCXX/function-overloaded-redecl.cpp index 4d8e57c1b9fe5..00778816920e2 100644 --- a/test/SemaCXX/function-overloaded-redecl.cpp +++ b/test/SemaCXX/function-overloaded-redecl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef const int cInt; diff --git a/test/SemaCXX/function-redecl.cpp b/test/SemaCXX/function-redecl.cpp index 9f6783731d33e..b15d866165850 100644 --- a/test/SemaCXX/function-redecl.cpp +++ b/test/SemaCXX/function-redecl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int foo(int); namespace N { diff --git a/test/SemaCXX/function-type-qual.cpp b/test/SemaCXX/function-type-qual.cpp index f1d5aac7fc990..be61f2ba56395 100644 --- a/test/SemaCXX/function-type-qual.cpp +++ b/test/SemaCXX/function-type-qual.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() const; // expected-error {{type qualifier is not allowed on this function}} diff --git a/test/SemaCXX/functional-cast.cpp b/test/SemaCXX/functional-cast.cpp index 142dba7b13f77..63be77008cb44 100644 --- a/test/SemaCXX/functional-cast.cpp +++ b/test/SemaCXX/functional-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -faccess-control %s +// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s // ------------ not interpreted as C-style cast ------------ diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp index b7db907e2216d..8c70bc258701c 100644 --- a/test/SemaCXX/i-c-e-cxx.cpp +++ b/test/SemaCXX/i-c-e-cxx.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // C++-specific tests for integral constant expressions. diff --git a/test/SemaCXX/illegal-member-initialization.cpp b/test/SemaCXX/illegal-member-initialization.cpp index 2d7c73d68a3f8..1890dbc9b594d 100644 --- a/test/SemaCXX/illegal-member-initialization.cpp +++ b/test/SemaCXX/illegal-member-initialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { A() : value(), cvalue() { } // expected-error {{cannot initialize the member to null in default constructor because reference member 'value' cannot be null-initialized}} \ @@ -20,3 +20,13 @@ struct X { B& b; // expected-note{{declared at}} const B cb; // expected-note{{declared at}} }; + + +// PR5924 +struct bar {}; +bar xxx(); + +struct foo { + foo_t a; // expected-error {{unknown type name 'foo_t'}} + foo() : a(xxx()) {} // no error here. +}; diff --git a/test/SemaCXX/implicit-int.cpp b/test/SemaCXX/implicit-int.cpp index 6fa8dd3463d30..9711adf34304e 100644 --- a/test/SemaCXX/implicit-int.cpp +++ b/test/SemaCXX/implicit-int.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s x; // expected-error{{C++ requires a type specifier for all declarations}} diff --git a/test/SemaCXX/implicit-member-functions.cpp b/test/SemaCXX/implicit-member-functions.cpp index 186780833d39d..40a61e47fd3c3 100644 --- a/test/SemaCXX/implicit-member-functions.cpp +++ b/test/SemaCXX/implicit-member-functions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { }; // expected-note {{previous implicit declaration is here}} A::A() { } // expected-error {{definition of implicitly declared constructor}} diff --git a/test/SemaCXX/implicit-virtual-member-functions.cpp b/test/SemaCXX/implicit-virtual-member-functions.cpp index 30fe2786ba461..a6b1f8c537d2b 100644 --- a/test/SemaCXX/implicit-virtual-member-functions.cpp +++ b/test/SemaCXX/implicit-virtual-member-functions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { virtual ~A(); }; diff --git a/test/SemaCXX/incomplete-call.cpp b/test/SemaCXX/incomplete-call.cpp index 3ce898a76f2cc..5bdaf829e64ee 100644 --- a/test/SemaCXX/incomplete-call.cpp +++ b/test/SemaCXX/incomplete-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A; // expected-note 14 {{forward declaration of 'struct A'}} A f(); // expected-note {{note: 'f' declared here}} diff --git a/test/SemaCXX/inherit.cpp b/test/SemaCXX/inherit.cpp index 069e30d0cdfaa..aabed2bff9e7f 100644 --- a/test/SemaCXX/inherit.cpp +++ b/test/SemaCXX/inherit.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { }; class B1 : A { }; diff --git a/test/SemaCXX/inline.cpp b/test/SemaCXX/inline.cpp index 7d0505a435eef..e569300faf771 100644 --- a/test/SemaCXX/inline.cpp +++ b/test/SemaCXX/inline.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Check that we don't allow illegal uses of inline // (checking C++-only constructs here) diff --git a/test/SemaCXX/invalid-member-expr.cpp b/test/SemaCXX/invalid-member-expr.cpp index 730beb32698be..666595c84f071 100644 --- a/test/SemaCXX/invalid-member-expr.cpp +++ b/test/SemaCXX/invalid-member-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X {}; diff --git a/test/SemaCXX/invalid-template-specifier.cpp b/test/SemaCXX/invalid-template-specifier.cpp index 034ad73b086ad..bcd6da7f32f77 100644 --- a/test/SemaCXX/invalid-template-specifier.cpp +++ b/test/SemaCXX/invalid-template-specifier.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only // PR4809 // This test is primarily checking that this doesn't crash, not the particular // diagnostics. diff --git a/test/SemaCXX/libstdcxx_is_pod_hack.cpp b/test/SemaCXX/libstdcxx_is_pod_hack.cpp index df064bc6a0faf..7a4bebca864e5 100644 --- a/test/SemaCXX/libstdcxx_is_pod_hack.cpp +++ b/test/SemaCXX/libstdcxx_is_pod_hack.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T> struct __is_pod { diff --git a/test/SemaCXX/linkage-spec.cpp b/test/SemaCXX/linkage-spec.cpp index d19727ac0766c..57730a62aae33 100644 --- a/test/SemaCXX/linkage-spec.cpp +++ b/test/SemaCXX/linkage-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" { extern "C" void f(int); } diff --git a/test/SemaCXX/literal-type.cpp b/test/SemaCXX/literal-type.cpp index 0dca9c9a92b31..142dd756e5a3a 100644 --- a/test/SemaCXX/literal-type.cpp +++ b/test/SemaCXX/literal-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s static_assert(__is_literal(int), "fail"); static_assert(__is_literal(void*), "fail"); diff --git a/test/SemaCXX/member-expr-anonymous-union.cpp b/test/SemaCXX/member-expr-anonymous-union.cpp index 9566df4a20ff9..0f0359667b389 100644 --- a/test/SemaCXX/member-expr-anonymous-union.cpp +++ b/test/SemaCXX/member-expr-anonymous-union.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // PR5543 struct A { int x; union { int* y; float& z; }; }; struct B : A {int a;}; diff --git a/test/SemaCXX/member-expr-static.cpp b/test/SemaCXX/member-expr-static.cpp index 2fa7e0781c1e0..7ed60f7a17b78 100644 --- a/test/SemaCXX/member-expr-static.cpp +++ b/test/SemaCXX/member-expr-static.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef void (*thread_continue_t)(); extern "C" { diff --git a/test/SemaCXX/member-expr.cpp b/test/SemaCXX/member-expr.cpp index 9cd6855ccd553..13ff64d8cffc6 100644 --- a/test/SemaCXX/member-expr.cpp +++ b/test/SemaCXX/member-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X{ public: diff --git a/test/SemaCXX/member-location.cpp b/test/SemaCXX/member-location.cpp index cb53ae15123dd..c3099d25e0e1b 100644 --- a/test/SemaCXX/member-location.cpp +++ b/test/SemaCXX/member-location.cpp @@ -1,5 +1,5 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4103: Make sure we have a location for the error class A { float a(int *); int b(); }; -int A::b() { return a(a((int*)0)); } // expected-error {{incompatible type}} +int A::b() { return a(a((int*)0)); } // expected-error {{cannot initialize a parameter of type 'int *' with an rvalue of type 'float'}} diff --git a/test/SemaCXX/member-name-lookup.cpp b/test/SemaCXX/member-name-lookup.cpp index e95641b4bf9c7..ff14416089d54 100644 --- a/test/SemaCXX/member-name-lookup.cpp +++ b/test/SemaCXX/member-name-lookup.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { int a; // expected-note 4{{member found by ambiguous name lookup}} static int b; diff --git a/test/SemaCXX/member-operator-expr.cpp b/test/SemaCXX/member-operator-expr.cpp index 4d0e00fd60107..5e3d0c0a1bc85 100644 --- a/test/SemaCXX/member-operator-expr.cpp +++ b/test/SemaCXX/member-operator-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { public: diff --git a/test/SemaCXX/member-pointer-size.cpp b/test/SemaCXX/member-pointer-size.cpp index 952027d123951..3aa1eaf5f256a 100644 --- a/test/SemaCXX/member-pointer-size.cpp +++ b/test/SemaCXX/member-pointer-size.cpp @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple x86_64-unknown-unknown %s -fsyntax-only -verify -// RUN: clang-cc -triple i686-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i686-unknown-unknown %s -fsyntax-only -verify #include <stddef.h> struct A; diff --git a/test/SemaCXX/member-pointer.cpp b/test/SemaCXX/member-pointer.cpp index d13b16e6d6727..65d05eb5af749 100644 --- a/test/SemaCXX/member-pointer.cpp +++ b/test/SemaCXX/member-pointer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A {}; enum B { Dummy }; @@ -35,8 +35,8 @@ void f() { pdid = pdi2; // Fail conversion due to ambiguity and virtuality. - int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'struct A' to pointer to member of derived class 'struct F'}} expected-error {{incompatible type}} - int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'struct A' to pointer to member of class 'struct G' via virtual base 'struct D' is not allowed}} expected-error {{incompatible type}} + int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class 'struct A' to pointer to member of derived class 'struct F'}} + int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'struct A' to pointer to member of class 'struct G' via virtual base 'struct D' is not allowed}} // Conversion to member of base. pdi1 = pdid; // expected-error {{incompatible type assigning 'int struct D::*', expected 'int struct A::*'}} diff --git a/test/SemaCXX/member-pointers-2.cpp b/test/SemaCXX/member-pointers-2.cpp index fea1d74b02555..4b3b82c029753 100644 --- a/test/SemaCXX/member-pointers-2.cpp +++ b/test/SemaCXX/member-pointers-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -emit-llvm-only %s +// RUN: %clang_cc1 -emit-llvm-only %s // Tests that Sema properly creates member-access expressions for // these instead of bare FieldDecls. diff --git a/test/SemaCXX/missing-members.cpp b/test/SemaCXX/missing-members.cpp index 28ad9a04e7906..9ec17f7b99335 100644 --- a/test/SemaCXX/missing-members.cpp +++ b/test/SemaCXX/missing-members.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { namespace B { class C { }; diff --git a/test/SemaCXX/ms-exception-spec.cpp b/test/SemaCXX/ms-exception-spec.cpp index b84ea178e1e22..bda56f5468d4a 100644 --- a/test/SemaCXX/ms-exception-spec.cpp +++ b/test/SemaCXX/ms-exception-spec.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fms-extensions +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions void f() throw(...) { } diff --git a/test/SemaCXX/namespace-alias.cpp b/test/SemaCXX/namespace-alias.cpp index d5e423848cb52..f9836064d131b 100644 --- a/test/SemaCXX/namespace-alias.cpp +++ b/test/SemaCXX/namespace-alias.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { }; diff --git a/test/SemaCXX/namespace.cpp b/test/SemaCXX/namespace.cpp index 5ed6ba50ce1bd..ab690b7286ec8 100644 --- a/test/SemaCXX/namespace.cpp +++ b/test/SemaCXX/namespace.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { // expected-note 2 {{previous definition is here}} int A; void f() { A = 0; } diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp index 6a51261e26fcf..4e65b41e666c2 100644 --- a/test/SemaCXX/nested-name-spec.cpp +++ b/test/SemaCXX/nested-name-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s namespace A { struct C { static int cx; @@ -178,7 +178,7 @@ bool (foo_S::value); namespace somens { - struct a { }; + struct a { }; // expected-note{{candidate function}} } template <typename T> @@ -189,8 +189,34 @@ class foo { // PR4452 / PR4451 foo<somens:a> a2; // expected-error {{unexpected ':' in nested name specifier}} -somens::a a3 = a2; // expected-error {{cannot initialize 'a3' with an lvalue of type 'foo<somens::a>'}} +somens::a a3 = a2; // expected-error {{no viable conversion}} +// typedefs and using declarations. +namespace test1 { + namespace ns { + class Counter { static int count; }; + typedef Counter counter; + } + using ns::counter; + class Test { + void test1() { + counter c; + c.count++; + counter::count++; + } + }; +} +// We still need to do lookup in the lexical scope, even if we push a +// non-lexical scope. +namespace test2 { + namespace ns { + int *count_ptr; + } + namespace { + int count = 0; + } + int *ns::count_ptr = &count; +} diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp index 8a3ec8b16a262..0e0f630bc497f 100644 --- a/test/SemaCXX/new-delete.cpp +++ b/test/SemaCXX/new-delete.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> @@ -18,7 +18,8 @@ struct V : U { }; -void* operator new(size_t); // expected-note 2 {{candidate}} +// PR5823 +void* operator new(const size_t); // expected-note 2 {{candidate}} void* operator new(size_t, int*); // expected-note 3 {{candidate}} void* operator new(size_t, float*); // expected-note 3 {{candidate}} void* operator new(size_t, S); // expected-note 2 {{candidate}} @@ -59,12 +60,12 @@ void bad_news(int *ip) (void)new int[1][i]; // expected-error {{only the first dimension}} (void)new (int[1][i]); // expected-error {{only the first dimension}} (void)new (int[i]); // expected-error {{when type is in parentheses}} - (void)new int(*(S*)0); // expected-error {{incompatible type initializing}} - (void)new int(1, 2); // expected-error {{initializer of a builtin type can only take one argument}} + (void)new int(*(S*)0); // expected-error {{no viable conversion from 'struct S' to 'int'}} + (void)new int(1, 2); // expected-error {{excess elements in scalar initializer}} (void)new S(1); // expected-error {{no matching constructor}} - (void)new S(1, 1); // expected-error {{call to constructor of 'S' is ambiguous}} - (void)new const int; // expected-error {{must provide an initializer}} - (void)new float*(ip); // expected-error {{incompatible type initializing 'int *', expected 'float *'}} + (void)new S(1, 1); // expected-error {{call to constructor of 'struct S' is ambiguous}} + (void)new const int; // expected-error {{default initialization of an object of const type 'int const'}} + (void)new float*(ip); // expected-error {{cannot initialize a value of type 'float *' with an lvalue of type 'int *'}} // Undefined, but clang should reject it directly. (void)new int[-1]; // expected-error {{array size is negative}} (void)new int[*(S*)0]; // expected-error {{array size expression must have integral or enumerated type, not 'struct S'}} @@ -215,4 +216,3 @@ static void* f(void* g) { return new (g) X13(); } - diff --git a/test/SemaCXX/no-implicit-builtin-decls.cpp b/test/SemaCXX/no-implicit-builtin-decls.cpp index bd11f92f7e629..d82f7f18bffe0 100644 --- a/test/SemaCXX/no-implicit-builtin-decls.cpp +++ b/test/SemaCXX/no-implicit-builtin-decls.cpp @@ -1,7 +1,7 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { - void *p = malloc(sizeof(int) * 10); // expected-error{{no matching function for call to 'malloc'}} + void *p = malloc(sizeof(int) * 10); // expected-error{{use of undeclared identifier 'malloc'}} } int malloc(double); diff --git a/test/SemaCXX/nullptr.cpp b/test/SemaCXX/nullptr.cpp index 6cc5a8168313a..a3aab7fbe3e09 100644 --- a/test/SemaCXX/nullptr.cpp +++ b/test/SemaCXX/nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s #include <stdint.h> // Don't have decltype yet. @@ -29,7 +29,7 @@ nullptr_t f(nullptr_t null) bool b = nullptr; // Can't convert nullptr to integral implicitly. - uintptr_t i = nullptr; // expected-error {{incompatible type initializing}} + uintptr_t i = nullptr; // expected-error {{cannot initialize}} // Operators (void)(null == nullptr); diff --git a/test/SemaCXX/offsetof.cpp b/test/SemaCXX/offsetof.cpp index bc7a707ee546b..f3dc52df49771 100644 --- a/test/SemaCXX/offsetof.cpp +++ b/test/SemaCXX/offsetof.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -Winvalid-offsetof +// RUN: %clang_cc1 -fsyntax-only -verify %s -Winvalid-offsetof struct NonPOD { virtual void f(); diff --git a/test/SemaCXX/overload-call-copycon.cpp b/test/SemaCXX/overload-call-copycon.cpp index 6436236b81e98..472fae26b81ff 100644 --- a/test/SemaCXX/overload-call-copycon.cpp +++ b/test/SemaCXX/overload-call-copycon.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -Wnon-pod-varargs +// RUN: %clang_cc1 -fsyntax-only %s -Wnon-pod-varargs class X { }; int& copycon(X x); diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp index 5d2718208f2bc..299c0a78f9267 100644 --- a/test/SemaCXX/overload-call.cpp +++ b/test/SemaCXX/overload-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s int* f(int) { return 0; } float* f(float) { return 0; } void f(); diff --git a/test/SemaCXX/overload-decl.cpp b/test/SemaCXX/overload-decl.cpp index 2bc832f558f78..c610ff7ab0645 100644 --- a/test/SemaCXX/overload-decl.cpp +++ b/test/SemaCXX/overload-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(); void f(int); void f(int, float); diff --git a/test/SemaCXX/overload-member-call.cpp b/test/SemaCXX/overload-member-call.cpp index 937b65d633f9d..4bb3ff3a54cd6 100644 --- a/test/SemaCXX/overload-member-call.cpp +++ b/test/SemaCXX/overload-member-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { int& f(int) const; // expected-note 2 {{candidate function}} diff --git a/test/SemaCXX/overload-value-dep-arg.cpp b/test/SemaCXX/overload-value-dep-arg.cpp index 1e94d5a301365..c1834a7225773 100644 --- a/test/SemaCXX/overload-value-dep-arg.cpp +++ b/test/SemaCXX/overload-value-dep-arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class C { C(void*); diff --git a/test/SemaCXX/overloaded-builtin-operators.cpp b/test/SemaCXX/overloaded-builtin-operators.cpp index fd0cbc6c86436..12903cc7facf4 100644 --- a/test/SemaCXX/overloaded-builtin-operators.cpp +++ b/test/SemaCXX/overloaded-builtin-operators.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct yes; struct no; diff --git a/test/SemaCXX/overloaded-operator-decl.cpp b/test/SemaCXX/overloaded-operator-decl.cpp index fc17faf6634f4..c43d7c217cca5 100644 --- a/test/SemaCXX/overloaded-operator-decl.cpp +++ b/test/SemaCXX/overloaded-operator-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { X(); X(int); diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp index 672b8b4fc2669..a20c69b8d5d1d 100644 --- a/test/SemaCXX/overloaded-operator.cpp +++ b/test/SemaCXX/overloaded-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { }; X operator+(X, X); diff --git a/test/SemaCXX/prefetch-enum.cpp b/test/SemaCXX/prefetch-enum.cpp index 829321fb0e91d..3c77dae70ff5d 100644 --- a/test/SemaCXX/prefetch-enum.cpp +++ b/test/SemaCXX/prefetch-enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -verify // PR5679 enum X { A = 3 }; diff --git a/test/SemaCXX/primary-base.cpp b/test/SemaCXX/primary-base.cpp index a7e18bd528a16..a6cbbad2427a2 100644 --- a/test/SemaCXX/primary-base.cpp +++ b/test/SemaCXX/primary-base.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { virtual void f(); }; class B : virtual A { }; diff --git a/test/SemaCXX/pseudo-destructors.cpp b/test/SemaCXX/pseudo-destructors.cpp index 8f69def9fd4f1..15e37c5882020 100644 --- a/test/SemaCXX/pseudo-destructors.cpp +++ b/test/SemaCXX/pseudo-destructors.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A {}; enum Foo { F }; diff --git a/test/SemaCXX/ptrtomember-badcall.cpp b/test/SemaCXX/ptrtomember-badcall.cpp index 42b8e3b6e0c93..fb774d85e3e48 100644 --- a/test/SemaCXX/ptrtomember-badcall.cpp +++ b/test/SemaCXX/ptrtomember-badcall.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct S { int i; diff --git a/test/SemaCXX/ptrtomember-overload-resolution.cpp b/test/SemaCXX/ptrtomember-overload-resolution.cpp index b3b65ce840cbf..4c7908e1137e4 100644 --- a/test/SemaCXX/ptrtomember-overload-resolution.cpp +++ b/test/SemaCXX/ptrtomember-overload-resolution.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x // 13.3.3.2 Ranking implicit conversion sequences // conversion of A::* to B::* is better than conversion of A::* to C::*, diff --git a/test/SemaCXX/qual-id-test.cpp b/test/SemaCXX/qual-id-test.cpp index 02e69996c7726..00dc662d06709 100644 --- a/test/SemaCXX/qual-id-test.cpp +++ b/test/SemaCXX/qual-id-test.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { namespace B @@ -137,4 +137,4 @@ struct a { a a; -int a::sa = a.a; +int a::sa = a.a; // expected-error {{invalid use of nonstatic data member 'a'}} diff --git a/test/SemaCXX/qualification-conversion.cpp b/test/SemaCXX/qualification-conversion.cpp index 01e503ddac6c8..f1af5bf2852d1 100644 --- a/test/SemaCXX/qualification-conversion.cpp +++ b/test/SemaCXX/qualification-conversion.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s int* quals1(int const * p); int* quals2(int const * const * pp); int* quals3(int const * * const * ppp); // expected-note{{candidate function}} @@ -21,3 +21,14 @@ void test_mquals(int A::*p, int A::* A::*pp, int A::* A::* A::*ppp) { mquals2(pp); mquals3(ppp); // expected-error {{no matching}} } + +void aquals1(int const (*p)[1]); +void aquals2(int * const (*pp)[1]); +void aquals2a(int const * (*pp2)[1]); // expected-note{{candidate function}} + +void test_aquals(int (*p)[1], int * (*pp)[1], int * (*pp2)[1]) { + int const (*p2)[1] = p; + aquals1(p); + aquals2(pp); + aquals2a(pp2); // expected-error {{no matching}} +} diff --git a/test/SemaCXX/qualified-id-lookup.cpp b/test/SemaCXX/qualified-id-lookup.cpp index 5a11a0cd07b83..a187d4908cd4d 100644 --- a/test/SemaCXX/qualified-id-lookup.cpp +++ b/test/SemaCXX/qualified-id-lookup.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace Ns { int f(); // expected-note{{previous declaration is here}} diff --git a/test/SemaCXX/qualified-names-diag.cpp b/test/SemaCXX/qualified-names-diag.cpp index 3bffd7c05d3bc..86c10888b8a22 100644 --- a/test/SemaCXX/qualified-names-diag.cpp +++ b/test/SemaCXX/qualified-names-diag.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace foo { namespace wibble { struct x { int y; }; diff --git a/test/SemaCXX/qualified-names-print.cpp b/test/SemaCXX/qualified-names-print.cpp index 1cb19f0312e4b..2099268a1a927 100644 --- a/test/SemaCXX/qualified-names-print.cpp +++ b/test/SemaCXX/qualified-names-print.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -ast-print %s 2>&1 | grep "N::M::X<INT>::value" +// RUN: %clang_cc1 -ast-print %s 2>&1 | grep "N::M::X<INT>::value" namespace N { namespace M { template<typename T> diff --git a/test/SemaCXX/ref-init-ambiguous.cpp b/test/SemaCXX/ref-init-ambiguous.cpp index 60620993b43c1..976879ecd0ae2 100644 --- a/test/SemaCXX/ref-init-ambiguous.cpp +++ b/test/SemaCXX/ref-init-ambiguous.cpp @@ -1,21 +1,20 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x enum E2 { }; struct A { - operator E2&(); // expected-note 2 {{candidate function}} + operator E2&(); // expected-note 3 {{candidate function}} }; struct B { - operator E2&(); // expected-note 2 {{candidate function}} + operator E2&(); // expected-note 3 {{candidate function}} }; struct C : B, A { }; void test(C c) { - // FIXME: state that there was an ambiguity in the conversion! - const E2 &e2 = c; // expected-error {{reference to type 'enum E2 const' could not bind to an lvalue of type 'struct C'}} + const E2 &e2 = c; // expected-error {{reference initialization of type 'enum E2 const &' with initializer of type 'struct C' is ambiguous}} } void foo(const E2 &); diff --git a/test/SemaCXX/references.cpp b/test/SemaCXX/references.cpp index 45d3923ff0ad5..630f53f2839ec 100644 --- a/test/SemaCXX/references.cpp +++ b/test/SemaCXX/references.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int g(int); void f() { diff --git a/test/SemaCXX/reinterpret-cast.cpp b/test/SemaCXX/reinterpret-cast.cpp index bfe8887bd3d32..da675609d1238 100644 --- a/test/SemaCXX/reinterpret-cast.cpp +++ b/test/SemaCXX/reinterpret-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stdint.h> diff --git a/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp b/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp index 16b8659711e2a..09d08f95ee280 100644 --- a/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp +++ b/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++98 -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -pedantic %s void fnptrs() { diff --git a/test/SemaCXX/return-stack-addr.cpp b/test/SemaCXX/return-stack-addr.cpp index 457de297b0082..ba64765603607 100644 --- a/test/SemaCXX/return-stack-addr.cpp +++ b/test/SemaCXX/return-stack-addr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int* ret_local() { int x = 1; diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp index 03b0ddb879658..e682fdfb50092 100644 --- a/test/SemaCXX/return.cpp +++ b/test/SemaCXX/return.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify int test1() { throw; diff --git a/test/SemaCXX/rval-references-xfail.cpp b/test/SemaCXX/rval-references-xfail.cpp new file mode 100644 index 0000000000000..d41f8f141cde1 --- /dev/null +++ b/test/SemaCXX/rval-references-xfail.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s +// XFAIL: * +struct MoveOnly { + MoveOnly(); + MoveOnly(const MoveOnly&) = delete; // expected-note {{candidate function}} \ + // expected-note 3{{explicitly marked deleted here}} + MoveOnly(MoveOnly&&); // expected-note {{candidate function}} + MoveOnly(int&&); // expected-note {{candidate function}} +}; + +MoveOnly returning() { + MoveOnly mo; + return mo; +} diff --git a/test/SemaCXX/rval-references.cpp b/test/SemaCXX/rval-references.cpp index 7a71607707c88..7ff3d584c02e6 100644 --- a/test/SemaCXX/rval-references.cpp +++ b/test/SemaCXX/rval-references.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s typedef int&& irr; typedef irr& ilr_c1; // Collapses to int& @@ -65,27 +65,23 @@ int&& should_not_warn(int&& i) { // But GCC 4.4 does // Test the return dance. This also tests IsReturnCopyElidable. struct MoveOnly { MoveOnly(); - MoveOnly(const MoveOnly&) = delete; // expected-note {{candidate function}} + MoveOnly(const MoveOnly&) = delete; // expected-note {{candidate function}} \ + // expected-note 3{{explicitly marked deleted here}} MoveOnly(MoveOnly&&); // expected-note {{candidate function}} MoveOnly(int&&); // expected-note {{candidate function}} }; -MoveOnly returning() { - MoveOnly mo; - return mo; -} - MoveOnly gmo; MoveOnly returningNonEligible() { int i; static MoveOnly mo; MoveOnly &r = mo; if (0) // Copy from global can't be elided - return gmo; // expected-error {{incompatible type returning}} + return gmo; // expected-error {{call to deleted constructor}} else if (0) // Copy from local static can't be elided - return mo; // expected-error {{incompatible type returning}} + return mo; // expected-error {{call to deleted constructor}} else if (0) // Copy from reference can't be elided - return r; // expected-error {{incompatible type returning}} + return r; // expected-error {{call to deleted constructor}} else // Construction from different type can't be elided return i; // expected-error {{no viable conversion from 'int' to 'struct MoveOnly'}} } diff --git a/test/SemaCXX/statements.cpp b/test/SemaCXX/statements.cpp index d6925fe032e91..36982582fa120 100644 --- a/test/SemaCXX/statements.cpp +++ b/test/SemaCXX/statements.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -pedantic void foo() { return foo(); diff --git a/test/SemaCXX/static-array-member.cpp b/test/SemaCXX/static-array-member.cpp index dac70cd2eabf7..8f575491b245e 100644 --- a/test/SemaCXX/static-array-member.cpp +++ b/test/SemaCXX/static-array-member.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s struct X0 { static int array[]; diff --git a/test/SemaCXX/static-assert.cpp b/test/SemaCXX/static-assert.cpp index caf76033af704..62208cd2aeebe 100644 --- a/test/SemaCXX/static-assert.cpp +++ b/test/SemaCXX/static-assert.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x int f(); diff --git a/test/SemaCXX/static-cast-complete-type.cpp b/test/SemaCXX/static-cast-complete-type.cpp index 83583a5adf8ee..11bf22dfe8999 100644 --- a/test/SemaCXX/static-cast-complete-type.cpp +++ b/test/SemaCXX/static-cast-complete-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct S { S(int); }; diff --git a/test/SemaCXX/static-cast.cpp b/test/SemaCXX/static-cast.cpp index d3962727b806f..cdaa843b81708 100644 --- a/test/SemaCXX/static-cast.cpp +++ b/test/SemaCXX/static-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -faccess-control %s +// RUN: %clang_cc1 -fsyntax-only -verify -faccess-control %s struct A {}; struct B : public A {}; // Single public base. struct C1 : public virtual B {}; // Single virtual base. diff --git a/test/SemaCXX/static-initializers.cpp b/test/SemaCXX/static-initializers.cpp index a651243df7ef7..ca49fce052e36 100644 --- a/test/SemaCXX/static-initializers.cpp +++ b/test/SemaCXX/static-initializers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int f() { return 10; } diff --git a/test/SemaCXX/struct-class-redecl.cpp b/test/SemaCXX/struct-class-redecl.cpp index 4b6cef6dd2bfa..d3d6d79ea82ea 100644 --- a/test/SemaCXX/struct-class-redecl.cpp +++ b/test/SemaCXX/struct-class-redecl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wmismatched-tags -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wmismatched-tags -verify %s class X; // expected-note 2{{here}} typedef struct X * X_t; // expected-warning{{previously declared}} diff --git a/test/SemaCXX/switch-0x.cpp b/test/SemaCXX/switch-0x.cpp index c1f6bd9d19a85..adaeb85bce17c 100644 --- a/test/SemaCXX/switch-0x.cpp +++ b/test/SemaCXX/switch-0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s // PR5518 struct A { diff --git a/test/SemaCXX/switch.cpp b/test/SemaCXX/switch.cpp index 003d5b8b9c082..c256960af1da4 100644 --- a/test/SemaCXX/switch.cpp +++ b/test/SemaCXX/switch.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void test() { bool x = true; diff --git a/test/SemaCXX/this.cpp b/test/SemaCXX/this.cpp index 0577d3c2b9bf1..167755f0a74d0 100644 --- a/test/SemaCXX/this.cpp +++ b/test/SemaCXX/this.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} void f() { diff --git a/test/SemaCXX/trivial-constructor.cpp b/test/SemaCXX/trivial-constructor.cpp index 8fc14d9c82cb9..494d1ec0843f7 100644 --- a/test/SemaCXX/trivial-constructor.cpp +++ b/test/SemaCXX/trivial-constructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct T1 { }; static_assert(__has_trivial_constructor(T1), "T1 has trivial constructor!"); diff --git a/test/SemaCXX/trivial-destructor.cpp b/test/SemaCXX/trivial-destructor.cpp index 9e7f3a16dd66c..29358d8bd2280 100644 --- a/test/SemaCXX/trivial-destructor.cpp +++ b/test/SemaCXX/trivial-destructor.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct T1 { }; static_assert(__has_trivial_destructor(T1), "T1 has trivial destructor!"); diff --git a/test/SemaCXX/type-convert-construct.cpp b/test/SemaCXX/type-convert-construct.cpp index 1840456bde8e6..d786a9a8a6fc5 100644 --- a/test/SemaCXX/type-convert-construct.cpp +++ b/test/SemaCXX/type-convert-construct.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { float v1 = float(1); diff --git a/test/SemaCXX/type-definition-in-specifier.cpp b/test/SemaCXX/type-definition-in-specifier.cpp index 60c28b0f5e437..a614e6c2812ec 100644 --- a/test/SemaCXX/type-definition-in-specifier.cpp +++ b/test/SemaCXX/type-definition-in-specifier.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S0; struct S1; diff --git a/test/SemaCXX/type-dependent-exprs.cpp b/test/SemaCXX/type-dependent-exprs.cpp index dd31ef020c6ae..abe1b4d730cae 100644 --- a/test/SemaCXX/type-dependent-exprs.cpp +++ b/test/SemaCXX/type-dependent-exprs.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class X { public: virtual int f(); @@ -19,6 +19,6 @@ T f(T x) { return g(x); h(x); // h is a dependent name g(1, 1); // expected-error{{no matching function for call}} - h(1); // expected-error{{no matching function for call to 'h'}} + h(1); // expected-error{{use of undeclared identifier 'h'}} return 0; } diff --git a/test/SemaCXX/type-traits-incomplete.cpp b/test/SemaCXX/type-traits-incomplete.cpp index ac8ec452b93f8..0ef6917c5911c 100644 --- a/test/SemaCXX/type-traits-incomplete.cpp +++ b/test/SemaCXX/type-traits-incomplete.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S; // expected-note{{forward declaration of 'struct S'}} diff --git a/test/SemaCXX/type-traits.cpp b/test/SemaCXX/type-traits.cpp index dfb4edce67c8e..85bd596126884 100644 --- a/test/SemaCXX/type-traits.cpp +++ b/test/SemaCXX/type-traits.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define T(b) (b) ? 1 : -1 #define F(b) (b) ? -1 : 1 @@ -257,4 +257,4 @@ template<typename> struct B : A { }; void f() { int t01[T(!__has_trivial_destructor(A))]; int t02[T(!__has_trivial_destructor(B<int>))]; -}
\ No newline at end of file +} diff --git a/test/SemaCXX/typedef-redecl.cpp b/test/SemaCXX/typedef-redecl.cpp index e38f47436d1c9..0d8dc8487bf71 100644 --- a/test/SemaCXX/typedef-redecl.cpp +++ b/test/SemaCXX/typedef-redecl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int INT; typedef INT REALLY_INT; // expected-note {{previous definition is here}} typedef REALLY_INT REALLY_REALLY_INT; @@ -29,3 +29,11 @@ typedef I I; struct s { }; +// PR5874 +namespace test1 { + typedef int foo; + namespace a { using test1::foo; }; + typedef int foo; + using namespace a; + foo x; +} diff --git a/test/SemaCXX/typeid.cpp b/test/SemaCXX/typeid.cpp index f9ad7592187c0..7960cac783103 100644 --- a/test/SemaCXX/typeid.cpp +++ b/test/SemaCXX/typeid.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f() { @@ -14,3 +14,11 @@ void g() { (void)typeid(int); } + +struct X; // expected-note 3{{forward declaration}} + +void g1(X &x) { + (void)typeid(X); // expected-error{{'typeid' of incomplete type 'struct X'}} + (void)typeid(X&); // expected-error{{'typeid' of incomplete type 'struct X'}} + (void)typeid(x); // expected-error{{'typeid' of incomplete type 'struct X'}} +} diff --git a/test/SemaCXX/types_compatible_p.cpp b/test/SemaCXX/types_compatible_p.cpp index 30b16006c685b..4aa9a1cfa939b 100644 --- a/test/SemaCXX/types_compatible_p.cpp +++ b/test/SemaCXX/types_compatible_p.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s bool f() { return __builtin_types_compatible_p(int, const int); // expected-error{{C++}} diff --git a/test/SemaCXX/unknown-type-name.cpp b/test/SemaCXX/unknown-type-name.cpp index 0542129513384..084a81104d550 100644 --- a/test/SemaCXX/unknown-type-name.cpp +++ b/test/SemaCXX/unknown-type-name.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR3990 namespace N { diff --git a/test/SemaCXX/unreachable-catch-clauses.cpp b/test/SemaCXX/unreachable-catch-clauses.cpp index c8b642e7ab535..9fc4aef44a040 100644 --- a/test/SemaCXX/unreachable-catch-clauses.cpp +++ b/test/SemaCXX/unreachable-catch-clauses.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class BaseEx {}; class Ex1: public BaseEx {}; diff --git a/test/SemaCXX/unused.cpp b/test/SemaCXX/unused.cpp index 55f959de0f027..6fd108186afaf 100644 --- a/test/SemaCXX/unused.cpp +++ b/test/SemaCXX/unused.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4103 : Make sure we don't get a bogus unused expression warning class APInt { char foo; diff --git a/test/SemaCXX/user-defined-conversions.cpp b/test/SemaCXX/user-defined-conversions.cpp index 0a4bb773d396e..4367f4b8a3534 100644 --- a/test/SemaCXX/user-defined-conversions.cpp +++ b/test/SemaCXX/user-defined-conversions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { operator bool(); }; diff --git a/test/SemaCXX/using-decl-1.cpp b/test/SemaCXX/using-decl-1.cpp index 0235624a8ea5e..e8a7d70976eca 100644 --- a/test/SemaCXX/using-decl-1.cpp +++ b/test/SemaCXX/using-decl-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" { void f(bool); } @@ -42,3 +42,21 @@ struct X1 : X0 { struct A { void f(); }; struct B : A { }; class C : B { using B::f; }; + +// PR5751: Resolve overloaded functions through using decls. +namespace O { + void f(int i); + void f(double d); +} +namespace P { + void f(); + void g(void (*ptr)(int)); + using O::f; + void test() { + f(); + f(1); + void (*f_ptr1)(double) = f; + void (*f_ptr2)() = f; + g(f); + } +} diff --git a/test/SemaCXX/using-decl-pr4441.cpp b/test/SemaCXX/using-decl-pr4441.cpp index 6aa2b261e4db8..39a446fed9acd 100644 --- a/test/SemaCXX/using-decl-pr4441.cpp +++ b/test/SemaCXX/using-decl-pr4441.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { struct B { }; diff --git a/test/SemaCXX/using-decl-pr4450.cpp b/test/SemaCXX/using-decl-pr4450.cpp index c3d5b8300624b..4f929ad15f5f4 100644 --- a/test/SemaCXX/using-decl-pr4450.cpp +++ b/test/SemaCXX/using-decl-pr4450.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { void g(); diff --git a/test/SemaCXX/using-decl-templates.cpp b/test/SemaCXX/using-decl-templates.cpp index a19223d479d00..8f2876ce4b32a 100644 --- a/test/SemaCXX/using-decl-templates.cpp +++ b/test/SemaCXX/using-decl-templates.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { void f() { } diff --git a/test/SemaCXX/using-directive.cpp b/test/SemaCXX/using-directive.cpp index b7583f27cb64e..0d5c8400ab7ee 100644 --- a/test/SemaCXX/using-directive.cpp +++ b/test/SemaCXX/using-directive.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace A { short i; // expected-note 2{{candidate found by name lookup is 'A::i'}} diff --git a/test/SemaCXX/value-dependent-exprs.cpp b/test/SemaCXX/value-dependent-exprs.cpp index c70f895d2bf94..2017ffa67c906 100644 --- a/test/SemaCXX/value-dependent-exprs.cpp +++ b/test/SemaCXX/value-dependent-exprs.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify %s +// RUN: %clang_cc1 -verify %s template <unsigned I> class C0 { diff --git a/test/SemaCXX/value-initialization.cpp b/test/SemaCXX/value-initialization.cpp index 25d708494b1ac..d6a86c4c8cb5b 100644 --- a/test/SemaCXX/value-initialization.cpp +++ b/test/SemaCXX/value-initialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x struct A { // expected-error {{implicit default constructor for 'struct A' must explicitly initialize the const member 'i'}} const int i; // expected-note {{declared at}} diff --git a/test/SemaCXX/vararg-default-arg.cpp b/test/SemaCXX/vararg-default-arg.cpp index 5ba032027742b..3c8e41cb3e359 100644 --- a/test/SemaCXX/vararg-default-arg.cpp +++ b/test/SemaCXX/vararg-default-arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only // PR5462 void f1(void); diff --git a/test/SemaCXX/vararg-non-pod.cpp b/test/SemaCXX/vararg-non-pod.cpp index f913531a27d06..5f95446d41f25 100644 --- a/test/SemaCXX/vararg-non-pod.cpp +++ b/test/SemaCXX/vararg-non-pod.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -fblocks %s -Wnon-pod-varargs +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s -Wnon-pod-varargs extern char version[]; diff --git a/test/SemaCXX/vector-casts.cpp b/test/SemaCXX/vector-casts.cpp index 5b08043545fa6..6ee619ef06478 100644 --- a/test/SemaCXX/vector-casts.cpp +++ b/test/SemaCXX/vector-casts.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int __v2si __attribute__((__vector_size__(8))); typedef short __v4hi __attribute__((__vector_size__(8))); typedef short __v8hi __attribute__((__vector_size__(16))); diff --git a/test/SemaCXX/virtual-member-functions-key-function.cpp b/test/SemaCXX/virtual-member-functions-key-function.cpp index 4e7ff69b2edfc..3d048595e94e0 100644 --- a/test/SemaCXX/virtual-member-functions-key-function.cpp +++ b/test/SemaCXX/virtual-member-functions-key-function.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { virtual ~A(); }; diff --git a/test/SemaCXX/virtual-override.cpp b/test/SemaCXX/virtual-override.cpp index c18a77f036bb6..4fdac85040be6 100644 --- a/test/SemaCXX/virtual-override.cpp +++ b/test/SemaCXX/virtual-override.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -faccess-control -verify %s +// RUN: %clang_cc1 -fsyntax-only -faccess-control -verify %s namespace T1 { class A { @@ -104,6 +104,35 @@ namespace T7 { }; } +namespace T8 { + struct a { }; + struct b; // expected-note {{forward declaration of 'struct T8::b'}} + + class A { + virtual a *f(); + }; + + class B : A { + b* f(); // expected-error {{return type of virtual function 'f' is not covariant with the return type of the function it overrides ('struct T8::b' is incomplete)}} + }; +} + +namespace T9 { + struct a { }; + + template<typename T> struct b : a { + int a[sizeof(T) ? -1 : -1]; // expected-error {{array size is negative}} + }; + + class A { + virtual a *f(); + }; + + class B : A { + virtual b<int> *f(); // expected-note {{in instantiation of template class 'struct T9::b<int>' requested here}} + }; +} + // PR5656 class X0 { virtual void f0(); @@ -150,3 +179,21 @@ void test3() { Bar3<int> b3i; // okay Bar3<float> b3f; // expected-error{{is an abstract class}} } + +// 5920 +namespace PR5920 { + class Base {}; + + template <typename T> + class Derived : public Base {}; + + class Foo { + public: + virtual Base* Method(); + }; + + class Bar : public Foo { + public: + virtual Derived<int>* Method(); + }; +} diff --git a/test/SemaCXX/virtuals.cpp b/test/SemaCXX/virtuals.cpp index c2ac77b30479b..792467e5f86bf 100644 --- a/test/SemaCXX/virtuals.cpp +++ b/test/SemaCXX/virtuals.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A { virtual void f(); diff --git a/test/SemaCXX/warn-assignment-condition.cpp b/test/SemaCXX/warn-assignment-condition.cpp index 3b9f3066a16be..1df906dd7ec6c 100644 --- a/test/SemaCXX/warn-assignment-condition.cpp +++ b/test/SemaCXX/warn-assignment-condition.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wparentheses -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wparentheses -verify %s struct A { int foo(); diff --git a/test/SemaCXX/warn-char-subscripts.cpp b/test/SemaCXX/warn-char-subscripts.cpp index 1c06db91c3f75..84ea536b979e7 100644 --- a/test/SemaCXX/warn-char-subscripts.cpp +++ b/test/SemaCXX/warn-char-subscripts.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -Wchar-subscripts -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wchar-subscripts -fsyntax-only -verify %s template<typename T> void t1() { diff --git a/test/SemaCXX/warn-for-var-in-else.cpp b/test/SemaCXX/warn-for-var-in-else.cpp index c46b30640fb2b..1307c43bc20a8 100644 --- a/test/SemaCXX/warn-for-var-in-else.cpp +++ b/test/SemaCXX/warn-for-var-in-else.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // rdar://6425550 int bar(); void do_something(int); diff --git a/test/SemaCXX/warn-missing-prototypes.cpp b/test/SemaCXX/warn-missing-prototypes.cpp index 079a83725223f..b6ebe820f39cd 100644 --- a/test/SemaCXX/warn-missing-prototypes.cpp +++ b/test/SemaCXX/warn-missing-prototypes.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -Wmissing-prototypes %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-prototypes %s void f() { } // expected-warning {{no previous prototype for function 'f'}} diff --git a/test/SemaCXX/warn-reorder-ctor-initialization.cpp b/test/SemaCXX/warn-reorder-ctor-initialization.cpp index bfce588b570a8..35b32b26a0669 100644 --- a/test/SemaCXX/warn-reorder-ctor-initialization.cpp +++ b/test/SemaCXX/warn-reorder-ctor-initialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wreorder -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wreorder -verify %s struct BB {}; diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp index 019863686d328..5620248f5005f 100644 --- a/test/SemaCXX/warn-unused-variables.cpp +++ b/test/SemaCXX/warn-unused-variables.cpp @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Wunused-variable -verify %s +// RUN: %clang -fsyntax-only -Wunused-variable -verify %s template<typename T> void f() { T t; @@ -32,3 +32,14 @@ namespace PR5531 { C(); } } + + +struct X { + int foo() __attribute__((warn_unused_result)); +}; + +void bah() { + X x, *x2; + x.foo(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}} + x2->foo(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}} +} diff --git a/test/SemaCXX/wchar_t.cpp b/test/SemaCXX/wchar_t.cpp index cb85bc3ae729a..789dbf643863f 100644 --- a/test/SemaCXX/wchar_t.cpp +++ b/test/SemaCXX/wchar_t.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s wchar_t x; void f(wchar_t p) { @@ -11,3 +11,17 @@ void f(wchar_t p) { // PR4502 wchar_t const c = L'c'; int a[c == L'c' ? 1 : -1]; + + +// PR5917 +template<typename _CharT> +struct basic_string { +}; + +template<typename _CharT> +basic_string<_CharT> operator+ (const basic_string<_CharT>&, _CharT); + +int t(void) { + basic_string<wchar_t>() + L'-'; + return (0); +} diff --git a/test/SemaObjC/ContClassPropertyLookup.m b/test/SemaObjC/ContClassPropertyLookup.m index 46bcc5365fdd8..b3459c13e4133 100644 --- a/test/SemaObjC/ContClassPropertyLookup.m +++ b/test/SemaObjC/ContClassPropertyLookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyObject { int _foo; diff --git a/test/SemaObjC/DoubleMethod.m b/test/SemaObjC/DoubleMethod.m index e92a017f29304..98aa699a0fce4 100644 --- a/test/SemaObjC/DoubleMethod.m +++ b/test/SemaObjC/DoubleMethod.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Subclass { diff --git a/test/SemaObjC/access-property-getter.m b/test/SemaObjC/access-property-getter.m index 1bd5c33f51061..331bb30dd5399 100644 --- a/test/SemaObjC/access-property-getter.m +++ b/test/SemaObjC/access-property-getter.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @protocol NSObject - (oneway void)release; diff --git a/test/SemaObjC/alias-test-1.m b/test/SemaObjC/alias-test-1.m index e946c3eb1ecb6..2cea115b429ed 100644 --- a/test/SemaObjC/alias-test-1.m +++ b/test/SemaObjC/alias-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}} diff --git a/test/SemaObjC/alias-test-2.m b/test/SemaObjC/alias-test-2.m index 976e2a3758c75..1f12b76055e88 100644 --- a/test/SemaObjC/alias-test-2.m +++ b/test/SemaObjC/alias-test-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Note: GCC doesn't produce any of the following errors. @interface Super @end // expected-note {{previous definition is here}} diff --git a/test/SemaObjC/argument-checking.m b/test/SemaObjC/argument-checking.m index c4ada44c5122a..3806a4c965308 100644 --- a/test/SemaObjC/argument-checking.m +++ b/test/SemaObjC/argument-checking.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s struct S { int a; }; diff --git a/test/SemaObjC/at-defs.m b/test/SemaObjC/at-defs.m index 03c9c76e3b2c1..bfa2123750501 100644 --- a/test/SemaObjC/at-defs.m +++ b/test/SemaObjC/at-defs.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-unknown-unknown %s -fsyntax-only +// RUN: %clang_cc1 -triple i386-unknown-unknown %s -fsyntax-only @interface Test { double a; diff --git a/test/SemaObjC/atomoic-property-synnthesis-rules.m b/test/SemaObjC/atomoic-property-synnthesis-rules.m index 42b173b787041..af790e3159ada 100644 --- a/test/SemaObjC/atomoic-property-synnthesis-rules.m +++ b/test/SemaObjC/atomoic-property-synnthesis-rules.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s /* Conditions for warning: diff --git a/test/SemaObjC/attr-cleanup.m b/test/SemaObjC/attr-cleanup.m index 821da000a3c1d..8415c698f3485 100644 --- a/test/SemaObjC/attr-cleanup.m +++ b/test/SemaObjC/attr-cleanup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only @class NSString; diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index 675f969632803..a58068bf8324f 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify @interface A { int X __attribute__((deprecated)); diff --git a/test/SemaObjC/attr-malloc.m b/test/SemaObjC/attr-malloc.m index 4d2093fa3d4f6..a504b333b51fa 100644 --- a/test/SemaObjC/attr-malloc.m +++ b/test/SemaObjC/attr-malloc.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -fsyntax-only -fblocks %s +// RUN: %clang_cc1 -verify -fsyntax-only -fblocks %s @interface TestAttrMallocOnMethods {} - (id) test1 __attribute((malloc)); // expected-warning {{functions returning a pointer type}} diff --git a/test/SemaObjC/attr-objc-exception.m b/test/SemaObjC/attr-objc-exception.m index 3e012c748230a..b497271521e2a 100644 --- a/test/SemaObjC/attr-objc-exception.m +++ b/test/SemaObjC/attr-objc-exception.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify __attribute__((__objc_exception__)) @interface NSException { diff --git a/test/SemaObjC/attr-objc-gc.m b/test/SemaObjC/attr-objc-gc.m index 90ca4e3280c20..47da653afe6e0 100644 --- a/test/SemaObjC/attr-objc-gc.m +++ b/test/SemaObjC/attr-objc-gc.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s static id __attribute((objc_gc(weak))) a; static id __attribute((objc_gc(strong))) b; diff --git a/test/SemaObjC/bad-receiver-1.m b/test/SemaObjC/bad-receiver-1.m index 52509753d8a2d..094c12f7d81b9 100644 --- a/test/SemaObjC/bad-receiver-1.m +++ b/test/SemaObjC/bad-receiver-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I - (id) retain; diff --git a/test/SemaObjC/block-attr.m b/test/SemaObjC/block-attr.m index 885a94649393f..c89aed4bb60dd 100644 --- a/test/SemaObjC/block-attr.m +++ b/test/SemaObjC/block-attr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -fobjc-gc-only %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -fobjc-gc-only %s @interface Thing {} diff --git a/test/SemaObjC/block-explicit-return-type.m b/test/SemaObjC/block-explicit-return-type.m index 6e9728613a8e1..22e5b6f751066 100644 --- a/test/SemaObjC/block-explicit-return-type.m +++ b/test/SemaObjC/block-explicit-return-type.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only %s -verify -fblocks +// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks // FIXME: should compile // Test for blocks with explicit return type specified. diff --git a/test/SemaObjC/block-ivar.m b/test/SemaObjC/block-ivar.m index 5dbefdcbaad92..c7ea1d96a05b0 100644 --- a/test/SemaObjC/block-ivar.m +++ b/test/SemaObjC/block-ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks @interface NSObject { struct objc_object *isa; diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m index c16372bcc421e..36292309732b7 100644 --- a/test/SemaObjC/blocks.m +++ b/test/SemaObjC/blocks.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -fblocks %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s @protocol NSObject; void bar(id(^)(void)); diff --git a/test/SemaObjC/call-super-2.m b/test/SemaObjC/call-super-2.m index f3d0a9676039a..9be853b81f8ae 100644 --- a/test/SemaObjC/call-super-2.m +++ b/test/SemaObjC/call-super-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> diff --git a/test/SemaObjC/catch-stmt.m b/test/SemaObjC/catch-stmt.m index eb570c02edfc7..80c986ff54478 100644 --- a/test/SemaObjC/catch-stmt.m +++ b/test/SemaObjC/catch-stmt.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @protocol P; diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m index 588261891131c..17c6b4620274a 100644 --- a/test/SemaObjC/category-1.m +++ b/test/SemaObjC/category-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyClass1 @end diff --git a/test/SemaObjC/category-method-lookup-2.m b/test/SemaObjC/category-method-lookup-2.m index ea828d9a3bcb9..a31d824d1d453 100644 --- a/test/SemaObjC/category-method-lookup-2.m +++ b/test/SemaObjC/category-method-lookup-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_class *Class; @interface NSObject diff --git a/test/SemaObjC/category-method-lookup.m b/test/SemaObjC/category-method-lookup.m index 9b880c4ac7071..27a10e556c282 100644 --- a/test/SemaObjC/category-method-lookup.m +++ b/test/SemaObjC/category-method-lookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo @end diff --git a/test/SemaObjC/check-dup-decl-methods-1.m b/test/SemaObjC/check-dup-decl-methods-1.m index edcd3be518a3a..1dd6446e84ca0 100644 --- a/test/SemaObjC/check-dup-decl-methods-1.m +++ b/test/SemaObjC/check-dup-decl-methods-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface SUPER - (int) meth; diff --git a/test/SemaObjC/check-dup-objc-decls-1.m b/test/SemaObjC/check-dup-objc-decls-1.m index 434f8ddae51e6..1f80293588a64 100644 --- a/test/SemaObjC/check-dup-objc-decls-1.m +++ b/test/SemaObjC/check-dup-objc-decls-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo // expected-note {{previous definition is here}} @end diff --git a/test/SemaObjC/class-bitfield.m b/test/SemaObjC/class-bitfield.m index d6d9855b2952f..d1525622429e4 100644 --- a/test/SemaObjC/class-bitfield.m +++ b/test/SemaObjC/class-bitfield.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify @interface X { diff --git a/test/SemaObjC/class-conforming-protocol-1.m b/test/SemaObjC/class-conforming-protocol-1.m index e2889c3f9d3b1..43ea6d34d1bbb 100644 --- a/test/SemaObjC/class-conforming-protocol-1.m +++ b/test/SemaObjC/class-conforming-protocol-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P1 @end @protocol P2 @end diff --git a/test/SemaObjC/class-conforming-protocol-2.m b/test/SemaObjC/class-conforming-protocol-2.m index 550bafd60f71a..fcf9146a110fa 100644 --- a/test/SemaObjC/class-conforming-protocol-2.m +++ b/test/SemaObjC/class-conforming-protocol-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol NSWindowDelegate @end diff --git a/test/SemaObjC/class-def-test-1.m b/test/SemaObjC/class-def-test-1.m index 0cf49ddd1b9ae..95a259bd527bc 100644 --- a/test/SemaObjC/class-def-test-1.m +++ b/test/SemaObjC/class-def-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol SUPER; diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m index 929ad0665a892..452d242888af5 100644 --- a/test/SemaObjC/class-extension-dup-methods.m +++ b/test/SemaObjC/class-extension-dup-methods.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo - (int) garf; // expected-note {{ previous declaration is here}} diff --git a/test/SemaObjC/class-getter-using-dotsyntax.m b/test/SemaObjC/class-getter-using-dotsyntax.m index 049c6ce62737d..6454bc013c1a2 100644 --- a/test/SemaObjC/class-getter-using-dotsyntax.m +++ b/test/SemaObjC/class-getter-using-dotsyntax.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_class *Class; diff --git a/test/SemaObjC/class-impl-1.m b/test/SemaObjC/class-impl-1.m index 80d6915d75570..90a4112c71224 100644 --- a/test/SemaObjC/class-impl-1.m +++ b/test/SemaObjC/class-impl-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef int INTF3; // expected-note {{previous definition is here}} diff --git a/test/SemaObjC/class-method-lookup.m b/test/SemaObjC/class-method-lookup.m index ef9df5a1461b1..f1269f2f4610e 100644 --- a/test/SemaObjC/class-method-lookup.m +++ b/test/SemaObjC/class-method-lookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyBase - (void) rootInstanceMethod; diff --git a/test/SemaObjC/class-method-self.m b/test/SemaObjC/class-method-self.m index ea4de84dae919..71509baf9012e 100644 --- a/test/SemaObjC/class-method-self.m +++ b/test/SemaObjC/class-method-self.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s typedef struct objc_class *Class; @interface XX diff --git a/test/SemaObjC/class-property-access.m b/test/SemaObjC/class-property-access.m index ce34a233f7b4f..c46d3fb397cea 100644 --- a/test/SemaObjC/class-property-access.m +++ b/test/SemaObjC/class-property-access.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Test {} + (Test*)one; diff --git a/test/SemaObjC/class-proto-1.m b/test/SemaObjC/class-proto-1.m index 5e9ee6063e74e..246b5002f67f4 100644 --- a/test/SemaObjC/class-proto-1.m +++ b/test/SemaObjC/class-proto-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface INTF1 @end diff --git a/test/SemaObjC/class-protocol.m b/test/SemaObjC/class-protocol.m index c2eded75f97a7..91cd1389f1e65 100644 --- a/test/SemaObjC/class-protocol.m +++ b/test/SemaObjC/class-protocol.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // pr5552 @interface Protocol diff --git a/test/SemaObjC/cocoa.m b/test/SemaObjC/cocoa.m index a0715453dffff..9c92731fe7b9b 100644 --- a/test/SemaObjC/cocoa.m +++ b/test/SemaObjC/cocoa.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -mcpu pentium4 %s -print-stats +// RUN: %clang_cc1 -target-cpu pentium4 %s -print-stats #ifdef __APPLE__ #include <Cocoa/Cocoa.h> #endif diff --git a/test/SemaObjC/compare-qualified-id.m b/test/SemaObjC/compare-qualified-id.m index c9776d0f41c39..497a1b6afdca8 100644 --- a/test/SemaObjC/compare-qualified-id.m +++ b/test/SemaObjC/compare-qualified-id.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/SemaObjC/compatible-protocol-qualified-types.m b/test/SemaObjC/compatible-protocol-qualified-types.m index 54d6a04085d9a..0df905c9ca150 100644 --- a/test/SemaObjC/compatible-protocol-qualified-types.m +++ b/test/SemaObjC/compatible-protocol-qualified-types.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -pedantic -fsyntax-only -verify %s +// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s typedef signed char BOOL; @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; diff --git a/test/SemaObjC/comptypes-1.m b/test/SemaObjC/comptypes-1.m index bffbd763ad985..24f704113d7c8 100644 --- a/test/SemaObjC/comptypes-1.m +++ b/test/SemaObjC/comptypes-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s #define nil (void *)0; #define Nil (void *)0; diff --git a/test/SemaObjC/comptypes-2.m b/test/SemaObjC/comptypes-2.m index a53b942930e5a..74e42c96137df 100644 --- a/test/SemaObjC/comptypes-2.m +++ b/test/SemaObjC/comptypes-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define nil (void *)0; #define Nil (void *)0; diff --git a/test/SemaObjC/comptypes-3.m b/test/SemaObjC/comptypes-3.m index 2d1b6236e3d73..94171d11d568e 100644 --- a/test/SemaObjC/comptypes-3.m +++ b/test/SemaObjC/comptypes-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define nil (void *)0; diff --git a/test/SemaObjC/comptypes-4.m b/test/SemaObjC/comptypes-4.m index 794ede25962f4..56b23b22458fe 100644 --- a/test/SemaObjC/comptypes-4.m +++ b/test/SemaObjC/comptypes-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern void foo(); diff --git a/test/SemaObjC/comptypes-5.m b/test/SemaObjC/comptypes-5.m index 4b8f489685141..aaf64462b1867 100644 --- a/test/SemaObjC/comptypes-5.m +++ b/test/SemaObjC/comptypes-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s #define nil (void *)0; diff --git a/test/SemaObjC/comptypes-6.m b/test/SemaObjC/comptypes-6.m index ad3da26185a75..2911a390ef846 100644 --- a/test/SemaObjC/comptypes-6.m +++ b/test/SemaObjC/comptypes-6.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s @interface Derived @end diff --git a/test/SemaObjC/comptypes-7.m b/test/SemaObjC/comptypes-7.m index ea1aa06292de5..fedad1bd81f9b 100644 --- a/test/SemaObjC/comptypes-7.m +++ b/test/SemaObjC/comptypes-7.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s #define nil (void *)0; #define Nil (void *)0; diff --git a/test/SemaObjC/comptypes-8.m b/test/SemaObjC/comptypes-8.m index b19bc302b223f..750b0a6a5a97d 100644 --- a/test/SemaObjC/comptypes-8.m +++ b/test/SemaObjC/comptypes-8.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol MyProtocol @end diff --git a/test/SemaObjC/comptypes-9.m b/test/SemaObjC/comptypes-9.m index 89647b5b98260..cc6932dcdbf39 100644 --- a/test/SemaObjC/comptypes-9.m +++ b/test/SemaObjC/comptypes-9.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s // FIXME: This test case tests the patch applied in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080602/006017.html // Eventually that logic should be treated as an extension. diff --git a/test/SemaObjC/comptypes-a.m b/test/SemaObjC/comptypes-a.m index 4c7967d89c0a2..d48dfe4074fc7 100644 --- a/test/SemaObjC/comptypes-a.m +++ b/test/SemaObjC/comptypes-a.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s typedef signed char BOOL; typedef int NSInteger; diff --git a/test/SemaObjC/comptypes-legal.m b/test/SemaObjC/comptypes-legal.m index 6a837b6aa8fa9..8caf18563b077 100644 --- a/test/SemaObjC/comptypes-legal.m +++ b/test/SemaObjC/comptypes-legal.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s @protocol NSObject @end diff --git a/test/SemaObjC/conditional-expr-2.m b/test/SemaObjC/conditional-expr-2.m index 9835f3ea31c2d..e97b693dfc578 100644 --- a/test/SemaObjC/conditional-expr-2.m +++ b/test/SemaObjC/conditional-expr-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface A @end diff --git a/test/SemaObjC/conditional-expr-3.m b/test/SemaObjC/conditional-expr-3.m index b7dae6bc48e7c..312f77a15ff41 100644 --- a/test/SemaObjC/conditional-expr-3.m +++ b/test/SemaObjC/conditional-expr-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P0 @end diff --git a/test/SemaObjC/conditional-expr-4.m b/test/SemaObjC/conditional-expr-4.m index 19215e3c36cc6..84652e4513df7 100644 --- a/test/SemaObjC/conditional-expr-4.m +++ b/test/SemaObjC/conditional-expr-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // <rdar://problem/6212771> #define nil ((void*) 0) diff --git a/test/SemaObjC/conditional-expr-5.m b/test/SemaObjC/conditional-expr-5.m index 74f866be0034e..63afca18fdd6f 100644 --- a/test/SemaObjC/conditional-expr-5.m +++ b/test/SemaObjC/conditional-expr-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface PBXBuildSettingsDictionary { diff --git a/test/SemaObjC/conditional-expr-6.m b/test/SemaObjC/conditional-expr-6.m index dcd2f958f23a2..098688a8a90a3 100644 --- a/test/SemaObjC/conditional-expr-6.m +++ b/test/SemaObjC/conditional-expr-6.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol MyProtocol @end diff --git a/test/SemaObjC/conditional-expr.m b/test/SemaObjC/conditional-expr.m index 8fdb2810eddf8..914e3cabbf01f 100644 --- a/test/SemaObjC/conditional-expr.m +++ b/test/SemaObjC/conditional-expr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s @protocol NSObject @end diff --git a/test/SemaObjC/conflicting-ivar-test-1.m b/test/SemaObjC/conflicting-ivar-test-1.m index acba8e431ab87..1c68a23d7e28e 100644 --- a/test/SemaObjC/conflicting-ivar-test-1.m +++ b/test/SemaObjC/conflicting-ivar-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface INTF { diff --git a/test/SemaObjC/continuation-class-err.m b/test/SemaObjC/continuation-class-err.m index c251d460cdf23..214c4e5b30b5e 100644 --- a/test/SemaObjC/continuation-class-err.m +++ b/test/SemaObjC/continuation-class-err.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface ReadOnly { diff --git a/test/SemaObjC/crash-label.m b/test/SemaObjC/crash-label.m index 477c9a12c142f..d0a5ae40c7f5c 100644 --- a/test/SemaObjC/crash-label.m +++ b/test/SemaObjC/crash-label.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s - (NSDictionary*) _executeScript:(NSString *)source { // expected-error 2 {{expected a type}} \ // expected-error {{missing context for method declaration}} diff --git a/test/SemaObjC/deref-interface.m b/test/SemaObjC/deref-interface.m index 2308677ab825b..c7096bd59a041 100644 --- a/test/SemaObjC/deref-interface.m +++ b/test/SemaObjC/deref-interface.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s @interface NSView - (id)initWithView:(id)realView; diff --git a/test/SemaObjC/duplicate-ivar-check.m b/test/SemaObjC/duplicate-ivar-check.m index b4a9df282d44d..260c215c2154a 100644 --- a/test/SemaObjC/duplicate-ivar-check.m +++ b/test/SemaObjC/duplicate-ivar-check.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface B1 { @public diff --git a/test/SemaObjC/enhanced-proto-2.m b/test/SemaObjC/enhanced-proto-2.m index a83ef23afd5ad..da7875cfa7c72 100644 --- a/test/SemaObjC/enhanced-proto-2.m +++ b/test/SemaObjC/enhanced-proto-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @protocol MyProto1 @optional diff --git a/test/SemaObjC/error-property-gc-attr.m b/test/SemaObjC/error-property-gc-attr.m index da742e7f73312..a36170475bc22 100644 --- a/test/SemaObjC/error-property-gc-attr.m +++ b/test/SemaObjC/error-property-gc-attr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s @interface INTF { diff --git a/test/SemaObjC/exprs.m b/test/SemaObjC/exprs.m index 52bd618770800..f4424f57a91db 100644 --- a/test/SemaObjC/exprs.m +++ b/test/SemaObjC/exprs.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // rdar://6597252 Class test1(Class X) { diff --git a/test/SemaObjC/foreach.m b/test/SemaObjC/foreach.m index 315202f5eba67..0f7fd9eea9922 100644 --- a/test/SemaObjC/foreach.m +++ b/test/SemaObjC/foreach.m @@ -1,4 +1,4 @@ -/* RUN: clang -cc1 -Wall -fsyntax-only -verify -std=c89 -pedantic %s +/* RUN: %clang_cc1 -Wall -fsyntax-only -verify -std=c89 -pedantic %s */ @class NSArray; diff --git a/test/SemaObjC/format-arg-attribute.m b/test/SemaObjC/format-arg-attribute.m index 7de9e9f139c20..264e7a8179dab 100644 --- a/test/SemaObjC/format-arg-attribute.m +++ b/test/SemaObjC/format-arg-attribute.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s @class NSString; diff --git a/test/SemaObjC/format-strings-objc.m b/test/SemaObjC/format-strings-objc.m index b0d5b513dc7a9..e7550a758bdfa 100644 --- a/test/SemaObjC/format-strings-objc.m +++ b/test/SemaObjC/format-strings-objc.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/test/SemaObjC/forward-class-1.m b/test/SemaObjC/forward-class-1.m index e3d2c157d6ade..ab213fb4ce723 100644 --- a/test/SemaObjC/forward-class-1.m +++ b/test/SemaObjC/forward-class-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class FOO, BAR; @class FOO, BAR; diff --git a/test/SemaObjC/forward-class-receiver.m b/test/SemaObjC/forward-class-receiver.m index 7f8aec9a39e2b..55b29c15c5c31 100644 --- a/test/SemaObjC/forward-class-receiver.m +++ b/test/SemaObjC/forward-class-receiver.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I + new; // expected-note {{method 'new' is used for the forward class}} diff --git a/test/SemaObjC/gcc-cast-ext.m b/test/SemaObjC/gcc-cast-ext.m index 6b4cbafcf8171..28abfbc8b2abd 100644 --- a/test/SemaObjC/gcc-cast-ext.m +++ b/test/SemaObjC/gcc-cast-ext.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -fms-extensions +// RUN: %clang_cc1 %s -verify -fms-extensions @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; typedef struct _NSRange { } NSRange; diff --git a/test/SemaObjC/id-isa-ref.m b/test/SemaObjC/id-isa-ref.m index c80f0809c53fc..a75f2f3367512 100644 --- a/test/SemaObjC/id-isa-ref.m +++ b/test/SemaObjC/id-isa-ref.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_object { struct objc_class *isa; diff --git a/test/SemaObjC/id.m b/test/SemaObjC/id.m index aa99cfa6471ee..98904fe1ee9cc 100644 --- a/test/SemaObjC/id.m +++ b/test/SemaObjC/id.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol Foo; diff --git a/test/SemaObjC/id_builtin.m b/test/SemaObjC/id_builtin.m index 1ec049b9ff79a..a1431d60abe39 100644 --- a/test/SemaObjC/id_builtin.m +++ b/test/SemaObjC/id_builtin.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // id is now builtin. There should be no errors. id obj; diff --git a/test/SemaObjC/idiomatic-parentheses.m b/test/SemaObjC/idiomatic-parentheses.m index ec1d3638410e7..011efbc437bf0 100644 --- a/test/SemaObjC/idiomatic-parentheses.m +++ b/test/SemaObjC/idiomatic-parentheses.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Don't warn about some common ObjC idioms unless we have -Wparentheses on. // <rdar://problem/7382435> diff --git a/test/SemaObjC/ignore-weakimport-method.m b/test/SemaObjC/ignore-weakimport-method.m index f745e443cf1e3..f80312ac06f35 100644 --- a/test/SemaObjC/ignore-weakimport-method.m +++ b/test/SemaObjC/ignore-weakimport-method.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface foo + (void) cx __attribute__((weak_import)); diff --git a/test/SemaObjC/incompatible-protocol-qualified-types.m b/test/SemaObjC/incompatible-protocol-qualified-types.m index 624377fbf9680..7eb540ad556ea 100644 --- a/test/SemaObjC/incompatible-protocol-qualified-types.m +++ b/test/SemaObjC/incompatible-protocol-qualified-types.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -pedantic -fsyntax-only -verify %s +// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s @protocol MyProto1 @end diff --git a/test/SemaObjC/inst-method-lookup-in-root.m b/test/SemaObjC/inst-method-lookup-in-root.m index 8980d3709e470..babd2a0e8da16 100644 --- a/test/SemaObjC/inst-method-lookup-in-root.m +++ b/test/SemaObjC/inst-method-lookup-in-root.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P - (id) inst_in_proto; diff --git a/test/SemaObjC/interface-1.m b/test/SemaObjC/interface-1.m index 9898936848742..91586c9bb34a7 100644 --- a/test/SemaObjC/interface-1.m +++ b/test/SemaObjC/interface-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 %s -fsyntax-only -verify +// RUN: %clang_cc1 -triple i386-apple-darwin9 %s -fsyntax-only -verify // rdar://5957506 @interface NSWhatever : diff --git a/test/SemaObjC/interface-layout-2.m b/test/SemaObjC/interface-layout-2.m index cad71428da457..02b14035a223b 100644 --- a/test/SemaObjC/interface-layout-2.m +++ b/test/SemaObjC/interface-layout-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify @interface A { int ivar; diff --git a/test/SemaObjC/interface-layout.m b/test/SemaObjC/interface-layout.m index b2c6f0d95fc25..72a7155644a0b 100644 --- a/test/SemaObjC/interface-layout.m +++ b/test/SemaObjC/interface-layout.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify -triple i386-apple-darwin9 +// RUN: %clang_cc1 %s -fsyntax-only -verify -triple i386-apple-darwin9 typedef struct objc_object {} *id; typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/SemaObjC/interface-scope-2.m b/test/SemaObjC/interface-scope-2.m index bdf28f46360fe..d8046c9c2fa78 100644 --- a/test/SemaObjC/interface-scope-2.m +++ b/test/SemaObjC/interface-scope-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify -triple i686-apple-darwin9 %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 %s // FIXME: must also compile as Objective-C++ // <rdar://problem/6487662> diff --git a/test/SemaObjC/interface-scope.m b/test/SemaObjC/interface-scope.m index bc80722febfb9..0671dae61e821 100644 --- a/test/SemaObjC/interface-scope.m +++ b/test/SemaObjC/interface-scope.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I1 { @private diff --git a/test/SemaObjC/interface-tu-variable.m b/test/SemaObjC/interface-tu-variable.m index b451d3634929e..b8779cc3e0784 100644 --- a/test/SemaObjC/interface-tu-variable.m +++ b/test/SemaObjC/interface-tu-variable.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface XX int x; // expected-error {{cannot declare variable inside @interface or @protocol}} diff --git a/test/SemaObjC/invalid-code.m b/test/SemaObjC/invalid-code.m index d0679a3f98c5b..9913a3a237c2c 100644 --- a/test/SemaObjC/invalid-code.m +++ b/test/SemaObjC/invalid-code.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // rdar://6124613 void test1() { diff --git a/test/SemaObjC/invalid-objc-decls-1.m b/test/SemaObjC/invalid-objc-decls-1.m index b58fa68337be7..2f3be285df3fa 100644 --- a/test/SemaObjC/invalid-objc-decls-1.m +++ b/test/SemaObjC/invalid-objc-decls-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Super @end Super s1; // expected-error{{interface type cannot be statically allocated}} diff --git a/test/SemaObjC/invalid-receiver.m b/test/SemaObjC/invalid-receiver.m index 366f714008568..16f0155173d06 100644 --- a/test/SemaObjC/invalid-receiver.m +++ b/test/SemaObjC/invalid-receiver.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct NotAClass { int a, b; diff --git a/test/SemaObjC/invalid-typename.m b/test/SemaObjC/invalid-typename.m index ecc03ba9813a6..50dd188738222 100644 --- a/test/SemaObjC/invalid-typename.m +++ b/test/SemaObjC/invalid-typename.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class NSString, NSArray; diff --git a/test/SemaObjC/ivar-access-package.m b/test/SemaObjC/ivar-access-package.m index 077b0cf57c68b..956ae5bdb6cc7 100644 --- a/test/SemaObjC/ivar-access-package.m +++ b/test/SemaObjC/ivar-access-package.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef unsigned char BOOL; diff --git a/test/SemaObjC/ivar-access-tests.m b/test/SemaObjC/ivar-access-tests.m index 1dc33db5b1e81..85612209003f0 100644 --- a/test/SemaObjC/ivar-access-tests.m +++ b/test/SemaObjC/ivar-access-tests.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MySuperClass { diff --git a/test/SemaObjC/ivar-lookup.m b/test/SemaObjC/ivar-lookup.m index 63bf040d636fd..644b3b638c92b 100644 --- a/test/SemaObjC/ivar-lookup.m +++ b/test/SemaObjC/ivar-lookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify @interface Test { int x; diff --git a/test/SemaObjC/ivar-ref-misuse.m b/test/SemaObjC/ivar-ref-misuse.m index 04047533af43f..ba2f11594f96c 100644 --- a/test/SemaObjC/ivar-ref-misuse.m +++ b/test/SemaObjC/ivar-ref-misuse.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Sprite { int sprite, spree; diff --git a/test/SemaObjC/ivar-sem-check-1.m b/test/SemaObjC/ivar-sem-check-1.m index 318f510672ce5..099a7a669a91f 100644 --- a/test/SemaObjC/ivar-sem-check-1.m +++ b/test/SemaObjC/ivar-sem-check-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct S; // expected-note{{forward declaration of 'struct S'}} typedef int FOO(); diff --git a/test/SemaObjC/ivar-sem-check-2.m b/test/SemaObjC/ivar-sem-check-2.m index 242504f0a1771..28c795ee7fe1c 100644 --- a/test/SemaObjC/ivar-sem-check-2.m +++ b/test/SemaObjC/ivar-sem-check-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s @interface Super { id value2; // expected-note {{previously declared 'value2' here}} diff --git a/test/SemaObjC/legacy-implementation-1.m b/test/SemaObjC/legacy-implementation-1.m index e480561693a41..e9abb87f041ed 100644 --- a/test/SemaObjC/legacy-implementation-1.m +++ b/test/SemaObjC/legacy-implementation-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @implementation INTF // expected-warning {{cannot find interface declaration for 'INTF'}} @end diff --git a/test/SemaObjC/message.m b/test/SemaObjC/message.m index 244f5d7b74e6d..57b109796257c 100644 --- a/test/SemaObjC/message.m +++ b/test/SemaObjC/message.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct objc_object { Class isa; diff --git a/test/SemaObjC/method-arg-decay.m b/test/SemaObjC/method-arg-decay.m index 09949de3293d2..82bdc6d9fb7bb 100644 --- a/test/SemaObjC/method-arg-decay.m +++ b/test/SemaObjC/method-arg-decay.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -checker-cfref -verify %s +// RUN: %clang_cc1 -checker-cfref -verify %s typedef signed char BOOL; typedef int NSInteger; typedef unsigned int NSUInteger; diff --git a/test/SemaObjC/method-arg-qualifier-warning.m b/test/SemaObjC/method-arg-qualifier-warning.m index 2d9499f2fdbe7..397f24135f585 100644 --- a/test/SemaObjC/method-arg-qualifier-warning.m +++ b/test/SemaObjC/method-arg-qualifier-warning.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; diff --git a/test/SemaObjC/method-attributes.m b/test/SemaObjC/method-attributes.m index d5f92edee40cc..9157fcfefe114 100644 --- a/test/SemaObjC/method-attributes.m +++ b/test/SemaObjC/method-attributes.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify -fsyntax-only %s +// RUN: %clang_cc1 -verify -fsyntax-only %s @class NSString; diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m index 8ef7be9d403bc..c1509bf9f6f21 100644 --- a/test/SemaObjC/method-bad-param.m +++ b/test/SemaObjC/method-bad-param.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface foo @end diff --git a/test/SemaObjC/method-conflict.m b/test/SemaObjC/method-conflict.m index 0f7fd61fe164f..08fdfc017ccc7 100644 --- a/test/SemaObjC/method-conflict.m +++ b/test/SemaObjC/method-conflict.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/SemaObjC/method-def-1.m b/test/SemaObjC/method-def-1.m index f98ba896db40f..7630ad0fbd2b7 100644 --- a/test/SemaObjC/method-def-1.m +++ b/test/SemaObjC/method-def-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface foo - (int)meth; diff --git a/test/SemaObjC/method-def-2.m b/test/SemaObjC/method-def-2.m index e595589695ea2..915f23164d611 100644 --- a/test/SemaObjC/method-def-2.m +++ b/test/SemaObjC/method-def-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -ast-print %s +// RUN: %clang_cc1 -ast-print %s extern void abort(void); #define CHECK_IF(expr) if(!(expr)) abort() diff --git a/test/SemaObjC/method-encoding-2.m b/test/SemaObjC/method-encoding-2.m index 50d2d9250dd4a..619a88625a6c8 100644 --- a/test/SemaObjC/method-encoding-2.m +++ b/test/SemaObjC/method-encoding-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s +// RUN: %clang_cc1 %s // TODO: We don't support rewrite of method definitions @interface Intf diff --git a/test/SemaObjC/method-lookup-2.m b/test/SemaObjC/method-lookup-2.m index 5493653f3ecaf..53cae83712526 100644 --- a/test/SemaObjC/method-lookup-2.m +++ b/test/SemaObjC/method-lookup-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; @protocol NSObject diff --git a/test/SemaObjC/method-lookup-3.m b/test/SemaObjC/method-lookup-3.m index 9e7c4c93abeb3..18a9982840bd0 100644 --- a/test/SemaObjC/method-lookup-3.m +++ b/test/SemaObjC/method-lookup-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct { int y; } Abstract; diff --git a/test/SemaObjC/method-lookup-4.m b/test/SemaObjC/method-lookup-4.m index 20b4e60b018f0..700565e783293 100644 --- a/test/SemaObjC/method-lookup-4.m +++ b/test/SemaObjC/method-lookup-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject {} diff --git a/test/SemaObjC/method-lookup.m b/test/SemaObjC/method-lookup.m index b9607eb690c33..e3789584bf59e 100644 --- a/test/SemaObjC/method-lookup.m +++ b/test/SemaObjC/method-lookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef int NSInteger; diff --git a/test/SemaObjC/method-no-context.m b/test/SemaObjC/method-no-context.m index 63caa7e399ccb..c88205dfd28fd 100644 --- a/test/SemaObjC/method-no-context.m +++ b/test/SemaObjC/method-no-context.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s - im0 { int a; return 0; // expected-error{{missing context for method declaration}} // expected-error{{expected '}'}} diff --git a/test/SemaObjC/method-not-defined.m b/test/SemaObjC/method-not-defined.m index 37171af2e8893..78bf65027284b 100644 --- a/test/SemaObjC/method-not-defined.m +++ b/test/SemaObjC/method-not-defined.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo @end diff --git a/test/SemaObjC/method-sentinel-attr.m b/test/SemaObjC/method-sentinel-attr.m index 080d6649cc04e..08358cc9154ad 100644 --- a/test/SemaObjC/method-sentinel-attr.m +++ b/test/SemaObjC/method-sentinel-attr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define NULL (void*)0 diff --git a/test/SemaObjC/method-typecheck-1.m b/test/SemaObjC/method-typecheck-1.m index bd62ded3c413c..6c382d8cd956c 100644 --- a/test/SemaObjC/method-typecheck-1.m +++ b/test/SemaObjC/method-typecheck-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface A - (void) setMoo: (int) x; // expected-note {{previous definition is here}} diff --git a/test/SemaObjC/method-typecheck-2.m b/test/SemaObjC/method-typecheck-2.m index 642893da804d2..84efa0b220911 100644 --- a/test/SemaObjC/method-typecheck-2.m +++ b/test/SemaObjC/method-typecheck-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P - (void) doSomethingInProtocol: (float) x; // expected-note {{previous definition is here}} diff --git a/test/SemaObjC/method-undef-category-warn-1.m b/test/SemaObjC/method-undef-category-warn-1.m index 8f5d1ace4c881..75ca5b5ff9fb8 100644 --- a/test/SemaObjC/method-undef-category-warn-1.m +++ b/test/SemaObjC/method-undef-category-warn-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyClass1 @end diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m index c1efe5a44fdc0..fc27870f42dd7 100644 --- a/test/SemaObjC/method-undef-extension-warn-1.m +++ b/test/SemaObjC/method-undef-extension-warn-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MyClass @end diff --git a/test/SemaObjC/method-undefined-warn-1.m b/test/SemaObjC/method-undefined-warn-1.m index bbf993f136651..cfe1d56ee5c86 100644 --- a/test/SemaObjC/method-undefined-warn-1.m +++ b/test/SemaObjC/method-undefined-warn-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface INTF - (void) meth; diff --git a/test/SemaObjC/missing-method-context.m b/test/SemaObjC/missing-method-context.m index 506cccf512a91..1378b3694012c 100644 --- a/test/SemaObjC/missing-method-context.m +++ b/test/SemaObjC/missing-method-context.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only - (void)compilerTestAgainst; // expected-error {{missing context for method declaration}} void xx(); // expected-error {{expected method body}} diff --git a/test/SemaObjC/newproperty-class-method-1.m b/test/SemaObjC/newproperty-class-method-1.m index 972f0909693da..d4ea5e54a5537 100644 --- a/test/SemaObjC/newproperty-class-method-1.m +++ b/test/SemaObjC/newproperty-class-method-1.m @@ -1,4 +1,6 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only + +void abort(void); @interface Subclass + (int)magicNumber; diff --git a/test/SemaObjC/no-gc-weak-test.m b/test/SemaObjC/no-gc-weak-test.m index 498278ec91d73..ca8318d00fc21 100644 --- a/test/SemaObjC/no-gc-weak-test.m +++ b/test/SemaObjC/no-gc-weak-test.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s @interface Subtask { diff --git a/test/SemaObjC/no-warn-qual-mismatch.m b/test/SemaObjC/no-warn-qual-mismatch.m index 73b56711e388f..1b5f184ae063c 100644 --- a/test/SemaObjC/no-warn-qual-mismatch.m +++ b/test/SemaObjC/no-warn-qual-mismatch.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // radar 7211563 @interface X diff --git a/test/SemaObjC/no-warn-synth-protocol-meth.m b/test/SemaObjC/no-warn-synth-protocol-meth.m index 8c8f33b560580..fed6b27652ea6 100644 --- a/test/SemaObjC/no-warn-synth-protocol-meth.m +++ b/test/SemaObjC/no-warn-synth-protocol-meth.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol CYCdef - (int)name; diff --git a/test/SemaObjC/no-warn-unimpl-method.m b/test/SemaObjC/no-warn-unimpl-method.m index 4345914092af0..dd6e3ad4aa32d 100644 --- a/test/SemaObjC/no-warn-unimpl-method.m +++ b/test/SemaObjC/no-warn-unimpl-method.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s // This program tests that if class implements the forwardInvocation method, then // every method possible is implemented in the class and should not issue // warning of the "Method definition not found" kind. */ diff --git a/test/SemaObjC/nonnull.m b/test/SemaObjC/nonnull.m index e657707790d55..c96a91a7f815f 100644 --- a/test/SemaObjC/nonnull.m +++ b/test/SemaObjC/nonnull.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fblocks -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s @class NSObject; diff --git a/test/SemaObjC/nsobject-attribute-1.m b/test/SemaObjC/nsobject-attribute-1.m index 6eb5d63db2d17..991246c72fd46 100644 --- a/test/SemaObjC/nsobject-attribute-1.m +++ b/test/SemaObjC/nsobject-attribute-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fblocks -fsyntax-only -verify %s +// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s @interface NSObject - (id)self; diff --git a/test/SemaObjC/nsobject-attribute.m b/test/SemaObjC/nsobject-attribute.m index 896c44a3dc745..fdf9e358ee8e0 100644 --- a/test/SemaObjC/nsobject-attribute.m +++ b/test/SemaObjC/nsobject-attribute.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef struct CGColor * __attribute__ ((NSObject)) CGColorRef; static int count; diff --git a/test/SemaObjC/objc-string-constant.m b/test/SemaObjC/objc-string-constant.m index 46d1242cc5e5d..cc6d60c82ae6c 100644 --- a/test/SemaObjC/objc-string-constant.m +++ b/test/SemaObjC/objc-string-constant.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -Wsemicolon-before-method-body %s -verify -fsyntax-only +// RUN: %clang_cc1 -Wsemicolon-before-method-body %s -verify -fsyntax-only #define nil 0 /* id of Nil instance */ diff --git a/test/SemaObjC/objc2-merge-gc-attribue-decl.m b/test/SemaObjC/objc2-merge-gc-attribue-decl.m index c15e10781a3d4..673a7417e384c 100644 --- a/test/SemaObjC/objc2-merge-gc-attribue-decl.m +++ b/test/SemaObjC/objc2-merge-gc-attribue-decl.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s @interface INTF @end extern INTF* p2; diff --git a/test/SemaObjC/objc2-warn-weak-decl.m b/test/SemaObjC/objc2-warn-weak-decl.m index bd59c6613304a..76b542de94a63 100644 --- a/test/SemaObjC/objc2-warn-weak-decl.m +++ b/test/SemaObjC/objc2-warn-weak-decl.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s struct S { __weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}} }; diff --git a/test/SemaObjC/property-10.m b/test/SemaObjC/property-10.m index cf615bcde7cd8..bd07df685db1b 100644 --- a/test/SemaObjC/property-10.m +++ b/test/SemaObjC/property-10.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks // Check property attribute consistency. diff --git a/test/SemaObjC/property-11.m b/test/SemaObjC/property-11.m index c9b35402ae77a..297611574eae7 100644 --- a/test/SemaObjC/property-11.m +++ b/test/SemaObjC/property-11.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSSound @end diff --git a/test/SemaObjC/property-12.m b/test/SemaObjC/property-12.m index f022dcda43891..cd0fccf0e3834 100644 --- a/test/SemaObjC/property-12.m +++ b/test/SemaObjC/property-12.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s @protocol P0 @property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}} diff --git a/test/SemaObjC/property-13.m b/test/SemaObjC/property-13.m index 23e3714accf96..f34ec568b94c1 100644 --- a/test/SemaObjC/property-13.m +++ b/test/SemaObjC/property-13.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject + alloc; @@ -44,6 +44,7 @@ - (void) setOptional_getter_attr:(int)value { ivar = value; } @end +void abort(void); int main () { Test *x = [[Test alloc] init]; diff --git a/test/SemaObjC/property-2.m b/test/SemaObjC/property-2.m index 01fcdb9fa8813..069b0cbc7132a 100644 --- a/test/SemaObjC/property-2.m +++ b/test/SemaObjC/property-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Tester @property char PropertyAtomic_char; diff --git a/test/SemaObjC/property-3.m b/test/SemaObjC/property-3.m index c79efc823a138..439dc28be9f20 100644 --- a/test/SemaObjC/property-3.m +++ b/test/SemaObjC/property-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @interface I { diff --git a/test/SemaObjC/property-4.m b/test/SemaObjC/property-4.m index b70514f1ae630..2168048800ac3 100644 --- a/test/SemaObjC/property-4.m +++ b/test/SemaObjC/property-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @interface Object @end diff --git a/test/SemaObjC/property-5.m b/test/SemaObjC/property-5.m index 40b9e67f6311c..cd7cc2487acc5 100644 --- a/test/SemaObjC/property-5.m +++ b/test/SemaObjC/property-5.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @protocol P1 @end @protocol P2 @end diff --git a/test/SemaObjC/property-6.m b/test/SemaObjC/property-6.m index 0253fe889b1a2..72beb67b43e45 100644 --- a/test/SemaObjC/property-6.m +++ b/test/SemaObjC/property-6.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s # 1 "<command line>" # 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3 typedef signed char BOOL; diff --git a/test/SemaObjC/property-7.m b/test/SemaObjC/property-7.m index 63eb3cf2cb80c..e6cba50f7a61b 100644 --- a/test/SemaObjC/property-7.m +++ b/test/SemaObjC/property-7.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef struct _NSZone NSZone; diff --git a/test/SemaObjC/property-8.m b/test/SemaObjC/property-8.m index 82d8c6b00208d..8647aba8c3e7c 100644 --- a/test/SemaObjC/property-8.m +++ b/test/SemaObjC/property-8.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; typedef struct _NSZone NSZone; diff --git a/test/SemaObjC/property-9-impl-method.m b/test/SemaObjC/property-9-impl-method.m index c7b149717ec5f..84eb3635e2ac4 100644 --- a/test/SemaObjC/property-9-impl-method.m +++ b/test/SemaObjC/property-9-impl-method.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // rdar://5967199 typedef signed char BOOL; diff --git a/test/SemaObjC/property-9.m b/test/SemaObjC/property-9.m index a3faa4822f315..138f09953d5a8 100644 --- a/test/SemaObjC/property-9.m +++ b/test/SemaObjC/property-9.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; @end diff --git a/test/SemaObjC/property-category-1.m b/test/SemaObjC/property-category-1.m index d6b580080d483..26e73136d01f9 100644 --- a/test/SemaObjC/property-category-1.m +++ b/test/SemaObjC/property-category-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Object + (id)new; diff --git a/test/SemaObjC/property-category-2.m b/test/SemaObjC/property-category-2.m index 6a3883a35b770..f258b2c250127 100644 --- a/test/SemaObjC/property-category-2.m +++ b/test/SemaObjC/property-category-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test that a property can be synthesize in a category // implementation with no error. diff --git a/test/SemaObjC/property-category-3.m b/test/SemaObjC/property-category-3.m index de0f302bc5d75..237de0f1f5fb5 100644 --- a/test/SemaObjC/property-category-3.m +++ b/test/SemaObjC/property-category-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P @property(readonly) int X; diff --git a/test/SemaObjC/property-category-4.m b/test/SemaObjC/property-category-4.m index c807f394544ba..aa49a3f0b5eda 100644 --- a/test/SemaObjC/property-category-4.m +++ b/test/SemaObjC/property-category-4.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface IDELogNavigator { diff --git a/test/SemaObjC/property-error-readonly-assign.m b/test/SemaObjC/property-error-readonly-assign.m index 482ae2cb81893..fc8c48c4f6cf2 100644 --- a/test/SemaObjC/property-error-readonly-assign.m +++ b/test/SemaObjC/property-error-readonly-assign.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface A -(int) x; diff --git a/test/SemaObjC/property-expression-error.m b/test/SemaObjC/property-expression-error.m index f03244dc79fb3..b59c1b154b9d7 100644 --- a/test/SemaObjC/property-expression-error.m +++ b/test/SemaObjC/property-expression-error.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface AddressMyProperties { diff --git a/test/SemaObjC/property-impl-misuse.m b/test/SemaObjC/property-impl-misuse.m index 5bbc3f19c090e..58c91c59d05e9 100644 --- a/test/SemaObjC/property-impl-misuse.m +++ b/test/SemaObjC/property-impl-misuse.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I { int Y; diff --git a/test/SemaObjC/property-inherited.m b/test/SemaObjC/property-inherited.m index 67897526224d0..5c5631e6fb89c 100644 --- a/test/SemaObjC/property-inherited.m +++ b/test/SemaObjC/property-inherited.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify // <rdar://problem/6497242> Inherited overridden protocol declared objects don't work diff --git a/test/SemaObjC/property-ivar-mismatch.m b/test/SemaObjC/property-ivar-mismatch.m index d4f6e1a4f4e11..ea3acfc3fcf94 100644 --- a/test/SemaObjC/property-ivar-mismatch.m +++ b/test/SemaObjC/property-ivar-mismatch.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test that arithmatic types on property and its ivar have exact match. @interface Test4 diff --git a/test/SemaObjC/property-method-lookup-impl.m b/test/SemaObjC/property-method-lookup-impl.m index f85babafbdbde..0a018b0dffd84 100644 --- a/test/SemaObjC/property-method-lookup-impl.m +++ b/test/SemaObjC/property-method-lookup-impl.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface SSyncCEList { diff --git a/test/SemaObjC/property-missing.m b/test/SemaObjC/property-missing.m index a74cf6236dbe8..6ce0beac51c12 100644 --- a/test/SemaObjC/property-missing.m +++ b/test/SemaObjC/property-missing.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR3234 diff --git a/test/SemaObjC/property-nonfragile-abi.m b/test/SemaObjC/property-nonfragile-abi.m index ede9515123c1a..ae82cb7d92952 100644 --- a/test/SemaObjC/property-nonfragile-abi.m +++ b/test/SemaObjC/property-nonfragile-abi.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s typedef signed char BOOL; diff --git a/test/SemaObjC/property-noprotocol-warning.m b/test/SemaObjC/property-noprotocol-warning.m index 20234a0b2ab35..71bb86a301eff 100644 --- a/test/SemaObjC/property-noprotocol-warning.m +++ b/test/SemaObjC/property-noprotocol-warning.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Object diff --git a/test/SemaObjC/property-not-lvalue.m b/test/SemaObjC/property-not-lvalue.m new file mode 100644 index 0000000000000..f1bda094c2db2 --- /dev/null +++ b/test/SemaObjC/property-not-lvalue.m @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef struct NSSize { + int width; + struct { + int dim; + } inner; +} NSSize; + +@interface Foo { + NSSize _size; +} +@property NSSize size; +@end + +void foo() { + Foo *f; + f.size.width = 2.2; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} + f.size.inner.dim = 200; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} +} diff --git a/test/SemaObjC/property-redundant-decl-accessor.m b/test/SemaObjC/property-redundant-decl-accessor.m index 84fc8fa3be4fb..2a24e7e82446d 100644 --- a/test/SemaObjC/property-redundant-decl-accessor.m +++ b/test/SemaObjC/property-redundant-decl-accessor.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -Werror -verify %s +// RUN: %clang_cc1 -fsyntax-only -Werror -verify %s @interface MyClass { const char *_myName; diff --git a/test/SemaObjC/property-typecheck-1.m b/test/SemaObjC/property-typecheck-1.m index c9562787983a8..fc53b590b8b27 100644 --- a/test/SemaObjC/property-typecheck-1.m +++ b/test/SemaObjC/property-typecheck-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface A -(float) x; // expected-note {{declared at}} diff --git a/test/SemaObjC/property-user-setter.m b/test/SemaObjC/property-user-setter.m index 94458dca6ee0d..c06f2b6f44fbd 100644 --- a/test/SemaObjC/property-user-setter.m +++ b/test/SemaObjC/property-user-setter.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface I0 @property(readonly) int x; @@ -80,6 +80,7 @@ static int g_val; } @end +void abort(void); int main (void) { Subclass *x = [[Subclass alloc] init]; diff --git a/test/SemaObjC/property-weak.m b/test/SemaObjC/property-weak.m index 2e4e1f0044fd0..a4397a684fc0d 100644 --- a/test/SemaObjC/property-weak.m +++ b/test/SemaObjC/property-weak.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s @interface foo @property(nonatomic) int foo __attribute__((weak_import)); diff --git a/test/SemaObjC/property.m b/test/SemaObjC/property.m index b2f594fe32017..bc2056c979118 100644 --- a/test/SemaObjC/property.m +++ b/test/SemaObjC/property.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s @interface I { @@ -53,3 +53,12 @@ typedef id BYObjectIdentifier; @property(copy) BYObjectIdentifier identifier; @end +@interface Foo2 +{ + int ivar; +} +@property int treeController; // expected-note {{property declared here}} +@property int ivar; // OK +@property int treeController; // expected-error {{property has a previous declaration}} +@end + diff --git a/test/SemaObjC/props-on-prots.m b/test/SemaObjC/props-on-prots.m index dd92bfac49c1a..c01e8338628e2 100644 --- a/test/SemaObjC/props-on-prots.m +++ b/test/SemaObjC/props-on-prots.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; diff --git a/test/SemaObjC/protocol-archane.m b/test/SemaObjC/protocol-archane.m index c24e9fb5ed168..108a72988e21f 100644 --- a/test/SemaObjC/protocol-archane.m +++ b/test/SemaObjC/protocol-archane.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // rdar://5986251 @protocol SomeProtocol diff --git a/test/SemaObjC/protocol-attribute.m b/test/SemaObjC/protocol-attribute.m index 1bce37e49d84d..e04a39bda6ca1 100644 --- a/test/SemaObjC/protocol-attribute.m +++ b/test/SemaObjC/protocol-attribute.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s __attribute ((unavailable)) @protocol FwProto; // expected-note{{marked unavailable}} diff --git a/test/SemaObjC/protocol-expr-1.m b/test/SemaObjC/protocol-expr-1.m index 22c0ed0ba4c3f..fe01d1d47a8d9 100644 --- a/test/SemaObjC/protocol-expr-1.m +++ b/test/SemaObjC/protocol-expr-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol fproto; diff --git a/test/SemaObjC/protocol-expr-neg-1.m b/test/SemaObjC/protocol-expr-neg-1.m index 2928a46bc07ae..58ac8c0ca3223 100644 --- a/test/SemaObjC/protocol-expr-neg-1.m +++ b/test/SemaObjC/protocol-expr-neg-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class Protocol; diff --git a/test/SemaObjC/protocol-id-test-1.m b/test/SemaObjC/protocol-id-test-1.m index 79220ea1a4590..6b2b682a135d4 100644 --- a/test/SemaObjC/protocol-id-test-1.m +++ b/test/SemaObjC/protocol-id-test-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @interface FF - (void) Meth; diff --git a/test/SemaObjC/protocol-id-test-2.m b/test/SemaObjC/protocol-id-test-2.m index b8f94a6d75798..a9365e9cb9327 100644 --- a/test/SemaObjC/protocol-id-test-2.m +++ b/test/SemaObjC/protocol-id-test-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @protocol P @end diff --git a/test/SemaObjC/protocol-id-test-3.m b/test/SemaObjC/protocol-id-test-3.m index 54c55cd4845eb..3538b0e05e373 100644 --- a/test/SemaObjC/protocol-id-test-3.m +++ b/test/SemaObjC/protocol-id-test-3.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -pedantic -fsyntax-only -verify %s +// RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s @protocol MyProto1 @end diff --git a/test/SemaObjC/protocol-implementation-inherited.m b/test/SemaObjC/protocol-implementation-inherited.m index 4fc60fe5c98f4..c333bb5042d29 100644 --- a/test/SemaObjC/protocol-implementation-inherited.m +++ b/test/SemaObjC/protocol-implementation-inherited.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P0 -bar; diff --git a/test/SemaObjC/protocol-lookup-2.m b/test/SemaObjC/protocol-lookup-2.m index 744fbee9828d0..bf0752312e448 100644 --- a/test/SemaObjC/protocol-lookup-2.m +++ b/test/SemaObjC/protocol-lookup-2.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject @end @protocol ProtocolA diff --git a/test/SemaObjC/protocol-lookup.m b/test/SemaObjC/protocol-lookup.m index b2b354b7782d9..ed3fbe0f72bfc 100644 --- a/test/SemaObjC/protocol-lookup.m +++ b/test/SemaObjC/protocol-lookup.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol NSObject - retain; - release; diff --git a/test/SemaObjC/protocol-qualified-class-unsupported.m b/test/SemaObjC/protocol-qualified-class-unsupported.m index e4e12d6a39d40..4bf6b289e7b7b 100644 --- a/test/SemaObjC/protocol-qualified-class-unsupported.m +++ b/test/SemaObjC/protocol-qualified-class-unsupported.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stddef.h> diff --git a/test/SemaObjC/protocol-typecheck.m b/test/SemaObjC/protocol-typecheck.m index e91cdfefb7284..d9cde87d4c2c3 100644 --- a/test/SemaObjC/protocol-typecheck.m +++ b/test/SemaObjC/protocol-typecheck.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject @end @protocol XCElementP @end diff --git a/test/SemaObjC/protocols.m b/test/SemaObjC/protocols.m index 579feee7b9c22..8447fe2aad2f9 100644 --- a/test/SemaObjC/protocols.m +++ b/test/SemaObjC/protocols.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface INTF1 @required // expected-error {{directive may only be specified in protocols only}} diff --git a/test/SemaObjC/rdr-6211479-array-property.m b/test/SemaObjC/rdr-6211479-array-property.m index a5d177335ceeb..39c056c5ba617 100644 --- a/test/SemaObjC/rdr-6211479-array-property.m +++ b/test/SemaObjC/rdr-6211479-array-property.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // <rdar://problem/6211479> typedef int T[2]; diff --git a/test/SemaObjC/restrict-id-type.m b/test/SemaObjC/restrict-id-type.m index 9bd5612aba335..b24fcb0185e4b 100644 --- a/test/SemaObjC/restrict-id-type.m +++ b/test/SemaObjC/restrict-id-type.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -std=gnu99 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=gnu99 -fsyntax-only -verify %s void f0(restrict id a0) {} diff --git a/test/SemaObjC/return.m b/test/SemaObjC/return.m index 743f0f9fca30d..c578bf3b6569f 100644 --- a/test/SemaObjC/return.m +++ b/test/SemaObjC/return.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only -verify -Wmissing-noreturn +// RUN: %clang_cc1 %s -fsyntax-only -verify -Wmissing-noreturn int test1() { id a; diff --git a/test/SemaObjC/scope-check.m b/test/SemaObjC/scope-check.m index 618bcd7bf1e30..bba321e65766a 100644 --- a/test/SemaObjC/scope-check.m +++ b/test/SemaObjC/scope-check.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class A, B, C; diff --git a/test/SemaObjC/selector-1.m b/test/SemaObjC/selector-1.m index 7df2bdaeb7015..9a7375b8d288d 100644 --- a/test/SemaObjC/selector-1.m +++ b/test/SemaObjC/selector-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -verify %s +// RUN: %clang_cc1 -verify %s @interface Lancelot @end @implementation Lancelot diff --git a/test/SemaObjC/selector-error.m b/test/SemaObjC/selector-error.m index 0df5df0bcc107..dfd6bd053d192 100644 --- a/test/SemaObjC/selector-error.m +++ b/test/SemaObjC/selector-error.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo - (char*) foo; diff --git a/test/SemaObjC/selector-overload.m b/test/SemaObjC/selector-overload.m index 65c907eacded0..53ba6f7e7e32e 100644 --- a/test/SemaObjC/selector-overload.m +++ b/test/SemaObjC/selector-overload.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -fsyntax-only +// RUN: %clang_cc1 %s -fsyntax-only @interface NSObject + alloc; diff --git a/test/SemaObjC/sizeof-interface.m b/test/SemaObjC/sizeof-interface.m index cb4195bbd99b0..9d85f1f53fccd 100644 --- a/test/SemaObjC/sizeof-interface.m +++ b/test/SemaObjC/sizeof-interface.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s +// RUN: %clang_cc1 -fobjc-nonfragile-abi -verify -fsyntax-only %s @class I0; diff --git a/test/SemaObjC/static-ivar-ref-1.m b/test/SemaObjC/static-ivar-ref-1.m index 5c977580e702f..cd5e05558c35b 100644 --- a/test/SemaObjC/static-ivar-ref-1.m +++ b/test/SemaObjC/static-ivar-ref-1.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 -triple i386-unknown-unknown -ast-print %s -// RUN: clang -cc1 -triple x86_64-apple-darwin10 -ast-print %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -ast-print %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -ast-print %s @interface current { diff --git a/test/SemaObjC/stmts.m b/test/SemaObjC/stmts.m index 1402b288b3e8f..20a9f55b2095a 100644 --- a/test/SemaObjC/stmts.m +++ b/test/SemaObjC/stmts.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only struct some_struct; diff --git a/test/SemaObjC/string.m b/test/SemaObjC/string.m index 077ba7d93e014..04f20ab1bcf15 100644 --- a/test/SemaObjC/string.m +++ b/test/SemaObjC/string.m @@ -1,5 +1,5 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only -// RUN: clang -cc1 %s -verify -fsyntax-only -DDECLAREIT +// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only -DDECLAREIT // a declaration of NSConstantString is not required. #ifdef DECLAREIT diff --git a/test/SemaObjC/super-cat-prot.m b/test/SemaObjC/super-cat-prot.m index a7288bbc3babb..3e289860c06ef 100644 --- a/test/SemaObjC/super-cat-prot.m +++ b/test/SemaObjC/super-cat-prot.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; diff --git a/test/SemaObjC/super-property-message-expr.m b/test/SemaObjC/super-property-message-expr.m index 15d4db00414d9..c25164e159739 100644 --- a/test/SemaObjC/super-property-message-expr.m +++ b/test/SemaObjC/super-property-message-expr.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface SStoreNodeInfo diff --git a/test/SemaObjC/super-property-notation.m b/test/SemaObjC/super-property-notation.m index d67bdcb8e6f0c..7d3f7c70bb521 100644 --- a/test/SemaObjC/super-property-notation.m +++ b/test/SemaObjC/super-property-notation.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface B +(int) classGetter; diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m index 2896968e464da..3b8697288a3ac 100644 --- a/test/SemaObjC/super.m +++ b/test/SemaObjC/super.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo - iMethod; diff --git a/test/SemaObjC/synchronized.m b/test/SemaObjC/synchronized.m index d1aa101c7dc26..dac620a818292 100644 --- a/test/SemaObjC/synchronized.m +++ b/test/SemaObjC/synchronized.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface PBXTrackableTaskManager @end diff --git a/test/SemaObjC/synthesize-setter-contclass.m b/test/SemaObjC/synthesize-setter-contclass.m index 184c4ead07856..36967d458e36a 100644 --- a/test/SemaObjC/synthesize-setter-contclass.m +++ b/test/SemaObjC/synthesize-setter-contclass.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface TestClass { diff --git a/test/SemaObjC/synthesized-ivar.m b/test/SemaObjC/synthesized-ivar.m index c41884eef712a..465caf24a7364 100644 --- a/test/SemaObjC/synthesized-ivar.m +++ b/test/SemaObjC/synthesized-ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %s @interface I { } diff --git a/test/SemaObjC/try-catch.m b/test/SemaObjC/try-catch.m index fb6182cc76d73..01fc4f4f2c565 100644 --- a/test/SemaObjC/try-catch.m +++ b/test/SemaObjC/try-catch.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef struct _NSZone NSZone; diff --git a/test/SemaObjC/typedef-class.m b/test/SemaObjC/typedef-class.m index 0c48715f19bd0..0f7e6822c4f95 100644 --- a/test/SemaObjC/typedef-class.m +++ b/test/SemaObjC/typedef-class.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; typedef struct _NSZone NSZone; diff --git a/test/SemaObjC/ucn-objc-string.m b/test/SemaObjC/ucn-objc-string.m index 7603199d0211a..6070278bb134e 100644 --- a/test/SemaObjC/ucn-objc-string.m +++ b/test/SemaObjC/ucn-objc-string.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only @class NSString; extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); diff --git a/test/SemaObjC/undeclared-selector.m b/test/SemaObjC/undeclared-selector.m index 6791aaf0f3618..758e1d7f56025 100644 --- a/test/SemaObjC/undeclared-selector.m +++ b/test/SemaObjC/undeclared-selector.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -Wundeclared-selector -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wundeclared-selector -verify %s typedef struct objc_selector *SEL; diff --git a/test/SemaObjC/undef-class-messagin-error.m b/test/SemaObjC/undef-class-messagin-error.m index d8e50a0acd22b..0a400dd39f5fe 100644 --- a/test/SemaObjC/undef-class-messagin-error.m +++ b/test/SemaObjC/undef-class-messagin-error.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface _Child + (int) flashCache; diff --git a/test/SemaObjC/undef-protocol-methods-1.m b/test/SemaObjC/undef-protocol-methods-1.m index 066d53218bbfd..9a35ef7ba8063 100644 --- a/test/SemaObjC/undef-protocol-methods-1.m +++ b/test/SemaObjC/undef-protocol-methods-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P1 - (void) P1proto; diff --git a/test/SemaObjC/undef-superclass-1.m b/test/SemaObjC/undef-superclass-1.m index 2deb0b1ae60f8..7611cf3b1554a 100644 --- a/test/SemaObjC/undef-superclass-1.m +++ b/test/SemaObjC/undef-superclass-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class SUPER, Y; diff --git a/test/SemaObjC/undefined-protocol-type-1.m b/test/SemaObjC/undefined-protocol-type-1.m index c2e2abc5bb604..3be4425cdcec0 100644 --- a/test/SemaObjC/undefined-protocol-type-1.m +++ b/test/SemaObjC/undefined-protocol-type-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol p1, p4; @protocol p2 @end diff --git a/test/SemaObjC/unused.m b/test/SemaObjC/unused.m index f492ac5d37895..7fdb80152f311 100644 --- a/test/SemaObjC/unused.m +++ b/test/SemaObjC/unused.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 %s -verify -Wunused -fsyntax-only +// RUN: %clang_cc1 %s -verify -Wunused -fsyntax-only int printf(const char *, ...); diff --git a/test/SemaObjC/va-method-1.m b/test/SemaObjC/va-method-1.m index 424ecab006d68..fe7ccd7632cd1 100644 --- a/test/SemaObjC/va-method-1.m +++ b/test/SemaObjC/va-method-1.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #include <stdarg.h> diff --git a/test/SemaObjC/warn-assign-property-nscopying.m b/test/SemaObjC/warn-assign-property-nscopying.m index ecf2c6a00a624..953814cdce1b0 100644 --- a/test/SemaObjC/warn-assign-property-nscopying.m +++ b/test/SemaObjC/warn-assign-property-nscopying.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fobjc-gc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fobjc-gc -fsyntax-only -verify %s @protocol NSCopying @end diff --git a/test/SemaObjC/warn-selector-selection.m b/test/SemaObjC/warn-selector-selection.m index 19c9154a36b28..96ed77c14bef3 100644 --- a/test/SemaObjC/warn-selector-selection.m +++ b/test/SemaObjC/warn-selector-selection.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Object - (void)foo; diff --git a/test/SemaObjC/warn-superclass-method-mismatch.m b/test/SemaObjC/warn-superclass-method-mismatch.m index acca86797e9da..a4005ad2b2931 100644 --- a/test/SemaObjC/warn-superclass-method-mismatch.m +++ b/test/SemaObjC/warn-superclass-method-mismatch.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -Wsuper-class-method-mismatch -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wsuper-class-method-mismatch -verify %s @interface Root -(void) method_r: (char)ch : (float*)f1 : (int*) x; // expected-note {{previous declaration is here}} diff --git a/test/SemaObjC/warn-weak-field.m b/test/SemaObjC/warn-weak-field.m index b688a1fea0090..f20691c186963 100644 --- a/test/SemaObjC/warn-weak-field.m +++ b/test/SemaObjC/warn-weak-field.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s +// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s struct S { __weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}} diff --git a/test/SemaObjC/weak-attr-ivar.m b/test/SemaObjC/weak-attr-ivar.m index 84bdb967262dc..d5bbb01902db4 100644 --- a/test/SemaObjC/weak-attr-ivar.m +++ b/test/SemaObjC/weak-attr-ivar.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/test/SemaObjC/writable-property-in-superclass.m b/test/SemaObjC/writable-property-in-superclass.m index cc9295a9bc014..bbd1f16cffc0b 100644 --- a/test/SemaObjC/writable-property-in-superclass.m +++ b/test/SemaObjC/writable-property-in-superclass.m @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface MessageStore @property (assign, readonly) int P; diff --git a/test/SemaObjCXX/blocks.mm b/test/SemaObjCXX/blocks.mm index 92a909621421c..72de17133617b 100644 --- a/test/SemaObjCXX/blocks.mm +++ b/test/SemaObjCXX/blocks.mm @@ -1,14 +1,14 @@ -// RUN: clang -cc1 -fsyntax-only -verify -fblocks %s +// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s @protocol NSObject; void bar(id(^)(void)); void foo(id <NSObject>(^objectCreationBlock)(void)) { - return bar(objectCreationBlock); // expected-warning{{incompatible pointer types passing 'id (^)()', expected 'id<NSObject> (^)()'}} + return bar(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id (^)()', expected 'id<NSObject> (^)()'}} } void bar2(id(*)(void)); void foo2(id <NSObject>(*objectCreationBlock)(void)) { - return bar2(objectCreationBlock); // expected-warning{{incompatible pointer types passing 'id (*)()', expected 'id<NSObject> (*)()'}} + return bar2(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id (*)()', expected 'id<NSObject> (*)()'}} } void bar3(id(*)()); // expected-note{{candidate function}} diff --git a/test/SemaObjCXX/category-lookup.mm b/test/SemaObjCXX/category-lookup.mm index 0458752d9338e..0e870259b7350 100644 --- a/test/SemaObjCXX/category-lookup.mm +++ b/test/SemaObjCXX/category-lookup.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface NSObject @end diff --git a/test/SemaObjCXX/composite-objc-pointertype.mm b/test/SemaObjCXX/composite-objc-pointertype.mm index 786315e0e7a3b..0d9a93897656c 100644 --- a/test/SemaObjCXX/composite-objc-pointertype.mm +++ b/test/SemaObjCXX/composite-objc-pointertype.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo @end diff --git a/test/SemaObjCXX/conditional-expr.mm b/test/SemaObjCXX/conditional-expr.mm index e1f92cded3ac8..a6b7c08e8fcb3 100644 --- a/test/SemaObjCXX/conditional-expr.mm +++ b/test/SemaObjCXX/conditional-expr.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P0 @end @@ -27,11 +27,11 @@ void f1(id x, A *a) { } void f2(id<P1> x) { - id<P0> l = x; // expected-error {{incompatible type initializing 'id<P1>', expected 'id<P0>'}} + id<P0> l = x; // expected-error {{cannot initialize a variable of type 'id<P0>' with an lvalue of type 'id<P1>'}} } void f3(A *a) { - id<P1> l = a; // expected-error {{incompatible type initializing 'A *', expected 'id<P1>'}} + id<P1> l = a; // expected-error {{cannot initialize a variable of type 'id<P1>' with an lvalue of type 'A *'}} } void f4(int cond, id x, A *a) { diff --git a/test/SemaObjCXX/cstyle-cast.mm b/test/SemaObjCXX/cstyle-cast.mm index fca2ef5cb613a..4a211e3197041 100644 --- a/test/SemaObjCXX/cstyle-cast.mm +++ b/test/SemaObjCXX/cstyle-cast.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol P @end @interface I @end diff --git a/test/SemaObjCXX/function-pointer-void-star.mm b/test/SemaObjCXX/function-pointer-void-star.mm new file mode 100644 index 0000000000000..8d3d6251734f4 --- /dev/null +++ b/test/SemaObjCXX/function-pointer-void-star.mm @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +extern "C" id (*_dealloc)(id) ; + +void foo() { + extern void *_original_dealloc; + if (_dealloc == _original_dealloc) { } + if (_dealloc != _original_dealloc) { } +} diff --git a/test/SemaObjCXX/linkage-spec.mm b/test/SemaObjCXX/linkage-spec.mm index bbdea7b25873e..b4e809eee1619 100644 --- a/test/SemaObjCXX/linkage-spec.mm +++ b/test/SemaObjCXX/linkage-spec.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" { @class Protocol; } diff --git a/test/SemaObjCXX/objc-decls-inside-namespace.mm b/test/SemaObjCXX/objc-decls-inside-namespace.mm index 464b2871c85d6..9953ec366e162 100644 --- a/test/SemaObjCXX/objc-decls-inside-namespace.mm +++ b/test/SemaObjCXX/objc-decls-inside-namespace.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace C { diff --git a/test/SemaObjCXX/objc-pointer-conv.mm b/test/SemaObjCXX/objc-pointer-conv.mm new file mode 100644 index 0000000000000..c03e3aaad3db9 --- /dev/null +++ b/test/SemaObjCXX/objc-pointer-conv.mm @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef const void * VoidStar; + +typedef struct __CFDictionary * CFMDRef; + +void RandomFunc(CFMDRef theDict, const void *key, const void *value); + +@interface Foo +- (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context; +- (void)a:(id *)objects b:(id *)keys; +@end + +@implementation Foo +- (void)_apply:(void (*)(const void *, const void *, void *))func context:(void *)context { + id item; + id obj; + func(item, obj, context); +} + +- (void)a:(id *)objects b:(id *)keys { + VoidStar dict; + id key; + RandomFunc((CFMDRef)dict, key, objects[3]); +} +@end diff --git a/test/SemaObjCXX/overload.mm b/test/SemaObjCXX/overload.mm index a15907ce421f7..18da69f5442ea 100644 --- a/test/SemaObjCXX/overload.mm +++ b/test/SemaObjCXX/overload.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // XFAIL: * @interface Foo @end diff --git a/test/SemaObjCXX/protocol-lookup.mm b/test/SemaObjCXX/protocol-lookup.mm index b2b354b7782d9..ed3fbe0f72bfc 100644 --- a/test/SemaObjCXX/protocol-lookup.mm +++ b/test/SemaObjCXX/protocol-lookup.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @protocol NSObject - retain; - release; diff --git a/test/SemaObjCXX/references.mm b/test/SemaObjCXX/references.mm index c4961efc1a55e..70ce8278e8f0c 100644 --- a/test/SemaObjCXX/references.mm +++ b/test/SemaObjCXX/references.mm @@ -1,7 +1,4 @@ -// FIXME: This crashes, disable it until fixed. -// RN: clang -cc1 -verify -emit-llvm -o - %s -// RUN: false -// XFAIL: * +// RUN: %clang_cc1 -verify -emit-llvm -o - %s // Test reference binding. @@ -12,7 +9,7 @@ typedef struct { @interface A @property (assign) T p0; -@property (assign) T& p1; +@property (assign) T& p1; // expected-error {{property of reference type is not supported}} @end int f0(const T& t) { @@ -24,6 +21,6 @@ int f1(A *a) { } int f2(A *a) { - return f0(a.p1); + return f0(a.p1); // expected-error {{property 'p1' not found on object of type 'A *'}} } diff --git a/test/SemaObjCXX/reserved-keyword-selectors.mm b/test/SemaObjCXX/reserved-keyword-selectors.mm index add8e75ef8063..3c4bef595daa8 100644 --- a/test/SemaObjCXX/reserved-keyword-selectors.mm +++ b/test/SemaObjCXX/reserved-keyword-selectors.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @interface A - (void)asm; diff --git a/test/SemaObjCXX/standard-conversion-to-bool.mm b/test/SemaObjCXX/standard-conversion-to-bool.mm index cb97546582d73..2e6984872d793 100644 --- a/test/SemaObjCXX/standard-conversion-to-bool.mm +++ b/test/SemaObjCXX/standard-conversion-to-bool.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s @class NSString; id a; diff --git a/test/SemaObjCXX/vararg-non-pod.mm b/test/SemaObjCXX/vararg-non-pod.mm index ee6462b0e027e..6ced8e426bc55 100644 --- a/test/SemaObjCXX/vararg-non-pod.mm +++ b/test/SemaObjCXX/vararg-non-pod.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s -Wnon-pod-varargs +// RUN: %clang_cc1 -fsyntax-only -verify %s -Wnon-pod-varargs extern char version[]; diff --git a/test/SemaObjCXX/void_to_obj.mm b/test/SemaObjCXX/void_to_obj.mm index 851ecf5db6665..932827e61425b 100644 --- a/test/SemaObjCXX/void_to_obj.mm +++ b/test/SemaObjCXX/void_to_obj.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // <rdar://problem/6463729> @class XX; diff --git a/test/SemaTemplate/ackermann.cpp b/test/SemaTemplate/ackermann.cpp index c936889f25f93..9525bfcc4f43c 100644 --- a/test/SemaTemplate/ackermann.cpp +++ b/test/SemaTemplate/ackermann.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // template<unsigned M, unsigned N> // struct Ackermann { diff --git a/test/SemaTemplate/ambiguous-ovl-print.cpp b/test/SemaTemplate/ambiguous-ovl-print.cpp index ccdeb9bebc574..17f412f6716d6 100644 --- a/test/SemaTemplate/ambiguous-ovl-print.cpp +++ b/test/SemaTemplate/ambiguous-ovl-print.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(void*, int); // expected-note{{candidate function}} template<typename T> diff --git a/test/SemaTemplate/anonymous-union.cpp b/test/SemaTemplate/anonymous-union.cpp new file mode 100644 index 0000000000000..59d1f25a4fd2a --- /dev/null +++ b/test/SemaTemplate/anonymous-union.cpp @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5868 +struct T0 { + int x; + union { + void *m0; + }; +}; +template <typename T> +struct T1 : public T0, public T { + void f0() { + m0 = 0; // expected-error{{ambiguous conversion}} + } +}; + +struct A : public T0 { }; + +void f1(T1<A> *S) { S->f0(); } // expected-note{{instantiation of member function}} diff --git a/test/SemaTemplate/canonical-expr-type-0x.cpp b/test/SemaTemplate/canonical-expr-type-0x.cpp index 21552105b0ff9..73cf3c29665c6 100644 --- a/test/SemaTemplate/canonical-expr-type-0x.cpp +++ b/test/SemaTemplate/canonical-expr-type-0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s void f(); diff --git a/test/SemaTemplate/canonical-expr-type.cpp b/test/SemaTemplate/canonical-expr-type.cpp index 0580c677e6278..7582df5e66aad 100644 --- a/test/SemaTemplate/canonical-expr-type.cpp +++ b/test/SemaTemplate/canonical-expr-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s void f(); diff --git a/test/SemaTemplate/class-template-ctor-initializer.cpp b/test/SemaTemplate/class-template-ctor-initializer.cpp index d7649f52688db..fd9417c795f6f 100644 --- a/test/SemaTemplate/class-template-ctor-initializer.cpp +++ b/test/SemaTemplate/class-template-ctor-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class X> struct A {}; diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp index a8163127b0000..71aabe97f4e38 100644 --- a/test/SemaTemplate/class-template-decl.cpp +++ b/test/SemaTemplate/class-template-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class A; diff --git a/test/SemaTemplate/class-template-id-2.cpp b/test/SemaTemplate/class-template-id-2.cpp index c4388a7c15566..c492a365880cd 100644 --- a/test/SemaTemplate/class-template-id-2.cpp +++ b/test/SemaTemplate/class-template-id-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { template<typename T> class A { }; diff --git a/test/SemaTemplate/class-template-id.cpp b/test/SemaTemplate/class-template-id.cpp index 98ccbe7db6f85..df5ef554f7aa6 100644 --- a/test/SemaTemplate/class-template-id.cpp +++ b/test/SemaTemplate/class-template-id.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U = float> struct A { }; typedef A<int> A_int; @@ -9,9 +9,9 @@ A<int, FLOAT> *foo(A<int> *ptr, A<int> const *ptr2, A<int, double> *ptr3) { if (ptr) return ptr; // okay else if (ptr2) - return ptr2; // expected-error{{incompatible type returning 'A<int> const *', expected 'A<int, FLOAT> *'}} + return ptr2; // expected-error{{cannot initialize return object of type 'A<int, FLOAT> *' with an lvalue of type 'A<int> const *'}} else { - return ptr3; // expected-error{{incompatible type returning 'A<int, double> *', expected 'A<int, FLOAT> *'}} + return ptr3; // expected-error{{cannot initialize return object of type 'A<int, FLOAT> *' with an lvalue of type 'A<int, double> *'}} } } @@ -24,7 +24,7 @@ B<17 + 2> *bar(B<(19)> *ptr1, B< (::value + 7) > *ptr2, B<19 - 3> *ptr3) { else if (ptr2) return ptr2; else - return ptr3; // expected-error{{incompatible type returning 'B<19 - 3> *', expected 'B<17 + 2> *'}} + return ptr3; // expected-error{{cannot initialize return object of type 'B<17 + 2> *' with an lvalue of type 'B<19 - 3>}} } typedef B<5> B5; diff --git a/test/SemaTemplate/class-template-spec.cpp b/test/SemaTemplate/class-template-spec.cpp index 2808404b1d99f..efb00c7f3d254 100644 --- a/test/SemaTemplate/class-template-spec.cpp +++ b/test/SemaTemplate/class-template-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U = int> struct A; // expected-note {{template is declared here}} \ // expected-note{{explicitly specialized}} diff --git a/test/SemaTemplate/constructor-template.cpp b/test/SemaTemplate/constructor-template.cpp index 0b6916fa485d3..139de9d68605f 100644 --- a/test/SemaTemplate/constructor-template.cpp +++ b/test/SemaTemplate/constructor-template.cpp @@ -1,11 +1,11 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X0 { // expected-note{{candidate}} X0(int); // expected-note{{candidate}} - template<typename T> X0(T); - template<typename T, typename U> X0(T*, U*); + template<typename T> X0(T); // expected-note {{candidate}} + template<typename T, typename U> X0(T*, U*); // expected-note {{candidate}} // PR4761 - template<typename T> X0() : f0(T::foo) {} + template<typename T> X0() : f0(T::foo) {} // expected-note {{candidate}} int f0; }; @@ -52,7 +52,7 @@ template <> struct A<int>{A(const A<int>&);}; struct B { A<int> x; B(B& a) : x(a.x) {} }; struct X2 { - X2(); + X2(); // expected-note{{candidate function}} X2(X2&); // expected-note {{candidate function}} template<typename T> X2(T); }; @@ -61,7 +61,7 @@ X2 test(bool Cond, X2 x2) { if (Cond) return x2; // okay, uses copy constructor - return X2(); // expected-error{{no viable conversion from 'struct X2' to 'struct X2' is possible}} + return X2(); // expected-error{{no matching constructor}} } struct X3 { @@ -71,7 +71,7 @@ struct X3 { template<> X3::X3(X3); // expected-error{{must pass its first argument by reference}} struct X4 { - X4(); + X4(); // expected-note{{candidate function}} ~X4(); X4(X4&); // expected-note {{candidate function}} template<typename T> X4(const T&, int = 17); @@ -80,7 +80,7 @@ struct X4 { X4 test_X4(bool Cond, X4 x4) { X4 a(x4, 17); // okay, constructor template X4 b(x4); // okay, copy constructor - return X4(); // expected-error{{no viable conversion}} + return X4(); // expected-error{{no matching constructor}} } // Instantiation of a non-dependent use of a constructor diff --git a/test/SemaTemplate/copy-ctor-assign.cpp b/test/SemaTemplate/copy-ctor-assign.cpp index 69481ea557f45..ae6dc9c30fa12 100644 --- a/test/SemaTemplate/copy-ctor-assign.cpp +++ b/test/SemaTemplate/copy-ctor-assign.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Make sure that copy constructors and assignment operators are properly // generated when there is a matching diff --git a/test/SemaTemplate/current-instantiation.cpp b/test/SemaTemplate/current-instantiation.cpp index fe2c558a3d212..45637484f0fd0 100644 --- a/test/SemaTemplate/current-instantiation.cpp +++ b/test/SemaTemplate/current-instantiation.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // This test concerns the identity of dependent types within the // canonical type system, specifically focusing on the difference diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 7b7e18f74aec1..375d199f5899c 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s // Template argument deduction with template template parameters. template<typename T, template<T> class A> @@ -81,3 +81,8 @@ int array1[is_same<Replace<const _1, int, float>::type, const int>::value? 1 : - int array2[is_same<Replace<vector<_1>, int, float>::type, vector<int> >::value? 1 : -1]; int array3[is_same<Replace<vector<const _1>, int, float>::type, vector<const int> >::value? 1 : -1]; int array4[is_same<Replace<vector<int, _2>, double, float>::type, vector<int, float> >::value? 1 : -1]; + +// PR5911 +template <typename T, int N> void f(const T (&a)[N]); +int iarr[] = { 1 }; +void test_PR5911() { f(iarr); } diff --git a/test/SemaTemplate/default-arguments-cxx0x.cpp b/test/SemaTemplate/default-arguments-cxx0x.cpp index 8d8833c6702e4..0f7ba4678b8ee 100644 --- a/test/SemaTemplate/default-arguments-cxx0x.cpp +++ b/test/SemaTemplate/default-arguments-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s // Test default template arguments for function templates. template<typename T = int> diff --git a/test/SemaTemplate/default-arguments.cpp b/test/SemaTemplate/default-arguments.cpp index 0247ddc0ef28d..9ea0fc2e4d52a 100644 --- a/test/SemaTemplate/default-arguments.cpp +++ b/test/SemaTemplate/default-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, int N = 2> struct X; // expected-note{{template is declared here}} X<int, 1> *x1; diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 34ac2d967efc2..0edc504ea0a37 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -1,14 +1,13 @@ -// RUN: clang-cc -fsyntax-only -verify %s - +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class C { C(int a0 = 0); }; template<> C<char>::C(int a0); -struct S { }; +struct S { }; // expected-note 3 {{candidate function}} -template<typename T> void f1(T a, T b = 10) { } // expected-error{{cannot initialize 'b' with an rvalue of type 'int'}} +template<typename T> void f1(T a, T b = 10) { } // expected-error{{no viable conversion}} template<typename T> void f2(T a, T b = T()) { } @@ -26,8 +25,8 @@ void g() { } template<typename T> struct F { - F(T t = 10); // expected-error{{cannot initialize 't' with an rvalue of type 'int'}} - void f(T t = 10); // expected-error{{cannot initialize 't' with an rvalue of type 'int'}} + F(T t = 10); // expected-error{{no viable conversion}} + void f(T t = 10); // expected-error{{no viable conversion}} }; struct FD : F<int> { }; @@ -100,7 +99,7 @@ void test_x2(X2<int> x2i, X2<NotDefaultConstructible> x2n) { // PR5283 namespace PR5283 { template<typename T> struct A { - A(T = 1); // expected-error 3 {{incompatible type initializing 'int', expected 'int *'}} + A(T = 1); // expected-error 3 {{cannot initialize a parameter of type 'int *' with an rvalue of type 'int'}} }; struct B : A<int*> { @@ -144,3 +143,37 @@ namespace pr5301 { } } +// PR5810 +namespace PR5810 { + template<typename T> + struct allocator { + allocator() { int a[sizeof(T) ? -1 : -1]; } // expected-error2 {{array size is negative}} + }; + + template<typename T> + struct vector { + vector(const allocator<T>& = allocator<T>()) {} // expected-note2 {{instantiation of}} + }; + + struct A { }; + struct B { }; + + template<typename> + void FilterVTs() { + vector<A> Result; + } + + void f() { + vector<A> Result; + } + + template<typename T> + struct X { + vector<B> bs; + X() { } + }; + + void f2() { + X<float> x; // expected-note{{member function}} + } +} diff --git a/test/SemaTemplate/dependent-base-member-init.cpp b/test/SemaTemplate/dependent-base-member-init.cpp index b3d707b632b1a..c9823d227d4cd 100644 --- a/test/SemaTemplate/dependent-base-member-init.cpp +++ b/test/SemaTemplate/dependent-base-member-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4381 template<class T> struct X {}; diff --git a/test/SemaTemplate/dependent-expr.cpp b/test/SemaTemplate/dependent-expr.cpp new file mode 100644 index 0000000000000..412a811f72920 --- /dev/null +++ b/test/SemaTemplate/dependent-expr.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR5908 +template <typename Iterator> +void Test(Iterator it) { + *(it += 1); +} diff --git a/test/SemaTemplate/dependent-names.cpp b/test/SemaTemplate/dependent-names.cpp index aef43cb29db44..a2d3c56501e82 100644 --- a/test/SemaTemplate/dependent-names.cpp +++ b/test/SemaTemplate/dependent-names.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef double A; template<typename T> class B { @@ -84,3 +84,17 @@ namespace test0 { d2.test3(); // expected-note {{in instantiation of member function}} } } + +namespace test1 { + template <class T> struct Base { + void foo(T); // expected-note {{must qualify identifier to find this declaration in dependent base class}} + }; + + template <class T> struct Derived : Base<T> { + void doFoo(T v) { + foo(v); // expected-error {{use of undeclared identifier}} + } + }; + + template struct Derived<int>; // expected-note {{requested here}} +} diff --git a/test/SemaTemplate/dependent-sized_array.cpp b/test/SemaTemplate/dependent-sized_array.cpp index d221a4d276d27..cf0e0f37ee047 100644 --- a/test/SemaTemplate/dependent-sized_array.cpp +++ b/test/SemaTemplate/dependent-sized_array.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s template<int N> void f() { diff --git a/test/SemaTemplate/dependent-type-identity.cpp b/test/SemaTemplate/dependent-type-identity.cpp index b7c9040e6cb56..e09581223af64 100644 --- a/test/SemaTemplate/dependent-type-identity.cpp +++ b/test/SemaTemplate/dependent-type-identity.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // This test concerns the identity of dependent types within the // canonical type system. This corresponds to C++ [temp.type], which diff --git a/test/SemaTemplate/destructor-template.cpp b/test/SemaTemplate/destructor-template.cpp index afe2cfc30019d..b5ad967d69d52 100644 --- a/test/SemaTemplate/destructor-template.cpp +++ b/test/SemaTemplate/destructor-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename A> class s0 { diff --git a/test/SemaTemplate/enum-argument.cpp b/test/SemaTemplate/enum-argument.cpp index 1d782df202e39..de89487bd5819 100644 --- a/test/SemaTemplate/enum-argument.cpp +++ b/test/SemaTemplate/enum-argument.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s enum Enum { val = 1 }; template <Enum v> struct C { diff --git a/test/SemaTemplate/example-dynarray.cpp b/test/SemaTemplate/example-dynarray.cpp index 6f3e58e32ab68..1f6ede67a5225 100644 --- a/test/SemaTemplate/example-dynarray.cpp +++ b/test/SemaTemplate/example-dynarray.cpp @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s #include <stddef.h> #include <stdlib.h> #include <assert.h> diff --git a/test/SemaTemplate/example-typelist.cpp b/test/SemaTemplate/example-typelist.cpp index 4a2aeb20e7302..082aeb83fbdd1 100644 --- a/test/SemaTemplate/example-typelist.cpp +++ b/test/SemaTemplate/example-typelist.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // A simple cons-style typelist struct nil { }; diff --git a/test/SemaTemplate/explicit-instantiation.cpp b/test/SemaTemplate/explicit-instantiation.cpp index b04639f6e78c1..fbb5edbefd6c2 100644 --- a/test/SemaTemplate/explicit-instantiation.cpp +++ b/test/SemaTemplate/explicit-instantiation.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template void *; // expected-error{{expected unqualified-id}} @@ -25,8 +25,8 @@ T X0<T>::value; // expected-error{{no matching constructor}} template int X0<int>::value; -struct NotDefaultConstructible { - NotDefaultConstructible(int); +struct NotDefaultConstructible { // expected-note{{candidate function}} + NotDefaultConstructible(int); // expected-note{{candidate function}} }; template NotDefaultConstructible X0<NotDefaultConstructible>::value; // expected-note{{instantiation}} diff --git a/test/SemaTemplate/explicit-specialization-member.cpp b/test/SemaTemplate/explicit-specialization-member.cpp index 197dae5a15afd..06dd382fc7a4d 100644 --- a/test/SemaTemplate/explicit-specialization-member.cpp +++ b/test/SemaTemplate/explicit-specialization-member.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { typedef T* type; diff --git a/test/SemaTemplate/ext-vector-type.cpp b/test/SemaTemplate/ext-vector-type.cpp index 7cc4ae930ed21..0e2debf22b99e 100644 --- a/test/SemaTemplate/ext-vector-type.cpp +++ b/test/SemaTemplate/ext-vector-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, unsigned Length> struct make1 { typedef T __attribute__((ext_vector_type(Length))) type; diff --git a/test/SemaTemplate/extern-templates.cpp b/test/SemaTemplate/extern-templates.cpp index 44728d188a24b..eca64ed595ebf 100644 --- a/test/SemaTemplate/extern-templates.cpp +++ b/test/SemaTemplate/extern-templates.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class X0 { diff --git a/test/SemaTemplate/fibonacci.cpp b/test/SemaTemplate/fibonacci.cpp index 6cd50157e2bdc..ff1711fc529f2 100644 --- a/test/SemaTemplate/fibonacci.cpp +++ b/test/SemaTemplate/fibonacci.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<unsigned I> struct FibonacciEval; diff --git a/test/SemaTemplate/friend-template.cpp b/test/SemaTemplate/friend-template.cpp index 98992f6f6078c..05289b10d26ca 100644 --- a/test/SemaTemplate/friend-template.cpp +++ b/test/SemaTemplate/friend-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5057 namespace test0 { @@ -97,3 +97,13 @@ namespace test4 { f(A<int>()); // expected-note {{in instantiation of function template specialization}} } } + +namespace test5 { + class outer { + class foo; + template <typename T> friend struct cache; + }; + class outer::foo { + template <typename T> friend struct cache; + }; +} diff --git a/test/SemaTemplate/friend.cpp b/test/SemaTemplate/friend.cpp index 27299523862ec..61ef1865da5d5 100644 --- a/test/SemaTemplate/friend.cpp +++ b/test/SemaTemplate/friend.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { struct B { }; diff --git a/test/SemaTemplate/fun-template-def.cpp b/test/SemaTemplate/fun-template-def.cpp index 4d8aaa8d16f1e..0c2cf9c4f2e63 100644 --- a/test/SemaTemplate/fun-template-def.cpp +++ b/test/SemaTemplate/fun-template-def.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Tests that dependent expressions are always allowed, whereas non-dependent // are checked as usual. @@ -8,7 +8,7 @@ // Fake typeid, lacking a typeinfo header. namespace std { class type_info {}; } -struct dummy {}; +struct dummy {}; // expected-note 3 {{candidate function}} template<typename T> int f0(T x) { @@ -39,9 +39,9 @@ T f1(T t1, U u1, int i1) new (t1, u1) int; delete t1; - dummy d1 = sizeof(t1); // FIXME: delayed checking okay? - dummy d2 = offsetof(T, foo); // expected-error {{cannot initialize 'd2'}} - dummy d3 = __alignof(u1); // FIXME: delayed checking okay? + dummy d1 = sizeof(t1); // expected-error {{no viable conversion}} + dummy d2 = offsetof(T, foo); // expected-error {{no viable conversion}} + dummy d3 = __alignof(u1); // expected-error {{no viable conversion}} i1 = typeid(t1); // expected-error {{incompatible type assigning}} return u1; diff --git a/test/SemaTemplate/function-template-specialization.cpp b/test/SemaTemplate/function-template-specialization.cpp index 90e38cc882fec..91989b1ccae07 100644 --- a/test/SemaTemplate/function-template-specialization.cpp +++ b/test/SemaTemplate/function-template-specialization.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int N> void f0(int (&array)[N]); diff --git a/test/SemaTemplate/implicit-instantiation-1.cpp b/test/SemaTemplate/implicit-instantiation-1.cpp index d04bbd8484077..d1bc5a89da15a 100644 --- a/test/SemaTemplate/implicit-instantiation-1.cpp +++ b/test/SemaTemplate/implicit-instantiation-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> struct X { T f(T x, U y) { return x + y; } diff --git a/test/SemaTemplate/injected-class-name.cpp b/test/SemaTemplate/injected-class-name.cpp index f9674c39a58b9..1a65aeb3d6cb5 100644 --- a/test/SemaTemplate/injected-class-name.cpp +++ b/test/SemaTemplate/injected-class-name.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X { X<T*> *ptr; diff --git a/test/SemaTemplate/instantiate-anonymous-union.cpp b/test/SemaTemplate/instantiate-anonymous-union.cpp index 375c1da3ca59a..7c75885788dea 100644 --- a/test/SemaTemplate/instantiate-anonymous-union.cpp +++ b/test/SemaTemplate/instantiate-anonymous-union.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -Wall +// RUN: %clang_cc1 -fsyntax-only %s -Wall template <typename T> class A { struct { }; }; diff --git a/test/SemaTemplate/instantiate-array.cpp b/test/SemaTemplate/instantiate-array.cpp index 29279b4368996..97ea6cbb8e533 100644 --- a/test/SemaTemplate/instantiate-array.cpp +++ b/test/SemaTemplate/instantiate-array.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x #ifndef __GXX_EXPERIMENTAL_CXX0X__ #define __CONCAT(__X, __Y) __CONCAT1(__X, __Y) diff --git a/test/SemaTemplate/instantiate-attr.cpp b/test/SemaTemplate/instantiate-attr.cpp index 08ba9c3a0cd55..7fb1736459326 100644 --- a/test/SemaTemplate/instantiate-attr.cpp +++ b/test/SemaTemplate/instantiate-attr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <typename T> struct A { char a __attribute__((aligned(16))); diff --git a/test/SemaTemplate/instantiate-c99.cpp b/test/SemaTemplate/instantiate-c99.cpp index cf691cffad363..ae1552887b269 100644 --- a/test/SemaTemplate/instantiate-c99.cpp +++ b/test/SemaTemplate/instantiate-c99.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test template instantiation for C99-specific features. diff --git a/test/SemaTemplate/instantiate-call.cpp b/test/SemaTemplate/instantiate-call.cpp index a9c4bf481ded6..ad06be33aa2be 100644 --- a/test/SemaTemplate/instantiate-call.cpp +++ b/test/SemaTemplate/instantiate-call.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N1 { struct X0 { }; @@ -24,7 +24,7 @@ namespace N3 { template<typename T, typename Result> struct call_f0 { void test_f0(T t) { - Result &result = f0(t); // expected-error 2{{no matching}} + Result &result = f0(t); // expected-error 2{{undeclared identifier}} } }; } diff --git a/test/SemaTemplate/instantiate-case.cpp b/test/SemaTemplate/instantiate-case.cpp index bed39d7ffb067..1cc2d5d6c62a2 100644 --- a/test/SemaTemplate/instantiate-case.cpp +++ b/test/SemaTemplate/instantiate-case.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<class T> static int alpha(T c) diff --git a/test/SemaTemplate/instantiate-cast.cpp b/test/SemaTemplate/instantiate-cast.cpp index c3c318f36d5d3..97d3dc30c56c4 100644 --- a/test/SemaTemplate/instantiate-cast.cpp +++ b/test/SemaTemplate/instantiate-cast.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct A { int x; }; diff --git a/test/SemaTemplate/instantiate-clang.cpp b/test/SemaTemplate/instantiate-clang.cpp index a6c28d9e19dbc..cef2b7090bf2e 100644 --- a/test/SemaTemplate/instantiate-clang.cpp +++ b/test/SemaTemplate/instantiate-clang.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test template instantiation for Clang-specific features. diff --git a/test/SemaTemplate/instantiate-complete.cpp b/test/SemaTemplate/instantiate-complete.cpp index 507894a2ff691..183fefab4116e 100644 --- a/test/SemaTemplate/instantiate-complete.cpp +++ b/test/SemaTemplate/instantiate-complete.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Tests various places where requiring a complete type involves // instantiation of that type. diff --git a/test/SemaTemplate/instantiate-decl-dtor.cpp b/test/SemaTemplate/instantiate-decl-dtor.cpp new file mode 100644 index 0000000000000..193d9764c28cc --- /dev/null +++ b/test/SemaTemplate/instantiate-decl-dtor.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +template <typename T> struct A { + T x; + A(int y) { x = y; } + ~A() { *x = 10; } // expected-error {{indirection requires pointer operand}} +}; + +void a() { + A<int> b = 10; // expected-note {{requested here}} +} diff --git a/test/SemaTemplate/instantiate-decl-init.cpp b/test/SemaTemplate/instantiate-decl-init.cpp index d957f2de7da50..b0c2aa8afa911 100644 --- a/test/SemaTemplate/instantiate-decl-init.cpp +++ b/test/SemaTemplate/instantiate-decl-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5426 - the non-dependent obj would be fully processed and wrapped in a // CXXConstructExpr at definition time, which would lead to a failure at diff --git a/test/SemaTemplate/instantiate-declref-ice.cpp b/test/SemaTemplate/instantiate-declref-ice.cpp index ab12b90f6c98c..e4e071dd20d7a 100644 --- a/test/SemaTemplate/instantiate-declref-ice.cpp +++ b/test/SemaTemplate/instantiate-declref-ice.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int i> struct x { static const int j = i; diff --git a/test/SemaTemplate/instantiate-declref.cpp b/test/SemaTemplate/instantiate-declref.cpp index 359e2c7dfaa42..da8b263ab3abe 100644 --- a/test/SemaTemplate/instantiate-declref.cpp +++ b/test/SemaTemplate/instantiate-declref.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { struct Outer { struct Inner { diff --git a/test/SemaTemplate/instantiate-deeply.cpp b/test/SemaTemplate/instantiate-deeply.cpp index 7f15bf1200f12..c5f65945afcbc 100644 --- a/test/SemaTemplate/instantiate-deeply.cpp +++ b/test/SemaTemplate/instantiate-deeply.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wall -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wall -verify %s template<typename a> struct A { template <typename b> struct B { template <typename c> struct C { diff --git a/test/SemaTemplate/instantiate-default-assignment-operator.cpp b/test/SemaTemplate/instantiate-default-assignment-operator.cpp index b0ac078893de6..5594d6c7d799b 100644 --- a/test/SemaTemplate/instantiate-default-assignment-operator.cpp +++ b/test/SemaTemplate/instantiate-default-assignment-operator.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename> struct PassRefPtr { }; template<typename T> struct RefPtr { RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array size is negative}} diff --git a/test/SemaTemplate/instantiate-dependent-nested-name.cpp b/test/SemaTemplate/instantiate-dependent-nested-name.cpp index 2b1d29878a547..eb1d3fba10ed1 100644 --- a/test/SemaTemplate/instantiate-dependent-nested-name.cpp +++ b/test/SemaTemplate/instantiate-dependent-nested-name.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4382 template<typename T> struct X { static const T A = 1; }; template<typename T, bool = X<T>::A> struct Y { typedef T A; }; diff --git a/test/SemaTemplate/instantiate-enum-2.cpp b/test/SemaTemplate/instantiate-enum-2.cpp index 2b56a036e9479..aa3b590cada49 100644 --- a/test/SemaTemplate/instantiate-enum-2.cpp +++ b/test/SemaTemplate/instantiate-enum-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify +// RUN: %clang_cc1 %s -fsyntax-only -verify template<int IntBits> struct X { enum { diff --git a/test/SemaTemplate/instantiate-enum.cpp b/test/SemaTemplate/instantiate-enum.cpp index a7acf22a45a1c..6f9aa4b116d75 100644 --- a/test/SemaTemplate/instantiate-enum.cpp +++ b/test/SemaTemplate/instantiate-enum.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T, T I, int J> struct adder { diff --git a/test/SemaTemplate/instantiate-exception-spec.cpp b/test/SemaTemplate/instantiate-exception-spec.cpp index 31db4487a27a3..c418fe16e87fd 100644 --- a/test/SemaTemplate/instantiate-exception-spec.cpp +++ b/test/SemaTemplate/instantiate-exception-spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // FIXME: the "note" should be down at the call site! template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'struct Incomplete' is not allowed in exception specification}} \ diff --git a/test/SemaTemplate/instantiate-expr-1.cpp b/test/SemaTemplate/instantiate-expr-1.cpp index 1cd55d9ad257e..663749ddce5b6 100644 --- a/test/SemaTemplate/instantiate-expr-1.cpp +++ b/test/SemaTemplate/instantiate-expr-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<int I, int J> struct Bitfields { int simple : I; // expected-error{{bit-field 'simple' has zero width}} diff --git a/test/SemaTemplate/instantiate-expr-2.cpp b/test/SemaTemplate/instantiate-expr-2.cpp index 194593ac4006e..4da4e713ec18f 100644 --- a/test/SemaTemplate/instantiate-expr-2.cpp +++ b/test/SemaTemplate/instantiate-expr-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s typedef char one_byte; typedef char (&two_bytes)[2]; typedef char (&four_bytes)[4]; diff --git a/test/SemaTemplate/instantiate-expr-3.cpp b/test/SemaTemplate/instantiate-expr-3.cpp index 696b58325cd70..41a96a32e0bfb 100644 --- a/test/SemaTemplate/instantiate-expr-3.cpp +++ b/test/SemaTemplate/instantiate-expr-3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // --------------------------------------------------------------------- // Imaginary literals diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp index b99ec3304c4dc..c524e958f8a77 100644 --- a/test/SemaTemplate/instantiate-expr-4.cpp +++ b/test/SemaTemplate/instantiate-expr-4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // --------------------------------------------------------------------- // C++ Functional Casts @@ -21,8 +21,8 @@ struct FunctionalCast0 { template struct FunctionalCast0<5>; -struct X { // expected-note 2 {{candidate function}} - X(int, int); // expected-note 2 {{candidate function}} +struct X { // expected-note 3 {{candidate function}} + X(int, int); // expected-note 3 {{candidate function}} }; template<int N, int M> @@ -84,6 +84,20 @@ template struct New2<X, int, float>; template struct New2<X, int, int*>; // expected-note{{instantiation}} // FIXME: template struct New2<int, int, float>; +// PR5833 +struct New3 { + New3(); + + void *operator new[](__SIZE_TYPE__) __attribute__((unavailable)); // expected-note{{explicitly made unavailable}} +}; + +template<class C> +void* object_creator() { + return new C(); // expected-error{{call to unavailable function 'operator new[]'}} +} + +template void *object_creator<New3[4]>(); // expected-note{{instantiation}} + template<typename T> struct Delete0 { void f(T t) { @@ -119,7 +133,7 @@ struct Throw1 { } }; -struct Incomplete; // expected-note{{forward}} +struct Incomplete; // expected-note 2{{forward}} template struct Throw1<int>; template struct Throw1<int*>; @@ -129,7 +143,6 @@ template struct Throw1<Incomplete*>; // expected-note{{instantiation}} // typeid expressions // --------------------------------------------------------------------- -// FIXME: This should really include <typeinfo>, but we don't have that yet. namespace std { class type_info; } @@ -140,7 +153,7 @@ struct TypeId0 { if (ptr) return typeid(ptr); else - return typeid(T); + return typeid(T); // expected-error{{'typeid' of incomplete type 'struct Incomplete'}} } }; @@ -149,7 +162,7 @@ struct Abstract { }; template struct TypeId0<int>; -template struct TypeId0<Incomplete>; +template struct TypeId0<Incomplete>; // expected-note{{instantiation of member function}} template struct TypeId0<Abstract>; // --------------------------------------------------------------------- @@ -293,7 +306,7 @@ template struct NonDepMemberCall0<float&>; // expected-note{{instantiation}} template<typename T> struct QualifiedDeclRef0 { T f() { - return is_pod<X>::value; // expected-error{{initialized}} + return is_pod<X>::value; // expected-error{{non-const lvalue reference to type 'int' cannot bind to a value of unrelated type 'bool const'}} } }; diff --git a/test/SemaTemplate/instantiate-expr-5.cpp b/test/SemaTemplate/instantiate-expr-5.cpp index b42c0fb2aaf8b..941dae44829af 100644 --- a/test/SemaTemplate/instantiate-expr-5.cpp +++ b/test/SemaTemplate/instantiate-expr-5.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template <class A> int x(A x) { return x++; } int y() { return x<int>(1); } diff --git a/test/SemaTemplate/instantiate-expr-basic.cpp b/test/SemaTemplate/instantiate-expr-basic.cpp index 2b5fcaeb04542..074fe69414904 100644 --- a/test/SemaTemplate/instantiate-expr-basic.cpp +++ b/test/SemaTemplate/instantiate-expr-basic.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wno-unused-value -std=c++0x %s +// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -std=c++0x %s template <typename T> struct S { diff --git a/test/SemaTemplate/instantiate-field.cpp b/test/SemaTemplate/instantiate-field.cpp index 8e2a3758b0d71..d166e7e78e6a5 100644 --- a/test/SemaTemplate/instantiate-field.cpp +++ b/test/SemaTemplate/instantiate-field.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X { diff --git a/test/SemaTemplate/instantiate-friend-class.cpp b/test/SemaTemplate/instantiate-friend-class.cpp index 9a4a73cc8a527..c87b8d0bf9b2c 100644 --- a/test/SemaTemplate/instantiate-friend-class.cpp +++ b/test/SemaTemplate/instantiate-friend-class.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4794 template <class T> class X diff --git a/test/SemaTemplate/instantiate-function-1.cpp b/test/SemaTemplate/instantiate-function-1.cpp index a6c269febea15..543b3cc197599 100644 --- a/test/SemaTemplate/instantiate-function-1.cpp +++ b/test/SemaTemplate/instantiate-function-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> struct X0 { void f(T x, U y) { @@ -66,7 +66,7 @@ template<typename T, typename U, typename V> struct X6 { return u; else { if (t < 0) - return v; // expected-error{{incompatible type}} + return v; // expected-error{{cannot initialize return object of type}} } if (T x = t) { diff --git a/test/SemaTemplate/instantiate-function-1.mm b/test/SemaTemplate/instantiate-function-1.mm index aa4b941d39cf8..c67b5985f63f6 100644 --- a/test/SemaTemplate/instantiate-function-1.mm +++ b/test/SemaTemplate/instantiate-function-1.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // XFAIL: * template<typename T> struct Member0 { diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp index 51a60146d46ae..6318facfc0ea8 100644 --- a/test/SemaTemplate/instantiate-function-2.cpp +++ b/test/SemaTemplate/instantiate-function-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template <typename T> struct S { S() { } S(T t); diff --git a/test/SemaTemplate/instantiate-init.cpp b/test/SemaTemplate/instantiate-init.cpp index 870b27537fceb..8a10a87e610e9 100644 --- a/test/SemaTemplate/instantiate-init.cpp +++ b/test/SemaTemplate/instantiate-init.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X0 { // expected-note 4{{candidate}} X0(int*, float*); // expected-note 4{{candidate}} diff --git a/test/SemaTemplate/instantiate-member-class.cpp b/test/SemaTemplate/instantiate-member-class.cpp index fab65cef2e458..8a19d74cdde4a 100644 --- a/test/SemaTemplate/instantiate-member-class.cpp +++ b/test/SemaTemplate/instantiate-member-class.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class X { @@ -36,3 +36,17 @@ void test_instantiation(X<double>::C *x, X<void>::C *c3; // okay X<void>::D::E *e1; // okay X<void>::D::E e2; // expected-note{{in instantiation of member class 'struct X<void>::D::E' requested here}} + +// Redeclarations. +namespace test1 { + template <typename T> struct Registry { + class node; + static node *Head; + class node { + node(int v) { Head = this; } + }; + }; + void test() { + Registry<int>::node node(0); + } +} diff --git a/test/SemaTemplate/instantiate-member-expr.cpp b/test/SemaTemplate/instantiate-member-expr.cpp new file mode 100644 index 0000000000000..db13624d44267 --- /dev/null +++ b/test/SemaTemplate/instantiate-member-expr.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +template<typename T> +struct S { + S() { } +}; + +template<typename T> +struct vector { + void push_back(const T&) { int a[sizeof(T) ? -1: -1]; } // expected-error {{array size is negative}} +}; + +class GRExprEngine { +public: + typedef vector<S<void *> >CheckersOrdered; + CheckersOrdered Checkers; + + template <typename CHECKER> + void registerCheck(CHECKER *check) { + Checkers.push_back(S<void *>()); // expected-note {{in instantiation of member function 'vector<struct S<void *> >::push_back' requested here}} + } +}; + +class RetainReleaseChecker { }; + +void f(GRExprEngine& Eng) { + Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'GRExprEngine::registerCheck<class RetainReleaseChecker>' requested here}} +} diff --git a/test/SemaTemplate/instantiate-member-initializers.cpp b/test/SemaTemplate/instantiate-member-initializers.cpp index 6fc70429a9d32..f7b7e47e1e9b5 100644 --- a/test/SemaTemplate/instantiate-member-initializers.cpp +++ b/test/SemaTemplate/instantiate-member-initializers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -Wall -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wall -verify %s template<typename T> struct A { A() : a(1) { } // expected-error{{incompatible type passing 'int', expected 'void *'}} diff --git a/test/SemaTemplate/instantiate-member-pointers.cpp b/test/SemaTemplate/instantiate-member-pointers.cpp index d2c9e6b5ed82b..2308ac541b2e1 100644 --- a/test/SemaTemplate/instantiate-member-pointers.cpp +++ b/test/SemaTemplate/instantiate-member-pointers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct Y { int x; }; diff --git a/test/SemaTemplate/instantiate-member-template.cpp b/test/SemaTemplate/instantiate-member-template.cpp index 04ced926341a9..b4f0a9c6509df 100644 --- a/test/SemaTemplate/instantiate-member-template.cpp +++ b/test/SemaTemplate/instantiate-member-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct X0 { @@ -50,7 +50,7 @@ struct X1 { template<typename V> V f1(T t, U u, V) { - return t + u; // expected-error{{incompatible type}} + return t + u; // expected-error{{cannot initialize return object}} } }; @@ -75,7 +75,7 @@ template<typename T> template<typename U> template<typename V> V X1<T>::Inner4<U>::f2(T t, U u, V) { - return t + u; // expected-error{{incompatible type}} + return t + u; // expected-error{{cannot initialize return object}} } void test_X1(int *ip, int i, double *dp) { @@ -90,7 +90,7 @@ void test_X1(int *ip, int i, double *dp) { X1<int*>::Inner3<int> id3; id3.f0(ip, i); - id3.f0(dp, i); // expected-error{{incompatible type}} + id3.f0(dp, i); // expected-error{{cannot initialize a parameter of type 'int *' with an lvalue of type 'double *'}} id3.f1(ip, i, ip); id3.f1(ip, i, dp); // expected-note{{instantiation}} diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp index 231e2812f6669..a02fe5238c357 100644 --- a/test/SemaTemplate/instantiate-method.cpp +++ b/test/SemaTemplate/instantiate-method.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class X { public: @@ -79,7 +79,7 @@ template<class T> struct A1; int *a(A0<int> &x0, A1<int> &x1) { int *y0 = x0; - int *y1 = x1; // expected-error{{initializing}} + int *y1 = x1; // expected-error{{no viable conversion}} } struct X0Base { diff --git a/test/SemaTemplate/instantiate-non-type-template-parameter.cpp b/test/SemaTemplate/instantiate-non-type-template-parameter.cpp index 32acbd0d8bdc3..414e62b13a032 100644 --- a/test/SemaTemplate/instantiate-non-type-template-parameter.cpp +++ b/test/SemaTemplate/instantiate-non-type-template-parameter.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5311 template<typename T> diff --git a/test/SemaTemplate/instantiate-objc-1.mm b/test/SemaTemplate/instantiate-objc-1.mm index 093be4e271559..92d0d6c95080a 100644 --- a/test/SemaTemplate/instantiate-objc-1.mm +++ b/test/SemaTemplate/instantiate-objc-1.mm @@ -1,4 +1,4 @@ -// RUN: clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Obj-C string literal expressions template <typename T> struct StringTest { diff --git a/test/SemaTemplate/instantiate-overloaded-arrow.cpp b/test/SemaTemplate/instantiate-overloaded-arrow.cpp index 7f0ef0c990ad0..ee36427db87b7 100644 --- a/test/SemaTemplate/instantiate-overloaded-arrow.cpp +++ b/test/SemaTemplate/instantiate-overloaded-arrow.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5488 struct X { diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp index d4a7008b47bf7..8a2f34d475a76 100644 --- a/test/SemaTemplate/instantiate-static-var.cpp +++ b/test/SemaTemplate/instantiate-static-var.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, T Divisor> class X { public: @@ -30,7 +30,7 @@ T Z<T>::value; // expected-error{{no matching constructor}} struct DefCon {}; struct NoDefCon { - NoDefCon(const NoDefCon&); + NoDefCon(const NoDefCon&); // expected-note{{candidate function}} }; void test() { diff --git a/test/SemaTemplate/instantiate-subscript.cpp b/test/SemaTemplate/instantiate-subscript.cpp index 20e2c39d0cce5..a7187516da398 100644 --- a/test/SemaTemplate/instantiate-subscript.cpp +++ b/test/SemaTemplate/instantiate-subscript.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct Sub0 { diff --git a/test/SemaTemplate/instantiate-template-template-parm.cpp b/test/SemaTemplate/instantiate-template-template-parm.cpp index 30ba113e20d4e..f48a0c7a71455 100644 --- a/test/SemaTemplate/instantiate-template-template-parm.cpp +++ b/test/SemaTemplate/instantiate-template-template-parm.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<template<typename T> class MetaFun, typename Value> struct apply { typedef typename MetaFun<Value>::type type; @@ -17,7 +17,7 @@ struct add_reference { int i; apply<add_pointer, int>::type ip = &i; apply<add_reference, int>::type ir = i; -apply<add_reference, float>::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot be initialized with a value of type 'int'}} +apply<add_reference, float>::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot bind to a value of unrelated type 'int'}} // Template template parameters template<int> struct B; // expected-note{{has a different type 'int'}} diff --git a/test/SemaTemplate/instantiate-try-catch.cpp b/test/SemaTemplate/instantiate-try-catch.cpp index 074afa9d173d5..aa809e4bf949b 100644 --- a/test/SemaTemplate/instantiate-try-catch.cpp +++ b/test/SemaTemplate/instantiate-try-catch.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s template<typename T> struct TryCatch0 { void f() { diff --git a/test/SemaTemplate/instantiate-type.cpp b/test/SemaTemplate/instantiate-type.cpp index 48060c4e384ee..f5d02707cb1fd 100644 --- a/test/SemaTemplate/instantiate-type.cpp +++ b/test/SemaTemplate/instantiate-type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s int* f(int); float *f(...); diff --git a/test/SemaTemplate/instantiate-typedef.cpp b/test/SemaTemplate/instantiate-typedef.cpp index e092b531582be..977fd08cc36dd 100644 --- a/test/SemaTemplate/instantiate-typedef.cpp +++ b/test/SemaTemplate/instantiate-typedef.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct add_pointer { @@ -8,7 +8,7 @@ struct add_pointer { add_pointer<int>::type test1(int * ptr) { return ptr; } add_pointer<float>::type test2(int * ptr) { - return ptr; // expected-error{{incompatible type returning 'int *', expected 'add_pointer<float>::type' (aka 'float *')}} + return ptr; // expected-error{{cannot initialize return object of type 'add_pointer<float>::type' (aka 'float *') with an lvalue of type 'int *'}} } add_pointer<int&>::type // expected-note{{in instantiation of template class 'struct add_pointer<int &>' requested here}} \ diff --git a/test/SemaTemplate/instantiate-using-decl.cpp b/test/SemaTemplate/instantiate-using-decl.cpp index de66f79242fcb..a4394aa21f6e5 100644 --- a/test/SemaTemplate/instantiate-using-decl.cpp +++ b/test/SemaTemplate/instantiate-using-decl.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace test0 { namespace N { } @@ -47,3 +47,17 @@ namespace test1 { Knot().Visit((struct Object3*) 0); // expected-error {{no matching member function for call}} } } + +// PR5847 +namespace test2 { + namespace ns { + void foo(); + } + + template <class T> void bar(T* ptr) { + using ns::foo; + foo(); + } + + template void bar(char *); +} diff --git a/test/SemaTemplate/instantiation-backtrace.cpp b/test/SemaTemplate/instantiation-backtrace.cpp index 869662268dd24..93f9a3552aa04 100644 --- a/test/SemaTemplate/instantiation-backtrace.cpp +++ b/test/SemaTemplate/instantiation-backtrace.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A; // expected-note 4{{template is declared here}} template<typename T> struct B : A<T*> { }; // expected-error{{implicit instantiation of undefined template}} \ diff --git a/test/SemaTemplate/instantiation-default-1.cpp b/test/SemaTemplate/instantiation-default-1.cpp index f0ce0d3cc669d..6f5a660d99f11 100644 --- a/test/SemaTemplate/instantiation-default-1.cpp +++ b/test/SemaTemplate/instantiation-default-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U = const T> struct Def1; template<> struct Def1<int> { diff --git a/test/SemaTemplate/instantiation-default-2.cpp b/test/SemaTemplate/instantiation-default-2.cpp index 4d9a0e2717bfb..4d6756eca3765 100644 --- a/test/SemaTemplate/instantiation-default-2.cpp +++ b/test/SemaTemplate/instantiation-default-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, T Value> struct Constant; // expected-note{{template parameter is declared here}} \ // FIXME: bad location expected-error{{a non-type template parameter cannot have type 'float'}} diff --git a/test/SemaTemplate/instantiation-default-3.cpp b/test/SemaTemplate/instantiation-default-3.cpp index 521edf66f24cf..dae6b18f32c28 100644 --- a/test/SemaTemplate/instantiation-default-3.cpp +++ b/test/SemaTemplate/instantiation-default-3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { }; diff --git a/test/SemaTemplate/instantiation-depth.cpp b/test/SemaTemplate/instantiation-depth.cpp index 31abb40dd5b11..f48ede9c44cf9 100644 --- a/test/SemaTemplate/instantiation-depth.cpp +++ b/test/SemaTemplate/instantiation-depth.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -ftemplate-depth 5 -verify %s +// RUN: %clang_cc1 -fsyntax-only -ftemplate-depth 5 -verify %s template<typename T> struct X : X<T*> { }; // expected-error{{recursive template instantiation exceeded maximum depth of 5}} \ // expected-note{{use -ftemplate-depth-N to increase recursive template instantiation depth}} \ diff --git a/test/SemaTemplate/member-access-expr.cpp b/test/SemaTemplate/member-access-expr.cpp index ad0075f564b60..116e8377b366e 100644 --- a/test/SemaTemplate/member-access-expr.cpp +++ b/test/SemaTemplate/member-access-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> void call_f0(T x) { x.Base::f0(); @@ -105,3 +105,17 @@ void test_X5(X5<X4> x5, X5<const X4> x5c, X4 *xp, const X4 *cxp) { x5.f(xp); x5c.g(cxp); } + +// In theory we can do overload resolution at template-definition time on this. +// We should at least not assert. +namespace test4 { + struct Base { + template <class T> void foo() {} + }; + + template <class T> struct Foo : Base { + void test() { + foo<int>(); + } + }; +} diff --git a/test/SemaTemplate/member-function-template.cpp b/test/SemaTemplate/member-function-template.cpp index 1d46d31e35d34..5ea8c1010e5c6 100644 --- a/test/SemaTemplate/member-function-template.cpp +++ b/test/SemaTemplate/member-function-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { template<typename T> T& f0(T); diff --git a/test/SemaTemplate/member-initializers.cpp b/test/SemaTemplate/member-initializers.cpp index 62077fabc7211..40f56b34dae09 100644 --- a/test/SemaTemplate/member-initializers.cpp +++ b/test/SemaTemplate/member-initializers.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { A() : j(10), i(10) { } diff --git a/test/SemaTemplate/member-template-access-expr.cpp b/test/SemaTemplate/member-template-access-expr.cpp index 567c0d63b046a..9edefe8b63e01 100644 --- a/test/SemaTemplate/member-template-access-expr.cpp +++ b/test/SemaTemplate/member-template-access-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename U, typename T> U f0(T t) { return t.template get<U>(); diff --git a/test/SemaTemplate/metafun-apply.cpp b/test/SemaTemplate/metafun-apply.cpp index 471b2ad3fae65..bb3c88ad3957e 100644 --- a/test/SemaTemplate/metafun-apply.cpp +++ b/test/SemaTemplate/metafun-apply.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s struct add_pointer { template<typename T> @@ -29,14 +29,12 @@ struct apply1 { int i; apply1<add_pointer, int>::type ip = &i; apply1<add_reference, int>::type ir = i; -apply1<add_reference, float>::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot be initialized with a value of type 'int'}} +apply1<add_reference, float>::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot bind to a value of unrelated type 'int'}} void test() { - apply1<add_reference, void>::type t; // expected-note{{in instantiation of template class 'struct apply1<struct add_reference, void>' requested here}} \ - // FIXME: expected-error{{unexpected type name 'type': expected expression}} + apply1<add_reference, void>::type t; // expected-note{{in instantiation of template class 'struct apply1<struct add_reference, void>' requested here}} - apply1<bogus, int>::type t2; // expected-note{{in instantiation of template class 'struct apply1<struct bogus, int>' requested here}} \ - // FIXME: expected-error{{unexpected type name 'type': expected expression}} + apply1<bogus, int>::type t2; // expected-note{{in instantiation of template class 'struct apply1<struct bogus, int>' requested here}} } diff --git a/test/SemaTemplate/nested-linkage.cpp b/test/SemaTemplate/nested-linkage.cpp index ffe9adc927d6f..6c0791c2efc86 100644 --- a/test/SemaTemplate/nested-linkage.cpp +++ b/test/SemaTemplate/nested-linkage.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s extern "C" { extern "C++" { template<class C> C x(); } } diff --git a/test/SemaTemplate/nested-name-spec-template.cpp b/test/SemaTemplate/nested-name-spec-template.cpp index 436732a828d73..704b8cfce1283 100644 --- a/test/SemaTemplate/nested-name-spec-template.cpp +++ b/test/SemaTemplate/nested-name-spec-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { namespace M { diff --git a/test/SemaTemplate/nested-template.cpp b/test/SemaTemplate/nested-template.cpp index e18329c145d0f..01ede32f9a08b 100644 --- a/test/SemaTemplate/nested-template.cpp +++ b/test/SemaTemplate/nested-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s class A; class S { diff --git a/test/SemaTemplate/operator-function-id-template.cpp b/test/SemaTemplate/operator-function-id-template.cpp index 92a8c84e3be6f..9a0884e8136d1 100644 --- a/test/SemaTemplate/operator-function-id-template.cpp +++ b/test/SemaTemplate/operator-function-id-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct A { diff --git a/test/SemaTemplate/operator-template.cpp b/test/SemaTemplate/operator-template.cpp index dc44d04b68828..4300755cf7118 100644 --- a/test/SemaTemplate/operator-template.cpp +++ b/test/SemaTemplate/operator-template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Make sure we accept this template<class X>struct A{typedef X Y;}; diff --git a/test/SemaTemplate/overload-uneval.cpp b/test/SemaTemplate/overload-uneval.cpp index 2e3bfede700ac..632d1cd521d9d 100644 --- a/test/SemaTemplate/overload-uneval.cpp +++ b/test/SemaTemplate/overload-uneval.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Tests that overload resolution is treated as an unevaluated context. // PR5541 diff --git a/test/SemaTemplate/partial-spec-instantiate.cpp b/test/SemaTemplate/partial-spec-instantiate.cpp index 8d1ae238977c5..3156892a72346 100644 --- a/test/SemaTemplate/partial-spec-instantiate.cpp +++ b/test/SemaTemplate/partial-spec-instantiate.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s // PR4607 template <class T> struct X {}; diff --git a/test/SemaTemplate/qualified-id.cpp b/test/SemaTemplate/qualified-id.cpp index ab57950acff2e..655a80e2bfbfb 100644 --- a/test/SemaTemplate/qualified-id.cpp +++ b/test/SemaTemplate/qualified-id.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5061 namespace a { diff --git a/test/SemaTemplate/qualified-names-diag.cpp b/test/SemaTemplate/qualified-names-diag.cpp index 1d53e5cb98ba3..b2df47bfff4ce 100644 --- a/test/SemaTemplate/qualified-names-diag.cpp +++ b/test/SemaTemplate/qualified-names-diag.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace std { template<typename T> class vector { }; // expected-note{{candidate}} diff --git a/test/SemaTemplate/recursive-template-instantiation.cpp b/test/SemaTemplate/recursive-template-instantiation.cpp index 7c88d5019fd51..0ddedaf2354ab 100644 --- a/test/SemaTemplate/recursive-template-instantiation.cpp +++ b/test/SemaTemplate/recursive-template-instantiation.cpp @@ -1,6 +1,6 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s -template<typename T> void f(T* t) { +template<typename T> void f(T* t) { // expected-note{{candidate function}} f(*t); // expected-error{{no matching function}}\ // expected-note 3{{requested here}} } diff --git a/test/SemaTemplate/temp.cpp b/test/SemaTemplate/temp.cpp index 8be4739a741bd..961b9c873ab8b 100644 --- a/test/SemaTemplate/temp.cpp +++ b/test/SemaTemplate/temp.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // p3 diff --git a/test/SemaTemplate/temp_arg.cpp b/test/SemaTemplate/temp_arg.cpp index e873b8e2a61de..3c9fcb5066102 100644 --- a/test/SemaTemplate/temp_arg.cpp +++ b/test/SemaTemplate/temp_arg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, int I, template<typename> class TT> diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index 0c44651ccfee8..133b8db9491a0 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s template<int N> struct A; // expected-note 5{{template parameter is declared here}} A<0> *a0; @@ -105,13 +105,23 @@ A7c<(&Z::int_member)> *a18_3; // expected-error{{non-type template argument cann template<unsigned char C> struct Overflow; // expected-note{{template parameter is declared here}} Overflow<5> *overflow1; // okay -Overflow<256> *overflow2; // expected-error{{non-type template argument value '256' is too large for template parameter of type 'unsigned char'}} +Overflow<255> *overflow2; // okay +Overflow<256> *overflow3; // expected-error{{non-type template argument value '256' is too large for template parameter of type 'unsigned char'}} template<unsigned> struct Signedness; // expected-note{{template parameter is declared here}} Signedness<10> *signedness1; // okay Signedness<-10> *signedness2; // expected-error{{non-type template argument provides negative value '-10' for unsigned template parameter of type 'unsigned int'}} +template<signed char C> struct SignedOverflow; // expected-note 3 {{template parameter is declared here}} +SignedOverflow<1> *signedoverflow1; +SignedOverflow<-1> *signedoverflow2; +SignedOverflow<-128> *signedoverflow3; +SignedOverflow<-129> *signedoverflow4; // expected-error{{non-type template argument value '-129' is too large for template parameter of type 'signed char'}} +SignedOverflow<127> *signedoverflow5; +SignedOverflow<128> *signedoverflow6; // expected-error{{non-type template argument value '128' is too large for template parameter of type 'signed char'}} +SignedOverflow<(unsigned char)128> *signedoverflow7; // expected-error{{non-type template argument value '128' is too large for template parameter of type 'signed char'}} + // Check canonicalization of template arguments. template<int (*)(int, int)> struct FuncPtr0; int func0(int, int); diff --git a/test/SemaTemplate/temp_arg_template.cpp b/test/SemaTemplate/temp_arg_template.cpp index ada244bb5de60..667122583fdac 100644 --- a/test/SemaTemplate/temp_arg_template.cpp +++ b/test/SemaTemplate/temp_arg_template.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<template<typename T> class X> struct A; // expected-note 2{{previous template template parameter is here}} diff --git a/test/SemaTemplate/temp_arg_type.cpp b/test/SemaTemplate/temp_arg_type.cpp index b322dae98b903..a376900666d89 100644 --- a/test/SemaTemplate/temp_arg_type.cpp +++ b/test/SemaTemplate/temp_arg_type.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> class A; // expected-note 2 {{template parameter is declared here}} // [temp.arg.type]p1 diff --git a/test/SemaTemplate/temp_class_order.cpp b/test/SemaTemplate/temp_class_order.cpp index 4687ddf7d9e98..fcf0325b7bbc9 100644 --- a/test/SemaTemplate/temp_class_order.cpp +++ b/test/SemaTemplate/temp_class_order.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> struct X1 { diff --git a/test/SemaTemplate/temp_class_spec.cpp b/test/SemaTemplate/temp_class_spec.cpp index dad857e8e66de..48026f913178f 100644 --- a/test/SemaTemplate/temp_class_spec.cpp +++ b/test/SemaTemplate/temp_class_spec.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct is_pointer { static const bool value = false; diff --git a/test/SemaTemplate/temp_class_spec_blocks.cpp b/test/SemaTemplate/temp_class_spec_blocks.cpp index 920d9c8b0cbd3..b7b96df69ba5f 100644 --- a/test/SemaTemplate/temp_class_spec_blocks.cpp +++ b/test/SemaTemplate/temp_class_spec_blocks.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -fblocks +// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks template<typename T> struct is_unary_block { static const bool value = false; diff --git a/test/SemaTemplate/temp_class_spec_neg.cpp b/test/SemaTemplate/temp_class_spec_neg.cpp index a029f474fc581..c8e8a57f278bd 100644 --- a/test/SemaTemplate/temp_class_spec_neg.cpp +++ b/test/SemaTemplate/temp_class_spec_neg.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> struct vector; // C++ [temp.class.spec]p6: diff --git a/test/SemaTemplate/temp_explicit.cpp b/test/SemaTemplate/temp_explicit.cpp index ae409aff662ba..fbb41ff601a38 100644 --- a/test/SemaTemplate/temp_explicit.cpp +++ b/test/SemaTemplate/temp_explicit.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s // // Tests explicit instantiation of templates. template<typename T, typename U = T> class X0 { }; diff --git a/test/SemaTemplate/temp_explicit_cxx0x.cpp b/test/SemaTemplate/temp_explicit_cxx0x.cpp index 7045afc3032f3..215d2cfa08208 100644 --- a/test/SemaTemplate/temp_explicit_cxx0x.cpp +++ b/test/SemaTemplate/temp_explicit_cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s namespace N1 { template<typename T> struct X0 { }; // expected-note{{here}} diff --git a/test/SemaTemplate/temp_func_order.cpp b/test/SemaTemplate/temp_func_order.cpp index 5fd7c8d74571b..908354b58ed2b 100644 --- a/test/SemaTemplate/temp_func_order.cpp +++ b/test/SemaTemplate/temp_func_order.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> int &f0(T); diff --git a/test/SemaTemplate/template-class-traits.cpp b/test/SemaTemplate/template-class-traits.cpp index 7cf2004e727f2..4710294452565 100644 --- a/test/SemaTemplate/template-class-traits.cpp +++ b/test/SemaTemplate/template-class-traits.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s #define T(b) (b) ? 1 : -1 #define F(b) (b) ? -1 : 1 diff --git a/test/SemaTemplate/template-decl-fail.cpp b/test/SemaTemplate/template-decl-fail.cpp index b136f6279d52d..a298c6d5a4ba0 100644 --- a/test/SemaTemplate/template-decl-fail.cpp +++ b/test/SemaTemplate/template-decl-fail.cpp @@ -1,3 +1,3 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T> typedef T X; // expected-error{{typedef cannot be a template}} diff --git a/test/SemaTemplate/template-id-expr.cpp b/test/SemaTemplate/template-id-expr.cpp index dd8694afa7ea6..70a1062c22876 100644 --- a/test/SemaTemplate/template-id-expr.cpp +++ b/test/SemaTemplate/template-id-expr.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR5336 template<typename FromCl> struct isa_impl_cl { diff --git a/test/SemaTemplate/template-id-printing.cpp b/test/SemaTemplate/template-id-printing.cpp index 13250943e92c9..fcd4974a7611c 100644 --- a/test/SemaTemplate/template-id-printing.cpp +++ b/test/SemaTemplate/template-id-printing.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -ast-print %s | FileCheck %s namespace N { template<typename T, typename U> void f(U); template<int> void f(); diff --git a/test/SemaTemplate/typename-specifier-2.cpp b/test/SemaTemplate/typename-specifier-2.cpp index 99e628523158e..551cac3168b29 100644 --- a/test/SemaTemplate/typename-specifier-2.cpp +++ b/test/SemaTemplate/typename-specifier-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename MetaFun, typename T> struct bind_metafun { @@ -18,7 +18,7 @@ int i; // 'aka' telling us that we're dealing with an int**. Should we fix // getDesugaredType to dig through pointers and such? bind_metafun<add_pointer, int>::type::type ip = &i; -bind_metafun<add_pointer, float>::type::type fp = &i; // expected-error{{incompatible type initializing 'int *', expected 'bind_metafun<add_pointer, float>::type::type' (aka 'float *')}} +bind_metafun<add_pointer, float>::type::type fp = &i; // expected-error{{cannot initialize a variable of type 'bind_metafun<add_pointer, float>::type::type' (aka 'float *') with an rvalue of type 'int *'}} template<typename T> diff --git a/test/SemaTemplate/typename-specifier-3.cpp b/test/SemaTemplate/typename-specifier-3.cpp index 8dde6095e533f..a463d88752c95 100644 --- a/test/SemaTemplate/typename-specifier-3.cpp +++ b/test/SemaTemplate/typename-specifier-3.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // PR4364 template<class T> struct a { diff --git a/test/SemaTemplate/typename-specifier-4.cpp b/test/SemaTemplate/typename-specifier-4.cpp index c7484c19fca77..7fd88f130fa62 100644 --- a/test/SemaTemplate/typename-specifier-4.cpp +++ b/test/SemaTemplate/typename-specifier-4.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s template<typename T, typename U> struct is_same { static const bool value = false; diff --git a/test/SemaTemplate/typename-specifier.cpp b/test/SemaTemplate/typename-specifier.cpp index 2501b8d048ff5..b968ea6ad5441 100644 --- a/test/SemaTemplate/typename-specifier.cpp +++ b/test/SemaTemplate/typename-specifier.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { struct A { typedef int type; diff --git a/test/SemaTemplate/value-dependent-null-pointer-constant.cpp b/test/SemaTemplate/value-dependent-null-pointer-constant.cpp index 110c380c9aa2a..223500eac48c7 100644 --- a/test/SemaTemplate/value-dependent-null-pointer-constant.cpp +++ b/test/SemaTemplate/value-dependent-null-pointer-constant.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s +// RUN: %clang_cc1 -fsyntax-only %s template<typename T, int N> struct X0 { diff --git a/test/SemaTemplate/variadic-class-template-1.cpp b/test/SemaTemplate/variadic-class-template-1.cpp index 6df905006692a..6da64fb55f703 100644 --- a/test/SemaTemplate/variadic-class-template-1.cpp +++ b/test/SemaTemplate/variadic-class-template-1.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x template<typename ... Args = int> struct S1 { }; // expected-error{{template parameter pack cannot have a default argument}} template<typename ... Args, typename T> struct S2 { }; // expected-error{{template parameter pack must be the last template parameter}} diff --git a/test/SemaTemplate/variadic-class-template-2.cpp b/test/SemaTemplate/variadic-class-template-2.cpp index b1ac71b88bda4..509977121f4b0 100644 --- a/test/SemaTemplate/variadic-class-template-2.cpp +++ b/test/SemaTemplate/variadic-class-template-2.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x // Type parameters packs template <typename ...> struct TS1 {}; // expected-note{{template parameter is declared here}} diff --git a/test/SemaTemplate/variadic-parse.cpp b/test/SemaTemplate/variadic-parse.cpp index e1d1b1f98db2b..d8b77b3f423e4 100644 --- a/test/SemaTemplate/variadic-parse.cpp +++ b/test/SemaTemplate/variadic-parse.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x // Parsing type parameter packs. template <typename ... Args> struct T1 {}; diff --git a/test/SemaTemplate/variadic-unsupported.cpp b/test/SemaTemplate/variadic-unsupported.cpp index 98f217c768910..9f2b0807d2d6b 100644 --- a/test/SemaTemplate/variadic-unsupported.cpp +++ b/test/SemaTemplate/variadic-unsupported.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Type parameter packs. template <typename ... > struct T1 {}; // expected-error{{variadic templates are only allowed in C++0x}} diff --git a/test/SemaTemplate/virtual-member-functions.cpp b/test/SemaTemplate/virtual-member-functions.cpp index 486c8b2051410..69ae0807b4c5b 100644 --- a/test/SemaTemplate/virtual-member-functions.cpp +++ b/test/SemaTemplate/virtual-member-functions.cpp @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace PR5557 { template <class T> struct A { diff --git a/test/lit.cfg b/test/lit.cfg index 1421ec1a80cfc..4d7a17a6b5d68 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -122,5 +122,15 @@ def inferClang(PATH): config.clang = inferClang(config.environment['PATH']) if not lit.quiet: lit.note('using clang: %r' % config.clang) -config.substitutions.append( (' clang ', ' ' + config.clang + ' ') ) -config.substitutions.append( (' clang-cc ', ' ' + config.clang + ' -cc1 ') ) +config.substitutions.append( ('%clang_cc1', config.clang + ' -cc1') ) +config.substitutions.append( ('%clang', ' ' + config.clang + ' ') ) + +# FIXME: Find nicer way to prohibit this. +config.substitutions.append( + (' clang ', """*** Do not use 'clang' in tests, use '%clang'. ***""") ) +config.substitutions.append( + (' clang-cc ', + """*** Do not use 'clang-cc' in tests, use '%clang_cc1'. ***""") ) +config.substitutions.append( + (' clang -cc1 ', + """*** Do not use 'clang -cc1' in tests, use '%clang_cc1'. ***""") ) |