LEVEL = ../../..
-TOOLNAME = clang
+TOOLNAME = clang-cc
CPPFLAGS += -I$(PROJ_SRC_DIR)/../include -I$(PROJ_OBJ_DIR)/../include
CXXFLAGS = -fno-rtti
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "clang").c_str());
+ Args.MakeArgString(getToolChain().GetProgramPath(C, "clang-cc").c_str());
Dest.addCommand(new Command(Exec, CmdArgs));
// Claim some arguments which clang doesn't support, but we don't
-// RUN: clang -analyze -checker-cfref -verify -fobjc-gc -analyzer-constraints=basic %s &&
-// RUN: clang -analyze -checker-cfref -verify -fobjc-gc -analyzer-constraints=range %s &&
-// RUN: clang -analyze -checker-cfref -verify -fobjc-gc -disable-free %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s
+// RUN: clang-cc -analyze -checker-cfref -verify -fobjc-gc -analyzer-constraints=basic %s &&
+// RUN: clang-cc -analyze -checker-cfref -verify -fobjc-gc -analyzer-constraints=range %s &&
+// RUN: clang-cc -analyze -checker-cfref -verify -fobjc-gc -disable-free %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s
typedef signed long CFIndex;
typedef const struct __CFAllocator * CFAllocatorRef;
-// RUN: clang -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic &&
-// RUN: clang -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic &&
-// RUN: clang -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region &&
-// RUN: clang -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region
+// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic &&
+// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic &&
+// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region &&
+// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region
typedef struct objc_selector *SEL;
typedef signed char BOOL;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
typedef struct CGColorSpace *CGColorSpaceRef;
extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void);
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
typedef signed char BOOL;
-// RUN: clang -analyze -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify
+// RUN: clang-cc -analyze -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify
typedef signed char BOOL;
@protocol NSObject
- (BOOL)isEqual:(id)object;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
// BEGIN delta-debugging reduced header stuff
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -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.
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
#include <stdarg.h>
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic %s -verify &&
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range %s -verify &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic %s -verify &&
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range %s -verify &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify
// The point of this test cases is to exercise properties in the static
// analyzer
-// RUN: clang -analyze -warn-objc-methodsigs -verify %s
+// RUN: clang-cc -analyze -warn-objc-methodsigs -verify %s
#include <stdio.h>
-// RUN: clang -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
-// RUN: clang -analyze -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
-// RUN: clang -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
-// RUN: clang -analyze -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s
+// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
+// RUN: clang-cc -analyze -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
+// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
+// RUN: clang-cc -analyze -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s
typedef const void * CFTypeRef;
typedef const struct __CFString * CFStringRef;
-// RUN: clang -analyze -warn-objc-missing-dealloc %s -verify
+// RUN: clang-cc -analyze -warn-objc-missing-dealloc %s -verify
// Tests for the checker which checks missing/extra ivar 'release' calls
// in dealloc.
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
struct s {
int data;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic --verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region --verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic --verify %s &&
+// RUN: clang-cc -analyze -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
-// RUN: clang -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range -verify %s
typedef unsigned char Boolean;
typedef signed long CFIndex;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -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).
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
#include <stdint.h>
-// RUN: clang -analyze -warn-dead-stores -warn-uninit-values -verify %s
+// RUN: clang-cc -analyze -warn-dead-stores -warn-uninit-values -verify %s
void f1()
{
-// RUN: clang -analyze -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s
+// RUN: clang-cc -analyze -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s
void f1() {
int k, y;
-// RUN: clang -analyze -warn-dead-stores -verify %s
+// RUN: clang-cc -analyze -warn-dead-stores -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
-// RUN: clang -analyze -checker-simple -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -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).
-// RUN: clang -analyze -checker-cfref %s --analyzer-store=basic -verify &&
-// RUN: clang -analyze -checker-cfref %s --analyzer-store=region -verify &&
-// RUN: clang -analyze -checker-simple %s -verify
+// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
+// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify &&
+// RUN: clang-cc -analyze -checker-simple %s -verify
unsigned foo();
typedef struct bf { unsigned x:2; } bf;
-// RUN: clang -analyze -checker-simple -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
void f(void) {
void (*p)(void);
-// RUN: clang -analyze -checker-cfref --analyzer-store=basic --verify -fblocks %s
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic --verify -fblocks %s
//---------------------------------------------------------------------------
// Test case 'checkaccess_union' differs for region store and basic store.
-// RUN: clang -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s -analyzer-eagerly-assume
+// RUN: clang-cc -analyze -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;
-// RUN: clang -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s
typedef struct objc_selector *SEL;
typedef signed char BOOL;
-// RUN: clang -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s &&
-// RUN: clang -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s &&
+// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s
typedef struct objc_selector *SEL;
typedef signed char BOOL;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -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
-// RUN: clang -analyze -std=gnu99 -checker-simple -verify %s &&
-// RUN: clang -analyze -std=gnu99 -checker-simple -verify %s -analyzer-constraints=range &&
-// RUN: clang -analyze -std=gnu99 -checker-simple -analyzer-store=region -analyzer-purge-dead=false -verify %s &&
-// RUN: clang -analyze -std=gnu99 -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -std=gnu99 -checker-simple -verify %s &&
+// RUN: clang-cc -analyze -std=gnu99 -checker-simple -verify %s -analyzer-constraints=range &&
+// RUN: clang-cc -analyze -std=gnu99 -checker-simple -analyzer-store=region -analyzer-purge-dead=false -verify %s &&
+// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -analyzer-store=region -verify %s
#include<stdint.h>
#include <assert.h>
-// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s
char f1() {
char* s = "abcd";
-// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s
void f1() {
int a[10];
-// RUN: clang -analyze -checker-cfref %s --analyzer-store=basic -verify &&
-// RUN: clang -analyze -checker-cfref %s --analyzer-store=region -verify
+// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
+// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
typedef int bar_return_t;
typedef struct {
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
typedef const struct __CFAllocator * CFAllocatorRef;
typedef struct __CFDictionary * CFMutableDictionaryRef;
-// RUN: clang -analyze -warn-dead-stores -verify %s
+// RUN: clang-cc -analyze -warn-dead-stores -verify %s
//
// This test exercises the live variables analysis (LiveVariables.cpp).
// The case originally identified a non-termination bug.
-// RUN: clang -verify -analyze -checker-cfref -analyzer-store=region %s
+// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
-// RUN: clang -verify -analyze -checker-cfref -analyzer-store=basic %s
+// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=basic %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
-// RUN: clang -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s
//
// This test case mainly checks that the retain/release checker doesn't crash
// on this file.
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
typedef const void * CFTypeRef;
typedef double CFTimeInterval;
-// RUN: clang -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify
+// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify
typedef struct Foo { int x; } Bar;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
typedef const struct __CFString * CFStringRef;
typedef const struct __CFAllocator * CFAllocatorRef;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -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.
-// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s
// Region store must be enabled for tests in this file.
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -analyze -checker-cfref -verify -fobjc-gc-only %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -fobjc-gc-only -verify %s
+// RUN: clang-cc -analyze -checker-cfref -verify -fobjc-gc-only %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -fobjc-gc-only -verify %s
//===----------------------------------------------------------------------===//
// Header stuff.
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -analyze -checker-cfref -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
//===----------------------------------------------------------------------===//
-// RUN: clang -analyze -checker-simple -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
#include <stdlib.h>
-// RUN: clang -analyze -checker-simple -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -analyze -verify -analyzer-store=basic -checker-cfref %s &&
-// RUN: clang -analyze -verify -analyzer-store=region -checker-cfref %s
+// RUN: clang-cc -analyze -verify -analyzer-store=basic -checker-cfref %s &&
+// RUN: clang-cc -analyze -verify -analyzer-store=region -checker-cfref %s
// Delta-Debugging reduced preamble.
typedef signed char BOOL;
-// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-simple -analyzer-store=region -verify %s
struct s {
int data;
-// RUN: clang -analyze -checker-cfref -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
struct FPRec {
void (*my_func)(int * x);
-// RUN: clang -analyze -warn-uninit-values -verify %s
+// RUN: clang-cc -analyze -warn-uninit-values -verify %s
int f1() {
int x;
-// RUN: clang -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
typedef unsigned int NSUInteger;
-// RUN: clang -analyze -warn-objc-unused-ivars %s -verify
+// RUN: clang-cc -analyze -warn-objc-unused-ivars %s -verify
@interface A
{
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
int array[] = {1, 2, 3, 4, 5};
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
// PR1990
struct test {
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
struct test {
unsigned a:1;
-// RUN: clang -emit-llvm < %s | grep "\$0,\$1"
+// RUN: clang-cc -emit-llvm < %s | grep "\$0,\$1"
void f() {
int d1, d2;
// RUN: rm -f %t1.bc
-// RUN: not clang %s -emit-llvm-bc -o %t1.bc
+// RUN: not clang-cc %s -emit-llvm-bc -o %t1.bc
// RUN: not test -f %t1.bc
void f() {
-// RUN: clang -emit-llvm -o - %s | grep -e "@g[0-9] " | count 2
+// RUN: clang-cc -emit-llvm -o - %s | grep -e "@g[0-9] " | count 2
int g0, f0();
int f1(), g1;
-// RUN: clang --emit-llvm -o %t %s &&
+// RUN: clang-cc --emit-llvm -o %t %s &&
// RUN: grep "i8 52" %t | count 1
struct et7 {
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
int main () {
struct foo {
-// RUN: clang -emit-llvm -o - %s | grep -e "^@f" | count 1
+// RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1
int x() {}
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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>
-// RUN: clang --emit-llvm -o - %s
+// RUN: clang-cc --emit-llvm -o - %s
// <rdar://problem/6108358>
/* For posterity, the issue here begins initial "char []" decl for
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 -DUSE_DEF -emit-llvm -o %t %s &&
+// RUN: clang-cc -DUSE_DEF -emit-llvm -o %t %s &&
// RUN: grep "@pipe()" %t | count 0 &&
// RUN: grep '_thisIsNotAPipe' %t | count 3
// <rdr://6116729>
-// RUN: clang -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3
+// RUN: clang-cc -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() {
-// RUN: clang --emit-llvm -o - %s
+// RUN: clang-cc --emit-llvm -o - %s
// <rdar://problem/6122967>
int f0(void *a, void *b) {
-// RUN: clang --emit-llvm -o %t %s
+// RUN: clang-cc --emit-llvm -o %t %s
typedef short T[4];
struct s {
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@protocol P0
@end
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
// PR2817
void f0(void) {
-// RUN: clang -emit-llvm -o - %s | grep "store i32 1"
+// RUN: clang-cc -emit-llvm -o - %s | grep "store i32 1"
// PR3150
int a() {return 1||1;}
-// RUN: clang -S -g -o %t.s %s
+// RUN: clang-cc -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
-// RUN: clang -emit-llvm -O1 < %s | grep "ret i32 0"
+// RUN: clang-cc -emit-llvm -O1 < %s | grep "ret i32 0"
int a(void) {
return ++(struct x {unsigned x : 2;}){3}.x;
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
typedef struct a b;
b* x;
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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 1" %t | count 1
// PR2001
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
void f()
{
void *addr;
-// RUN: clang -emit-llvm -o - %s
+// RUN: clang-cc -emit-llvm -o - %s
// PR2643
void foo() {
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
// PR2743
// <rdr://6094512>
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
int a = 2.0 ? 1 : 2;
-// RUN: clang -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1 &&
-// RUN: clang -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1 &&
-// RUN: clang -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0
+// 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
#include <stdio.h>
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep '@g0 = internal global .struct.s0 <{ i32 3 }>' %t | count 1
struct s0 {
-// RUN: clang -emit-llvm %s -o - -O1 -triple=x86_64-gnu-linux | grep "i64 -1"
+// RUN: clang-cc -emit-llvm %s -o - -O1 -triple=x86_64-gnu-linux | grep "i64 -1"
// PR3709
long long a() { return (long long)(int*)-1;}
-// RUN: clang -emit-llvm < %s
+// RUN: clang-cc -emit-llvm < %s
volatile unsigned char* const __attribute__((address_space(1))) serial_ctrl = 0x02;
-// RUN: clang -emit-llvm < %s | grep '@foo.*global.*addrspace(1)' &&
-// RUN: clang -emit-llvm < %s | grep '@ban.*global.*addrspace(1)' &&
-// RUN: clang -emit-llvm < %s | grep 'load.*addrspace(1)' | count 2 &&
-// RUN: clang -emit-llvm < %s | grep 'load.*addrspace(2).. @A' &&
-// RUN: clang -emit-llvm < %s | grep 'load.*addrspace(2).. @B'
+// 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'
int foo __attribute__((address_space(1)));
int ban[10] __attribute__((address_space(1)));
-// RUN: clang -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang -emit-llvm < %s | grep "align 16" | count 2
+// RUN: clang-cc -emit-llvm < %s | grep "align 16" | count 2
typedef struct __attribute((aligned(16))) {int x[4];} ff;
-// RUN: clang -triple i386-unknown-unknown -O1 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -O1 -emit-llvm -o %t %s &&
// RUN: grep 'ret i32 4' %t
enum e0 { E0 };
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
int f() {
int a[2];
-// RUN: clang -emit-llvm %s -o %t -arch=i386 &&
+// RUN: clang-cc -emit-llvm %s -o %t -arch=i386 &&
void t1(int len) {
__asm__ volatile("" : "=&r"(len), "+&r"(len));
}
-// RUN: clang %s -emit-llvm -o - > %t1 &&
+// RUN: clang-cc %s -emit-llvm -o - > %t1 &&
// RUN: grep @llvm.atomic.load.add.i32 %t1 &&
// RUN: grep @llvm.atomic.load.sub.i32 %t1 &&
// RUN: grep @llvm.atomic.load.min.i32 %t1 &&
-// RUN: clang -g -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -emit-llvm -o %t %s &&
// RUN: not grep 'call void @llvm.dbg.func.start' %t
void t1() __attribute__((nodebug));
-// RUN: clang -g -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -emit-llvm -o %t %s &&
// RUN: grep 'noinline' %t
void t1() __attribute__((noinline));
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -emit-llvm -o %t %s &&
// RUN: grep '@llvm.used = .*@g0' %t &&
// RUN: grep '@llvm.used = .*@f0' %t &&
// RUN: grep '@llvm.used = .*@f1.l0' %t
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -emit-llvm -o %t %s &&
// RUN: grep 't1.*noreturn' %t &&
// RUN: grep 't2.*nounwind' %t &&
// RUN: grep 'weak.*t3' %t &&
/* 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 -triple i386-unknown-unknown -O0 -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s &&
// RUN: grep 'load ' %t | count 0 &&
// RUN: grep "@g0" %t | count 0
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
typedef struct { unsigned int i: 1; } c;
const c d = { 1 };
-// RUN: clang -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis > %t &&
// RUN: grep "ret i32" %t | count 4 &&
// RUN: grep "ret i32 1" %t | count 4
-// RUN: clang %s -emit-llvm -o %t -fblocks -f__block &&
+// RUN: clang-cc %s -emit-llvm -o %t -fblocks -f__block &&
// RUN: grep "_Block_object_dispose" %t | count 15 &&
// RUN: grep "__copy_helper_block_" %t | count 12 &&
// RUN: grep "__destroy_helper_block_" %t | count 12 &&
-// RUN: clang %s -emit-llvm -o %t -fblocks
+// RUN: clang-cc %s -emit-llvm -o %t -fblocks
void (^f)(void) = ^{};
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
// From GCC PR19331
struct SysParams
-// RUN: clang -emit-llvm < %s | grep i1 | count 1
+// RUN: clang-cc -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;
-// RUN: clang -emit-llvm < %s | grep i1 | count 1
+// RUN: clang-cc -emit-llvm < %s | grep i1 | count 1
// Check that the type of this global isn't i1
_Bool test = &test;
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
int testBoolAssign(void) {
int ss;
-// RUN: clang -emit-llvm %s -o - | grep 'cttz' | count 2 &&
-// RUN: clang -emit-llvm %s -o - | grep 'ctlz' | count 2
+// RUN: clang-cc -emit-llvm %s -o - | grep 'cttz' | count 2 &&
+// RUN: clang-cc -emit-llvm %s -o - | grep 'ctlz' | count 2
int a(int a) {return __builtin_ctz(a) + __builtin_clz(a);}
-// RUN: clang -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
// RUN: grep '@llvm.memset.i32' %t &&
// RUN: grep '@llvm.memcpy.i32' %t &&
// RUN: grep '@llvm.memmove.i32' %t &&
-// RUN: clang %s -emit-llvm -o - | grep 'declare.*printf' | count 1
+// RUN: clang-cc %s -emit-llvm -o - | grep 'declare.*printf' | count 1
// PR3612
int printf(const char *, ...);
-// RUN: clang -emit-llvm < %s | grep "llvm.returnaddress" &&
-// RUN: clang -emit-llvm < %s | grep "llvm.frameaddress"
+// RUN: clang-cc -emit-llvm < %s | grep "llvm.returnaddress" &&
+// RUN: clang-cc -emit-llvm < %s | grep "llvm.frameaddress"
void* a(unsigned x) {
return __builtin_return_address(0);
}
-// RUN: clang -emit-llvm < %s -o - | grep "llvm.memcpy"
+// RUN: clang-cc -emit-llvm < %s -o - | grep "llvm.memcpy"
char* x(char* a, char* b) {return __builtin_memcpy(a, b, 4);}
-// RUN: clang -emit-llvm -o - %s > %t
+// RUN: clang-cc -emit-llvm -o - %s > %t
// RUN: ! grep "__builtin" %t
#include <stdio.h>
-// RUN: clang -emit-llvm -o - %s > %t
+// RUN: clang-cc -emit-llvm -o - %s > %t
// RUN: ! grep "__builtin" %t
#include <stdio.h>
-// RUN: clang -DUSE_64 -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -DUSE_ALL -triple x86_64-unknown-unknown -fsyntax-only -o %t %s
+// 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
#ifdef USE_ALL
#define USE_3DNOW
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -emit-llvm -o %t %s &&
// RUN: not grep __builtin %t
#include <stdio.h>
-// RUN: clang -emit-llvm < %s | grep 'shufflevector' | count 1
+// RUN: clang-cc -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);}
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang -emit-llvm < %s -o %t &&
+// RUN: clang-cc -emit-llvm < %s -o %t &&
// RUN: grep "store i32 351, i32*" %t &&
// RUN: grep "w = global %0 <{ i32 2, i8 0, i8 0, i8 0, i8 0 }>" %t &&
// RUN: grep "y = global %1 <{ double 7.300000e+01 }>" %t
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
extern void go(const void *p);
float v[2] = { 0.0, 1.0 };
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
#define CFSTR __builtin___CFStringMakeConstantString
void f() {
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
#ifdef __APPLE__
#include <Carbon/Carbon.h>
-// RUN: clang -emit-llvm %s -o %t &&
+// RUN: clang-cc -emit-llvm %s -o %t &&
// RUN: grep "store i32 0, i32\* %cleanup" %t | count 2
void f(int n) {
int a[n];
-// RUN: clang -emit-llvm < %s
+// RUN: clang-cc -emit-llvm < %s
int main(void)
{
-// RUN: clang < %s -emit-llvm
+// RUN: clang-cc < %s -emit-llvm
int* a = &(int){1};
struct s {int a, b, c;} * b = &(struct s) {1, 2, 3};
-// RUN: clang < %s -emit-llvm
+// RUN: clang-cc < %s -emit-llvm
int A;
long long B;
int C;
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
// PR1824
int foo(int x, short y) {
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
float test1(int cond, float a, float b)
{
-// RUN: clang -arch i386 -verify -emit-llvm -o %t %s &&
+// RUN: clang-cc -arch i386 -verify -emit-llvm -o %t %s &&
#include <stdint.h>
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
int a() {
A:;static void* a = &&A;
}
-// RUN: clang -emit-llvm %s -o - 2>&1 | not grep warning &&
-// RUN: clang -emit-llvm %s -o - | grep @b | count 1
+// RUN: clang-cc -emit-llvm %s -o - 2>&1 | not grep warning &&
+// RUN: clang-cc -emit-llvm %s -o - | grep @b | count 1
int a, b;
int *c1 = 1 < 2 ? &a : &b;
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
void f() {
int a;
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -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
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
enum E {};
int v1 = E();
-// RUN: clang -o %t --emit-llvm -g %s
+// RUN: clang-cc -o %t --emit-llvm -g %s
// PR3023
void convert(void) {
-// RUN: clang -triple i386-unknown-unknown %s -emit-llvm -o - | grep "<{ i8\* null, i32 1024 }>"
+// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep "<{ i8\* null, i32 1024 }>"
struct foo {
void *a;
-// RUN: clang -emit-llvm < %s -o %t &&
+// RUN: clang-cc -emit-llvm < %s -o %t &&
// RUN: grep 'dllexport' %t | count 1 &&
// RUN: not grep 'dllimport' %t
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
int bar();
int test0() {
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -emit-llvm -o %t %s &&
// RUN: not grep "@foo" %t &&
-// RUN: clang -femit-all-decls -emit-llvm -o %t %s &&
+// RUN: clang-cc -femit-all-decls -emit-llvm -o %t %s &&
// RUN: grep "@foo" %t
static void foo() {
-// RUN: clang -emit-llvm < %s -o -
+// RUN: clang-cc -emit-llvm < %s -o -
// PR2419
struct Mem {
-// RUN: clang -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6'
+// RUN: clang-cc -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;
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
// PR1895
// sizeof function
-// RUN: clang %s -emit-llvm -o - | not grep 'extractelement'
-// RUN: clang %s -emit-llvm -o - | not grep 'insertelement'
-// RUN: clang %s -emit-llvm -o - | grep 'shufflevector'
+// RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement'
+// RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement'
+// RUN: clang-cc %s -emit-llvm -o - | grep 'shufflevector'
typedef __attribute__(( ext_vector_type(2) )) float float2;
typedef __attribute__(( ext_vector_type(4) )) float float4;
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
typedef __attribute__(( ext_vector_type(4) )) float float4;
typedef __attribute__(( ext_vector_type(2) )) float float2;
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
int f() {
extern int a;
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o - %s | grep 7 | count 1 &&
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o - %s | grep 11 | count 1 &&
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o - %s | grep 13 | count 1 &&
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o - %s | grep 15 | count 1
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | grep 7 | count 1 &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | grep 11 | count 1 &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | grep 13 | count 1 &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o - %s | grep 15 | count 1
struct { int x; int y[]; } a = { 1, 7, 11 };
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
// PR2360
-// RUN: clang -emit-llvm < %s 2>&1 | not grep 'cannot codegen this l-value expression yet'
+// RUN: clang-cc -emit-llvm < %s 2>&1 | not grep 'cannot codegen this l-value expression yet'
struct frk { float _Complex c; int x; };
struct faz { struct frk f; };
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep 'define signext i8 @f0(i32 %x) nounwind' %t &&
// RUN: grep 'define zeroext i8 @f1(i32 %x) nounwind' %t &&
// RUN: grep 'define void @f2(i8 signext %x) nounwind' %t &&
-// RUN: clang %s -emit-llvm -o %t &&
+// RUN: clang-cc %s -emit-llvm -o %t &&
int g();
-// RUN: clang -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
// RUN: grep '@g0_ext = extern_weak global i32' %t &&
extern int g0_ext __attribute__((weak));
-// RUN: clang -emit-llvm -o - %s | not grep "common"
+// RUN: clang-cc -emit-llvm -o - %s | not grep "common"
// This checks that the global won't be marked as common.
// (It shouldn't because it's being initialized).
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
const int globalInt = 1;
int globalIntWithFloat = 1.5f;
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
int A[10] = { 1,2,3,4,5 };
-// RUN: clang -emit-llvm %s -o - | not grep opaque
+// RUN: clang-cc -emit-llvm %s -o - | not grep opaque
enum teste1 test1f(void), (*test1)(void) = test1f;
struct tests2 test2f(), (*test2)() = test2f;
-// RUN: clang -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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 210" %t | count 1
-// RUN: clang < %s -emit-llvm
+// RUN: clang-cc < %s -emit-llvm
struct test {
int a;
};
-// RUN: clang -triple i386-unknown-unknown -emit-llvm %s -o %t &&
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t &&
void f1() {
// Scalars in braces.
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
void *test(int i)
{
-// RUN: clang -triple i386-unknown-unknown %s -emit-llvm -o - | grep "i32 @a(i32)"
+// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep "i32 @a(i32)"
int a();
int a(x) short x; {return x;}
-// RUN: clang -fmath-errno=1 -emit-llvm -o %t %s &&
+// RUN: clang-cc -fmath-errno=1 -emit-llvm -o %t %s &&
// RUN: grep "declare " %t | count 6 &&
// RUN: grep "declare " %t | grep "@llvm." | count 1 &&
-// RUN: clang -fmath-errno=0 -emit-llvm -o %t %s &&
+// RUN: clang-cc -fmath-errno=0 -emit-llvm -o %t %s &&
// RUN: grep "declare " %t | count 6 &&
// RUN: grep "declare " %t | grep -v "@llvm." | count 0
-// RUN: clang -emit-llvm %s -o - |grep internal
+// RUN: clang-cc -emit-llvm %s -o - |grep internal
// C99 6.2.2p3
// PR3425
-// RUN: clang %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep x86_fp80
+// RUN: clang-cc %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep x86_fp80
long double x = 0;
int checksize[sizeof(x) == 16 ? 1 : -1];
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
/* Sparc is not C99-compliant */
#if defined(sparc) || defined(__sparc__) || defined(__sparcv9)
-// RUN: clang -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
// RUN: grep '@_Z2f0i' %t &&
// RUN: grep '@_Z2f0l' %t &&
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
void *malloc(__SIZE_TYPE__ size) __attribute__ ((__nothrow__));
-// RUN: clang < %s -emit-llvm | grep internal | count 1
+// RUN: clang-cc < %s -emit-llvm | grep internal | count 1
// The two decls for 'a' should merge into one llvm GlobalVariable.
-// RUN: clang -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1 &&
-// RUN: clang -triple i386-apple-darwin9 -g -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-apple-darwin9 -g -emit-llvm -o %t %s &&
// RUN: grep define %t | count 1
#include <mmintrin.h>
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
// PR2910
struct sockaddr_un {
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
struct test;
typedef void (*my_func) (struct test *);
-// RUN: clang -emit-llvm %s -o - | grep _Z1fPA10_1X
+// RUN: clang-cc -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; }
// We also check _Bool and empty structures, as these can have annoying
// corner cases.
-// RUN: clang %s -triple i386-unknown-unknown -O3 -emit-llvm -o %t &&
+// RUN: clang-cc %s -triple i386-unknown-unknown -O3 -emit-llvm -o %t &&
// RUN: not grep '@g0' %t &&
-// RUN: clang %s -triple x86_64-unknown-unknown -O3 -emit-llvm -o %t &&
+// RUN: clang-cc %s -triple x86_64-unknown-unknown -O3 -emit-llvm -o %t &&
// RUN: not grep '@g0' %t &&
-// RUN: clang %s -triple ppc-unknown-unknown -O3 -emit-llvm -o %t &&
+// RUN: clang-cc %s -triple ppc-unknown-unknown -O3 -emit-llvm -o %t &&
// RUN: not grep '@g0' %t &&
// RUN: true
-// RUN: clang -S %s -o -
+// RUN: clang-cc -S %s -o -
typedef int Int;
-// RUN: clang -emit-llvm %s -o - | grep "icmp ult"
+// RUN: clang-cc -emit-llvm %s -o - | grep "icmp ult"
int a(char* a, char* b) {return a<b;}
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
int test(void* i)
{
-// RUN: clang -emit-llvm -o %t %s &&
+// RUN: clang-cc -emit-llvm -o %t %s &&
// RUN: grep '@g0 = external hidden constant i32' %t &&
// RUN: grep '@g1 = hidden constant i32 1' %t
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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)
-// RUN: clang -triple i386-unknown-unknown --emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis > %t &&
+// RUN: clang-cc -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
-// RUN: clang -emit-llvm %s -o %t
+// RUN: clang-cc -emit-llvm %s -o %t
char *globalString = "abc";
char *globalStringArray[5] = { "123", "abc" };
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s
// PR3442
-// RUN: clang < %s -emit-llvm
+// RUN: clang-cc < %s -emit-llvm
void test1(int x) {
switch (x) {
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
static int staticfun(void);
int (*staticuse1)(void) = staticfun;
-// RUN: clang %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10"
+// RUN: clang-cc %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10"
static int i;
int*j=&i;
-// RUN: clang -emit-llvm < %s
+// RUN: clang-cc -emit-llvm < %s
int a() {static union{int a;} r[2] = {1,2};return r[1].a;}
-// RUN: clang -emit-llvm -o - %s | not grep "zeroinitializer"
+// RUN: clang-cc -emit-llvm -o - %s | not grep "zeroinitializer"
struct s {
int a;
-// RUN: clang -arch i386 -emit-llvm -o %t %s &&
+// RUN: clang-cc -arch i386 -emit-llvm -o %t %s &&
// RUN: grep "g.b = internal global i8. getelementptr" %t &&
struct AStruct {
-// RUN: clang -emit-llvm < %s | grep 'fastcallcc' | count 4
-// RUN: clang -emit-llvm < %s | grep 'stdcallcc' | count 4
+// RUN: clang-cc -emit-llvm < %s | grep 'fastcallcc' | count 4
+// RUN: clang-cc -emit-llvm < %s | grep 'stdcallcc' | count 4
void __attribute__((fastcall)) f1(void);
void __attribute__((stdcall)) f2(void);
-// RUN: clang -emit-llvm %s -o %t &&
+// RUN: clang-cc -emit-llvm %s -o %t &&
// RUN: grep 'internal constant \[10 x i8\]' %t &&
// RUN: not grep -F "[5 x i8]" %t &&
// RUN: not grep "store " %t
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
int main() {
char a[10] = "abc";
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
struct S {int a, b;} x;
void a(struct S* b) {*b = (r(), x);}
-// RUN: clang -emit-llvm %s -o - | grep 'call.*llvm.memcpy'
+// RUN: clang-cc -emit-llvm %s -o - | grep 'call.*llvm.memcpy'
struct x { int a[100]; };
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
typedef struct _zend_ini_entry zend_ini_entry;
struct _zend_ini_entry {
-// RUN: clang -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang < %s -emit-llvm > %t1 -triple=i686-apple-darwin9
+// RUN: clang-cc < %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, i8, i16, i32 }>" %t1 &&
-// RUN: clang -triple i386-unknown-unknown %s -emit-llvm -o -
+// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o -
struct {
int x;
-// RUN: clang %s -emit-llvm-bc -o - | opt -std-compile-opts -disable-output
+// RUN: clang-cc %s -emit-llvm-bc -o - | opt -std-compile-opts -disable-output
int foo(int i) {
int j = 0;
-// RUN: clang -emit-llvm < %s -triple=i686-apple-darwin9 | grep "global \[1 x i32\]"
+// RUN: clang-cc -emit-llvm < %s -triple=i686-apple-darwin9 | grep "global \[1 x i32\]"
int r[];
int (*a)[] = &r;
-// RUN: clang -emit-llvm < %s
+// RUN: clang-cc -emit-llvm < %s
// PR2414
struct mad_frame{};
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
typedef struct { int i; } Value;
typedef Value *PValue;
-// RUN: clang -emit-llvm <%s
+// RUN: clang-cc -emit-llvm <%s
struct FileName {
struct FileName *next;
-// RUN: clang -emit-llvm < %s -o -
+// RUN: clang-cc -emit-llvm < %s -o -
// A nice and complicated initialization example with unions from Python
typedef int Py_ssize_t;
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
union u_tag {
int a;
-// RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
-// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
+// RUN: clang-cc -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
+// RUN: clang-cc -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
-// RUN: clang -emit-llvm %s -o - | grep "align 16" | count 2
+// RUN: clang-cc -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;
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang-cc -emit-llvm %s -o -
typedef short __v4hi __attribute__ ((__vector_size__ (8)));
void f()
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
int b(char* x);
-// RUN: clang -emit-llvm < %s | grep volatile | count 25
+// RUN: clang-cc -emit-llvm < %s | grep volatile | count 25
// The number 26 comes from the current codegen for volatile loads;
// if this number changes, it's not necessarily something wrong, but
-// RUN: clang -emit-llvm < %s | grep common
+// RUN: clang-cc -emit-llvm < %s | grep common
int i;
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang-cc %s -emit-llvm -o -
int bar();
int foo() {
-// RUN: clang -emit-llvm -o - -fwritable-strings %s
+// RUN: clang-cc -emit-llvm -o - -fwritable-strings %s
int main() {
char *str = "abc";
-// RUN: clang %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1
+// RUN: clang-cc %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1
// RUN: grep "ax" %t1 &&
// RUN: grep "bx" %t1 &&
// RUN: grep "cx" %t1 &&
-// RUN: clang -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
-// RUN: clang %s -emit-llvm -o %t
+// RUN: clang-cc %s -emit-llvm -o %t
int* a = __null;
int b = __null;
-// RUN: clang -emit-llvm -x c++ < %s
+// RUN: clang-cc -emit-llvm -x c++ < %s
void f(int x) {
if (x != 0) return;
-// RUN: clang -emit-llvm %s -o %t &&
+// RUN: clang-cc -emit-llvm %s -o %t &&
// FIXME: This test is intentionally trivial, because we can't yet
// CodeGen anything real in C++.
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@protocol P @end
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface Object
- (id) alloc;
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface INTF
{
-// RUN: clang -fblocks -fno-__block -fnext-runtime --emit-llvm -o %t %s -verify
+// RUN: clang-cc -fblocks -fno-__block -fnext-runtime --emit-llvm -o %t %s -verify
@class Foo;
@protocol P;
-// RUN: clang -emit-llvm -fblocks -S -o - %s
+// RUN: clang-cc -emit-llvm -fblocks -S -o - %s
// rdar://6676764
struct S {
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface BASE
+ (int) BaseMeth;
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface Test { }
+ (Test *)crash;
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s
@interface I0 {
struct { int a; } a;
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@interface Int1 @end
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
id a = @"Hello World!";
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
@interface Object
- (id)new;
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
#include <stdio.h>
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
#include <stdio.h>
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep -e "{Base=b2b3b4b5}" %t | count 1 &&
// RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -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 &&
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep -e "\^i" %t | count 1 &&
// RUN: grep -e "\[0i\]" %t | count 1
-// RUN: clang -emit-llvm -o - %s -O2 | grep "ret i32 1"
+// RUN: clang-cc -emit-llvm -o - %s -O2 | grep "ret i32 1"
int a() {
return @encode(int) == @encode(int);
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -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 &&
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s
@interface BASE {
@private
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
__attribute__((visibility("hidden")))
@interface Hidden
-// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s
-// RUNX: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s
+// RUNX: clang-cc -emit-llvm -o %t %s
@interface A
-(void) setOk:(int)arg;
-// RUN: clang -triple i386-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-apple-darwin9 -fnext-runtime -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 -triple i386-apple-darwin9 -DWITH_IMPL -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-apple-darwin9 -DWITH_IMPL -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep '.lazy_reference .objc_class_name_Root' %t | count 1
@interface Root
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
void f0(id a) {
// This should have an implicit cast
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
#include <stdio.h>
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
typedef struct {
int x;
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
@interface Object
- (id) new;
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s
@interface NSObject
@end
// 32-bit
// RUNX: llvm-gcc -m32 -emit-llvm -S -o %t %s &&
-// RUN: clang -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -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 &&
// 64-bit
-// RUNX: clang -triple i386-apple-darwin9 -emit-llvm -o %t %s &&
+// RUNX: clang-cc -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 &&
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep -e "T@\\\\22NSString\\\\22" %t
@interface NSString @end
-// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -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 &&
-// RUN: clang -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s
@interface I0 {
I0 *_f0;
-// RUN: clang -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
@interface I {
__attribute__((objc_gc(strong))) int *i_IdocumentIDs;
-// RUN: clang -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
@interface I {
__attribute__((objc_gc(strong))) signed long *_documentIDs;
-// RUN: clang -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -fobjc-gc -emit-llvm -o %t %s
@interface PBXTarget
{
-// RUN: clang -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
+// RUN: clang-cc -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
@class NSObject;
@interface Foo {
// rdar://6657613
-// RUN: clang -emit-llvm %s -o %t &&
+// RUN: clang-cc -emit-llvm %s -o %t &&
@class C;
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
@interface A
@end
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface Object
- (id) new;
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
typedef struct {
unsigned f0;
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
@protocol NSObject
- (void *)description;
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface Object
- (id) new;
-// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s
+// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s
// RUN: grep -e "SiSetOtherThings:" %t
@interface A
-// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s
#include <stdio.h>
-// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s &&
+// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s &&
// RUNX: llvm-gcc -S -emit-llvm -o %t %s &&
// No object generated
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1 &&
-// RUN: clang -DWITHDEF -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -DWITHDEF -fnext-runtime -emit-llvm -o %t %s &&
// RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
id objc_msgSend(int x);
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
@interface SUPER
+ (void)Meth;
-// RUN: clang -emit-llvm -o %t %s
+// RUN: clang-cc -emit-llvm -o %t %s
@interface B
{
-// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s -O2 &&
+// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s -O2 &&
// RUN: grep 'ret i32' %t | count 1 &&
// RUN: grep 'ret i32 1' %t | count 1
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s
// Test that meta-data for ivar lists with unnamed bitfield are generated.
//
@interface Foo {
-// RUN: clang --fsyntax-only %s &&
-// RUN: clang --ast-print %s &&
-// RUN: clang --ast-dump %s
+// RUN: clang-cc --fsyntax-only %s &&
+// RUN: clang-cc --ast-print %s &&
+// RUN: clang-cc --ast-dump %s
#include "c-language-features.inc"
-// RUN: clang --fsyntax-only %s &&
-// RUN: clang --ast-print %s &&
-// RUN: clang --ast-dump %s
+// RUN: clang-cc --fsyntax-only %s &&
+// RUN: clang-cc --ast-print %s &&
+// RUN: clang-cc --ast-dump %s
#include "objc-language-features.inc"
-// RUN: clang -triple i386-unknown-unknown -DIRGENABLE_GNU -DIRGENABLE -fgnu-runtime -emit-llvm -o %t %s &&
-// RUN: clang -triple i386-unknown-unknown -DIRGENABLE_GNU -DIRGENABLE -g -fgnu-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -DIRGENABLE_GNU -DIRGENABLE -fgnu-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -triple i386-unknown-unknown -DIRGENABLE_GNU -DIRGENABLE -g -fgnu-runtime -emit-llvm -o %t %s &&
// FIXME: Remove once GNU can IRgen everything.
-// RUN: not clang -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s
+// RUN: not clang-cc -triple i386-unknown-unknown -fgnu-runtime -emit-llvm -o %t %s
#include "objc-language-features.inc"
-// RUN: clang -fnext-runtime -emit-llvm -o %t %s &&
-// RUN: clang -g -fnext-runtime -emit-llvm -o %t %s
+// RUN: clang-cc -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -fnext-runtime -emit-llvm -o %t %s
#include "objc-language-features.inc"
-// RUN: clang -triple i386-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -triple i386-unknown-unknown -emit-llvm-bc -o %t %s &&
-// RUN: clang -triple i386-unknown-unknown -g -emit-llvm-bc -o %t %s &&
-// RUN: clang -triple x86_64-unknown-unknown -emit-llvm-bc -o %t %s &&
-// RUN: clang -triple x86_64-unknown-unknown -g -emit-llvm-bc -o %t %s
+// 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
#include "c-language-features.inc"
// RUN: rm -rf %t &&
-// RUN: clang --html-diags=%t -checker-simple %s
+// RUN: clang-cc --html-diags=%t -checker-simple %s
void f0(int x) {
int *p = &x;
-// RUN: clang -emit-html -o %t %s
+// RUN: clang-cc -emit-html -o %t %s
#include "c-language-features.inc"
-// RUN: clang --parse-noop %s &&
-// RUN: clang --parse-print-callbacks %s
+// RUN: clang-cc --parse-noop %s &&
+// RUN: clang-cc --parse-print-callbacks %s
#include "c-language-features.inc"
-// RUN: clang --parse-noop %s &&
-// RUN: clang --parse-print-callbacks %s
+// RUN: clang-cc --parse-noop %s &&
+// RUN: clang-cc --parse-print-callbacks %s
#include "objc-language-features.inc"
// DISABLED:
-// R U N: clang -fsyntax-only --serialize %s
+// R U N: clang-cc -fsyntax-only --serialize %s
// RUN:
#include "c-language-features.inc"
// DISABLED:
+// R U N: clang-cc -fsyntax-only --serialize %s
// RUN:
-// R U N: clang -fsyntax-only --serialize %s
#include "objc-language-features.inc"
-// RUN: clang -g -triple i686-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple i686-pc-linux-gnu -emit-llvm -o %t %s &&
-// RUN: clang -g -triple i686-unknown-dragonfly -emit-llvm -o %t %s &&
-// RUN: clang -g -triple i686-unknown-win32 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple i686-apple-darwin9 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple x86_64-pc-linux-gnu -emit-llvm -o %t %s &&
-// RUN: clang -g -triple x86_64-apple-darwin9 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple ppc-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple ppc-apple-darwin9 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple ppc64-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple ppc64-apple-darwin9 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple armv6-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple armv6-apple-darwin9 -emit-llvm -o %t %s &&
-// RUN: clang -g -triple sparc-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: clang -g -triple sparc-unknown-solaris -emit-llvm -o %t %s &&
-// RUN: clang -g -triple pic16-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple i686-unknown-unknown -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-win32 -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple i686-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple x86_64-unknown-unknown -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-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple ppc-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple ppc-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple ppc64-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple ppc64-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 armv6-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: clang-cc -g -triple sparc-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 pic16-unknown-unknown -emit-llvm -o %t %s &&
// RUN: true
-// RUN: clang -fsyntax-only -v %s
+// RUN: clang-cc -fsyntax-only -v %s
// RUN: clang-driver -ccc-echo -o %t %s 2> %t.log &&
// Make sure we used clang.
-// RUN: grep 'clang" .*hello.c' %t.log &&
+// RUN: grep 'clang-cc" .*hello.c' %t.log &&
// RUN: %t > %t.out &&
// RUN: grep "I'm a little driver, short and stout." %t.out
// Test transparent PTH support.
// RUN: clang-driver -x c-header %s -o %t.h.pch -### 2> %t.log &&
-// RUN: grep '".*/clang" .* "-o" ".*\.h\.pch" "-x" "c-header" ".*pth\.c"' %t.log &&
+// RUN: grep '".*/clang-cc" .* "-o" ".*\.h\.pch" "-x" "c-header" ".*pth\.c"' %t.log &&
// RUN: touch %t.h.pth &&
// RUN: clang-driver -E -include %t.h %s -### 2> %t.log &&
-// RUN: grep '".*/clang" .*"-include-pth" ".*\.h\.pth" .*"-x" "c" ".*pth\.c"' %t.log
+// RUN: grep '".*/clang-cc" .*"-include-pth" ".*\.h\.pth" .*"-x" "c" ".*pth\.c"' %t.log
// rdar://6533411
-// RUN: clang -MD -MF %t.d -x c /dev/null
+// RUN: clang-cc -MD -MF %t.d -x c /dev/null
-// RUN: clang -verify --rewrite-macros -o %t %s &&
+// RUN: clang-cc -verify --rewrite-macros -o %t %s &&
#define A(a,b) a ## b
-// RUN: clang -E - < /dev/null > %t
+// RUN: clang-cc -E - < /dev/null > %t
// RUN: grep '<built-in>' %t
-// RUN: clang %s -emit-llvm -o - | grep 0x3BFD83C940000000 | count 2 &&
-// RUN: clang %s -emit-llvm -o - | grep 2.000000e+32 | count 2
+// RUN: clang-cc %s -emit-llvm -o - | grep 0x3BFD83C940000000 | count 2 &&
+// RUN: clang-cc %s -emit-llvm -o - | grep 2.000000e+32 | count 2
float F = 1e-19f;
double D = 2e32;
-// RUN: clang -E %s 2>&1 | not grep error
+// RUN: clang-cc -E %s 2>&1 | not grep error
#if 0
"
/*
- RUN: clang -E -trigraphs %s | grep bar &&
- RUN: clang -E -trigraphs %s | grep foo &&
- RUN: clang -E -trigraphs %s | not grep abc &&
- RUN: clang -E -trigraphs %s | not grep xyz &&
- RUN: clang -fsyntax-only -trigraphs -verify %s
+ 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
*/
// This is a simple comment, /*/ does not end a comment, the trailing */ does.
-/* RUN: clang -std=c90 -fsyntax-only %s -verify -pedantic-errors
+/* RUN: clang-cc -std=c90 -fsyntax-only %s -verify -pedantic-errors
*/
enum { cast_hex = (long) (
-/* RUN: clang -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s
*/
int x = 000000080; /* expected-error {{invalid digit}} */
-// RUN: clang -fsyntax-only -verify -std=c++0x %s 2>&1
+// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s 2>&1
int static_assert; /* expected-error {{expected unqualified-id}} */
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
int static_assert;
-// RUN: clang -fsyntax-only -verify < %s
+// RUN: clang-cc -fsyntax-only -verify < %s
%:include <stdio.h>
-// RUN: clang -dump-tokens %s 2> %t &&
+// RUN: clang-cc -dump-tokens %s 2> %t &&
// RUN: grep "identifier '\$A'" %t
-// RUN: clang -dump-tokens -x assembler-with-cpp %s 2> %t &&
+// RUN: clang-cc -dump-tokens -x assembler-with-cpp %s 2> %t &&
// RUN: grep "identifier 'A'" %t
// PR3808
-// RUN: clang -E -trigraphs %s | grep -- ' ->' &&
-// RUN: clang -E -trigraphs %s 2>&1 | grep 'backslash and newline separated by space' &&
-// RUN: clang -E -trigraphs %s 2>&1 | grep 'trigraph converted'
+// 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'
// This is an ugly way to spell a -> token.
-??/
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
#ifndef XVID_AUTO_INCLUDE
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
float X = 1.17549435e-38F;
float Y = 08.123456;
-/* RUN: clang -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s
*/
# define XRECORD(x, c_name) e##c (x, __LINE__)
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// Lexer diagnostics shouldn't be included in #pragma mark.
#pragma mark Mike's world
-/* RUN: clang -pedantic -std=gnu89 -fsyntax-only -verify %s
+/* RUN: clang-cc -pedantic -std=gnu89 -fsyntax-only -verify %s
rdar://6096838
*/
-/* RUN: clang -fsyntax-only -verify %s &&
- * RUN: clang -std=gnu89 -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s &&
+ * RUN: clang-cc -std=gnu89 -fsyntax-only -verify %s
rdar://6096838
*/
-// RUN: clang -E -x c -o %t %s &&
+// RUN: clang-cc -E -x c -o %t %s &&
// RUN: grep 'IDENT.2' %t
IDENT.2
-// RUN: clang -E %s 2>&1 | not grep error
+// RUN: clang-cc -E %s 2>&1 | not grep error
` ` ` `
-// RUN: clang -fsyntax-only %s 2>&1 | not grep keyXXXX
+// RUN: clang-cc -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.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stdio.h>
-// RUN: clang %s -emit-html -o -
+// RUN: clang-cc %s -emit-html -o -
// rdar://6562329
#line 42 "foo.c"
-// RUN: clang -verify -parse-noop %t
+// RUN: clang-cc -verify -parse-noop %t
void add_attribute(id) int id; {}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int foo() {
{
-// RUN: clang -fsyntax-only -verify -fms-extensions -x=objective-c++ %s
+// RUN: clang-cc -fsyntax-only -verify -fms-extensions -x=objective-c++ %s
__stdcall int func0();
int __stdcall func();
typedef int (__cdecl *tptr)();
-// RUN: clang %s
+// RUN: clang-cc %s
int abc (const float x) {
return 1;
}
-/* RUN: clang -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s
*/
int foo(int A) { /* expected-note {{previous definition is here}} */
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
typedef struct foo foo;
void blah(int foo) {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f1() {
asm ("ret" : : :); // expected-error {{expected string literal}}
-// RUN: clang -fsyntax-only -verify %s -pedantic -std=c99
+// RUN: clang-cc -fsyntax-only -verify %s -pedantic -std=c99
int __attribute__(()) x; // expected-warning {{extension used}}
-/* RUN: clang -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s
*/
int foo() {
break; /* expected-error {{'break' statement not in loop or switch statement}} */
-// RUN: clang -fsyntax-only -verify -parse-noop %s
+// RUN: clang-cc -fsyntax-only -verify -parse-noop %s
#if 0
#include <stdio.h>
void _Block_byref_release(void*src){}
-// RUN: clang -fsyntax-only -verify -parse-noop -fblocks %s
+// RUN: clang-cc -fsyntax-only -verify -parse-noop -fblocks %s
struct blockStruct {
int (^a)(float, int);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct foo { int a; };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern int funcInt(int);
extern float funcFloat(float);
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
void bla1() {
struct XXX;
int XXX;
-// RUN: clang -ast-print %s
+// RUN: clang-cc -ast-print %s
#include <stddef.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Subclass
+ (int)magicNumber;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int @interface bla ; // expected-error {{cannot combine with previous 'int' declaration specifier}}
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct foo {
int a;
};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int main() {
char *s;
s = (char []){"whatever"};
-// RUN: clang %s -std=c90 -verify &&
-// RUN: clang %s -std=c99
+// RUN: clang-cc %s -std=c90 -verify &&
+// RUN: clang-cc %s -std=c99
int f (int z) {
if (z + sizeof (enum {a})) // expected-note {{previous definition is here}}
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
bool a = true;
bool b = false;
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
char *const_cast_test(const char *var)
{
char postfix_expr_test()
{
return reinterpret_cast<char*>(0xdeadbeef)[0];
-}
\ No newline at end of file
+}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class C;
class C {
public:
-// RUN: clang -parse-noop -verify %s
+// RUN: clang-cc -parse-noop -verify %s
void f() {
int a;
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
struct X { };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern char *bork;
char *& bar = bork;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Errors
export class foo { }; // expected-error {{expected template}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f()
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// FIXME: This should really include <typeinfo>, but we don't have that yet.
namespace std {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
static void test() {
int *pi;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A {};
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
void f(...) {
int g(int(...));
-// RUN: clang -fsyntax-only -verify -std=c++0x %s
+// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s
int && r1(int &&a);
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic
extern int a1[];
-// RUN: clang -fsyntax-only %s -verify -pedantic
+// RUN: clang-cc -fsyntax-only %s -verify -pedantic
int X[] = {
[4]4, // expected-warning {{use of GNU 'missing =' extension in designator}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int main(void) {
const char ch = @encode(char *)[2];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol MyProto1
@optional
-// RUN: clang -parse-noop %s
+// RUN: clang-cc -parse-noop %s
void test1() {
if (sizeof (int){ 1}); // sizeof compound literal
-// RUN: clang -parse-noop %s
+// RUN: clang-cc -parse-noop %s
void test1() {
@"s"; // expected-warning {{expression result unused}}
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
// Top level extension marker.
-/* RUN: clang %s -ast-print
+/* RUN: clang-cc %s -ast-print
*/
void foo() {
-/* RUN: clang -fsyntax-only -verify %s
+/* RUN: clang-cc -fsyntax-only -verify %s
*/
void foo() {
-// RUN: clang -fsyntax-only -verify --std=c90 %s
+// RUN: clang-cc -fsyntax-only -verify --std=c90 %s
int f (int z)
{
-// RUN: clang -fsyntax-only -verify --std=c99 %s
+// RUN: clang-cc -fsyntax-only -verify --std=c99 %s
int f (int z)
{
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
_Complex double X;
void test1(int c) {
X = 5;
-// RUN: clang %s -parse-noop
+// RUN: clang-cc %s -parse-noop
@interface MyObject
- (void) bycopy : (int) woodo, ... ;
- (void) break : (int) woodo, ... ;
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
typedef int Object;
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
typedef int Object;
-// RUN: clang -ast-print %s
+// RUN: clang-cc -ast-print %s
@protocol P1 @end
@protocol P2 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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));
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
typedef struct objc_class *Class;
typedef struct objc_object {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct objc_class *Class;
typedef struct objc_object {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct objc_class *Class;
typedef struct objc_object {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
ce MyList // expected-error {{invalid token after top level declarator}}
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
static int test_NSURLGetResourceValueForKey( id keys )
{
-// RUN: clang -fsyntax-only -verify %s -pedantic
+// RUN: clang-cc -fsyntax-only -verify %s -pedantic
// rdar://5707001
@interface NSNumber;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// Test features and error recovery for objc interfaces.
-// RUN: clang %s -parse-noop
+// RUN: clang-cc %s -parse-noop
int main ()
{
int i,j;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int main()
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@end // expected-warning {{@end must appear in an @implementation context}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MyClass {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// FIXME: This is a horrible error message here. Fix.
int @"s" = 5; // expected-error {{prefix attribute must be}}
-// RUN: clang -fsyntax-only -verify %s &&
-// RUN: clang -fsyntax-only -verify -x objective-c++ %s
+// RUN: clang-cc -fsyntax-only -verify %s &&
+// RUN: clang-cc -fsyntax-only -verify -x objective-c++ %s
void * proc();
@interface NSConstantString
-// RUN: clang -ast-print %s
+// RUN: clang-cc -ast-print %s
@protocol P1 @end
@protocol P2 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f (int p[]) { p++; }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int *test1(int *a) { return a + 1; }
int *test2(int *a) { return 1 + a; }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int test() {
void *vp;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Note that this puts the expected lines before the directives to work around
// limitations in the -verify mode.
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -verify -fsyntax-only %s
__attribute__((deprecated)) @class B; // expected-error {{prefix attribute must be followed by an interface or protocol}}
-// RUN: clang %s
+// RUN: clang-cc %s
void functionPromotion(void f(char *const []));
void arrayPromotion(char * const argv[]);
-// RUN: clang -fsyntax-only -verify -pedantic -fblocks %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic -fblocks %s
// PR2241
float test2241[] = {
-// RUN: clang -parse-noop %s
+// RUN: clang-cc -parse-noop %s
int main() {
SEL s = @selector(retain);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int test1() {
{ ; { ;;}} ;;
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
// C99 6.7.2.3p11
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
int x(a) int a; {return a;}
int y(b) int b; {return a;} // expected-error {{use of undeclared identifier}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int TInt;
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
// Test the X can be overloaded inside the struct.
typedef int X;
-// RUN: clang %s -E 2>&1 | grep 'DO_PRAGMA (STR' &&
-// RUN: clang %s -E 2>&1 | grep '7:3'
+// RUN: clang-cc %s -E 2>&1 | grep 'DO_PRAGMA (STR' &&
+// RUN: clang-cc %s -E 2>&1 | grep '7:3'
#define DO_PRAGMA _Pragma
#define STR "GCC dependency \"parse.y\"")
-// RUN: clang %s -E | not grep 'scratch space'
+// RUN: clang-cc %s -E | not grep 'scratch space'
#define push _Pragma ("pack(push)")
push
-// RUN: clang %s -E | grep '#pragma x y z' &&
-// RUN: clang %s -E | grep '#pragma a b c'
+// RUN: clang-cc %s -E | grep '#pragma x y z' &&
+// RUN: clang-cc %s -E | grep '#pragma a b c'
_Pragma("x y z")
_Pragma("a b c")
-// RUN: clang -Eonly %s 2>&1 | grep error | wc -l | grep 1 &&
-// RUN: clang -Eonly %s 2>&1 | grep 7:4 | wc -l | grep 1
+// RUN: clang-cc -Eonly %s 2>&1 | grep error | wc -l | grep 1 &&
+// RUN: clang-cc -Eonly %s 2>&1 | grep 7:4 | wc -l | grep 1
#define BAR _Pragma ("GCC poison XYZW") XYZW /*NO ERROR*/
XYZW // NO ERROR
-// RUN: clang %s -E 2>&1 | grep 'system_header ignored in main file'
+// RUN: clang-cc %s -E 2>&1 | grep 'system_header ignored in main file'
_Pragma ("GCC system_header")
-// RUN: clang -E %s 2>&1 | grep 'file not found'
+// RUN: clang-cc -E %s 2>&1 | grep 'file not found'
#define DO_PRAGMA _Pragma
DO_PRAGMA ("GCC dependency \"blahblabh\"")
-// RUN: clang -x assembler-with-cpp -E %s > %t &&
+// RUN: clang-cc -x assembler-with-cpp -E %s > %t &&
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
-// RUN: clang %s -E | grep "^ 4" &&
+// RUN: clang-cc %s -E | grep "^ 4" &&
#define FOO __LINE__
FOO
// PR3579 - This should expand to the __LINE__ of the ')' not of the X.
-// RUN: clang %s -E | grep "^A 13"
+// RUN: clang-cc %s -E | grep "^A 13"
#define X() __LINE__
-// RUN: clang -E %s | grep -F 'char p[] = "x ## y";'
+// RUN: clang-cc -E %s | grep -F 'char p[] = "x ## y";'
#define hash_hash # ## #
#define mkstr(a) # a
#define in_between(a) mkstr(a)
// Example from C99 6.10.3.4p5
-// RUN: clang -E %s | grep -F 'f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);' &&
-// RUN: clang -E %s | grep -F 'f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);' &&
-// RUN: clang -E %s | grep -F 'int i[] = { 1, 23, 4, 5, };' &&
-// RUN: clang -E %s | grep -F 'char c[2][6] = { "hello", "" };'
+// RUN: clang-cc -E %s | grep -F 'f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);' &&
+// RUN: clang-cc -E %s | grep -F 'f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);' &&
+// RUN: clang-cc -E %s | grep -F 'int i[] = { 1, 23, 4, 5, };' &&
+// RUN: clang-cc -E %s | grep -F 'char c[2][6] = { "hello", "" };'
#define x 3
// Example from C99 6.10.3.4p6
-// RUN: clang -E %s | grep -F 'printf("x" "1" "= %d, x" "2" "= s" x1, x2);' &&
-// RUN: clang -E %s | grep 'fputs("strncmp(\\"abc\\\\0d\\" \\"abc\\", .\\\\4.) == 0" ": @\\n", s);' &&
-// RUN: clang -E %s | grep -F 'include "vers2.h"' &&
-// RUN: clang -E %s | grep -F '"hello";' &&
-// RUN: clang -E %s | grep -F '"hello" ", world"'
+// RUN: clang-cc -E %s | grep -F 'printf("x" "1" "= %d, x" "2" "= s" x1, x2);' &&
+// RUN: clang-cc -E %s | grep 'fputs("strncmp(\\"abc\\\\0d\\" \\"abc\\", .\\\\4.) == 0" ": @\\n", s);' &&
+// RUN: clang-cc -E %s | grep -F 'include "vers2.h"' &&
+// RUN: clang-cc -E %s | grep -F '"hello";' &&
+// RUN: clang-cc -E %s | grep -F '"hello" ", world"'
#define str(s) # s
#define xstr(s) str(s)
// Example from C99 6.10.3.4p7
-// RUN: clang -E %s | grep -F 'int j[] = { 123, 45, 67, 89,' &&
-// RUN: clang -E %s | grep -F '10, 11, 12, };'
+// RUN: clang-cc -E %s | grep -F 'int j[] = { 123, 45, 67, 89,' &&
+// RUN: clang-cc -E %s | grep -F '10, 11, 12, };'
#define t(x,y,z) x ## y ## z
int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
// Example from C99 6.10.3.4p9
-// RUN: clang -E %s | grep -F 'fprintf(stderr, "Flag");' &&
-// RUN: clang -E %s | grep -F 'fprintf(stderr, "X = %d\n", x);' &&
-// RUN: clang -E %s | grep -F 'puts("The first, second, and third items.");' &&
-// RUN: clang -E %s | grep -F '((x>y)?puts("x>y"): printf("x is %d but y is %d", x, y));'
+// RUN: clang-cc -E %s | grep -F 'fprintf(stderr, "Flag");' &&
+// RUN: clang-cc -E %s | grep -F 'fprintf(stderr, "X = %d\n", x);' &&
+// RUN: clang-cc -E %s | grep -F 'puts("The first, second, and third items.");' &&
+// RUN: clang-cc -E %s | grep -F '((x>y)?puts("x>y"): printf("x is %d but y is %d", x, y));'
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define showlist(...) puts(#__VA_ARGS__)
-// RUN: clang -E %s
+// RUN: clang-cc -E %s
#include <limits.h>
-// RUN: clang -E -C %s | grep '^// foo$' &&
-// RUN: clang -E -C %s | grep -F '^/* bar */$'
+// RUN: clang-cc -E -C %s | grep '^// foo$' &&
+// RUN: clang-cc -E -C %s | grep -F '^/* bar */$'
// foo
/* bar */
-// RUN: clang %s -E -CC -pedantic 2>&1 | grep -v '^/' | not grep warning
+// RUN: clang-cc %s -E -CC -pedantic 2>&1 | grep -v '^/' | not grep warning
#if 1 /*bar */
-// RUN: clang -E -C %s | grep '^boo bork bar // zot$' &&
-// RUN: clang -E -CC %s | grep -F '^boo bork /* blah*/ bar // zot$' &&
-// RUN: clang -E %s | grep '^boo bork bar$'
+// RUN: clang-cc -E -C %s | grep '^boo bork bar // zot$' &&
+// RUN: clang-cc -E -CC %s | grep -F '^boo bork /* blah*/ bar // zot$' &&
+// RUN: clang-cc -E %s | grep '^boo bork bar$'
#define FOO bork // blah
-// RUN: clang -DA -DB -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -DB -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if defined(A) and defined(B)
#define X 37
#else
-// RUN: clang -DA=1 -DB=2 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if A bitand B
#define X 37
#else
-// RUN: clang -DA=1 -DB=1 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if A bitor B
#define X 37
#else
-// RUN: clang -DA=1 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=0 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if compl 0 bitand A
#define X 37
#else
-// RUN: clang -DA=1 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 37 == 37'
+// RUN: clang-cc -DA=1 -E %s | grep 'int a = 927 == 927' &&
+// RUN: clang-cc -E %s | grep 'int a = 37 == 37'
#if not defined(A)
#define X 37
#else
-// RUN: clang -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -DA=1 -DB=2 -E %s | grep 'int a = 37 == 37'
+// 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'
#if A not_eq B
#define X 37
#else
-// RUN: not clang %s -E &&
-// RUN: clang %s -E -fno-operator-names
+// RUN: not clang-cc %s -E &&
+// RUN: clang-cc %s -E -fno-operator-names
// Not valid in C++ unless -fno-operator-names is passed.
#define and foo
-// RUN: clang -E %s | grep 'a: "and"'
+// RUN: clang-cc -E %s | grep 'a: "and"'
#define X(A) #A
-// RUN: clang -DA -DB -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DB -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if defined(A) or defined(B)
#define X 37
#else
-/* RUN: clang -E %s -x=c++ | grep block_1 &&
- RUN: clang -E %s -x=c++ | not grep block_2 &&
- RUN: clang -E %s -x=c | not grep block
+/* 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
*/
#if true
-// RUN: clang -DA=1 -DB=1 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -DA=0 -DB=1 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=1 -DB=0 -E %s | grep 'int a = 37 == 37' &&
-// RUN: clang -DA=0 -DB=0 -E %s | grep 'int a = 927 == 927' &&
-// RUN: clang -E %s | grep 'int a = 927 == 927'
+// 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'
#if A xor B
#define X 37
#else
-// RUN: clang -E %s 2>&1 | not grep "warning\|error"
+// RUN: clang-cc -E %s 2>&1 | not grep "warning\|error"
#if 0
-// RUN: clang -E -dM %s -o %t &&
+// RUN: clang-cc -E -dM %s -o %t &&
// Space even without expansion tokens
// RUN: grep "#define A(x) " %t &&
-// RUN: clang -dump-tokens %s 2>&1 | grep "Spelling=.*dumptokens_phyloc.c:3:20"
+// RUN: clang-cc -dump-tokens %s 2>&1 | grep "Spelling=.*dumptokens_phyloc.c:3:20"
#define TESTPHYLOC 10
// Comma is not allowed in C89
-// RUN: not clang -E %s -std=c89 -pedantic-errors &&
+// RUN: not clang-cc -E %s -std=c89 -pedantic-errors &&
// Comma is allowed if unevaluated in C99
-// RUN: clang -E %s -std=c99 -pedantic-errors
+// RUN: clang-cc -E %s -std=c99 -pedantic-errors
// PR2279
-// RUN: not clang -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' &&
-// RUN: not clang -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' &&
-// RUN: not clang -E %s 2>&1 | grep ':14: error: expected end of line in preprocessor expression'
+// 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'
// PR2220
#if 1 * * 2
-/* RUN: clang -E %s -DNO_ERRORS -Werror -Wundef &&
- RUN: not clang -E %s
+/* RUN: clang-cc -E %s -DNO_ERRORS -Werror -Wundef &&
+ RUN: not clang-cc -E %s
*/
#ifdef NO_ERRORS
-// RUN: clang %s -E 2>&1 | grep warning | wc -l | grep 2
+// RUN: clang-cc %s -E 2>&1 | grep warning | wc -l | grep 2
#define INTMAX_MIN (-9223372036854775807LL -1)
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
// The preprocessor shouldn't warn about extensions within macro bodies that
// aren't expanded.
-/* RUN: clang -E -P %s | grep f
+/* RUN: clang-cc -E -P %s | grep f
*/
#include "function_macro_file.h"
// The 1 and # should not go on the same line.
-// RUN: clang %s -E | not grep "1 #" &&
-// RUN: clang %s -E | grep '^1$' &&
-// RUN: clang %s -E | grep '^ #$'
+// RUN: clang-cc %s -E | not grep "1 #" &&
+// RUN: clang-cc %s -E | grep '^1$' &&
+// RUN: clang-cc %s -E | grep '^ #$'
1
#define EMPTY
EMPTY #
-// RUN: clang %s -E | grep " #"
+// RUN: clang-cc %s -E | grep " #"
// Should put a space before the # so that -fpreprocessed mode doesn't
// macro expand this again.
-// RUN: clang -I /usr/include %s -E | grep 'stdio.h.*3.*4'
+// RUN: clang-cc -I /usr/include %s -E | grep 'stdio.h.*3.*4'
#include <stdio.h>
-// RUN: clang %s -E -Wundef -Werror 2>&1 | grep error | count 1 &&
-// RUN: clang %s -E -Werror 2>&1 | not grep error
+// RUN: clang-cc %s -E -Wundef -Werror 2>&1 | grep error | count 1 &&
+// RUN: clang-cc %s -E -Werror 2>&1 | not grep error
#if foo // Should generate an warning
#endif
-/* RUN: clang -E %s 2>&1 >/dev/null | grep error: | count 3
+/* RUN: clang-cc -E %s 2>&1 >/dev/null | grep error: | count 3
*/
#ifdef
-// RUN: clang -E -I. %s | grep BODY_OF_FILE | wc -l | grep 1
+// RUN: clang-cc -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>
-// RUN: clang -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 3
+// RUN: clang-cc -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 3
// XX expands to nothing.
#define XX
-// RUN: clang -Eonly %s
+// RUN: clang-cc -Eonly %s
# define HEADER <float.h>
# include HEADER
-// RUN: clang -include file_to_include.h -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 1
+// RUN: clang-cc -include file_to_include.h -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file successfully included' | count 1
// PR3464
-// RUN: clang -x c-header %s -o %t && clang -include-pth %t %s -E | grep 'file_to_include' | count 2
+// RUN: clang-cc -x c-header %s -o %t &&
+// RUN: clang-cc -include-pth %t %s -E | grep 'file_to_include' | count 2
#include "file_to_include.h"
-// RUN: clang -E %s | grep '^ zzap$'
+// RUN: clang-cc -E %s | grep '^ zzap$'
// zzap is on a new line, should be indented.
#define BLAH zzap
-// RUN: clang -fsyntax-only -verify -pedantic %s &&
-// RUN: clang -E %s 2>&1 | grep 'blonk.c:92:2: error: #error ABC' &&
-// RUN: clang -E %s 2>&1 | grep 'blonk.c:93:2: error: #error DEF'
+// 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'
#line 'a' // expected-error {{#line directive requires a positive integer argument}}
#line 0 // expected-error {{#line directive requires a positive integer argument}}
-// RUN: clang -E %s | grep xxx-xxx
+// RUN: clang-cc -E %s | grep xxx-xxx
#define foo(return) return-return
-// RUN: clang -E %s | grep 'a: 2 + M_0(3)(4)(5);' &&
-// RUN: clang -E %s | grep 'b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);'
+// 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);'
#define M_0(x) M_ ## x
#define M_1(x) x + M_0(0)
-// RUN: clang -E %s | grep 'A B C A B A C A B C A'
+// RUN: clang-cc -E %s | grep 'A B C A B A C A B C A'
#define A A B C
#define B B C A
-// RUN: clang %s -E | grep -F 'f(2 * (f(2 * (z[0]))));'
+// RUN: clang-cc %s -E | grep -F 'f(2 * (f(2 * (z[0]))));'
// Check for C99 6.10.3.4p2.
#define f(a) f(x * (a))
-// RUN: clang -P -E %s | grep 'int f(void)'
+// RUN: clang-cc -P -E %s | grep 'int f(void)'
// PR1820
#define f(x) h(x
-// RUN: clang -E %s | grep '^Y$'
+// RUN: clang-cc -E %s | grep '^Y$'
#define X() Y
#define Y() X
-// RUN: clang %s -E 2>&1 | grep '#include'
+// RUN: clang-cc %s -E 2>&1 | grep '#include'
#define FOO 1
// The error message should be on the #include line, not the 1.
-// RUN: clang %s -E 2>&1 | grep '#include'
+// RUN: clang-cc %s -E 2>&1 | grep '#include'
#define FOO BAR
// The error message should be on the #include line, not the 1.
// Test the GNU comma swallowing extension.
-// RUN: clang %s -E | grep 'foo{A, }' &&
-// RUN: clang %s -E | grep 'fo2{A,}' &&
-// RUN: clang %s -E | grep '{foo}'
+// RUN: clang-cc %s -E | grep 'foo{A, }' &&
+// RUN: clang-cc %s -E | grep 'fo2{A,}' &&
+// RUN: clang-cc %s -E | grep '{foo}'
#define X(Y) foo{A, Y}
X()
-// RUN: clang %s -E | grep 'bar foo (2)' &&
-// RUN: clang %s -E | grep 'm(ABCD)'
+// RUN: clang-cc %s -E | grep 'bar foo (2)' &&
+// RUN: clang-cc %s -E | grep 'm(ABCD)'
#define foo(x) bar x
foo(foo) (2)
-// RUN: clang -E %s | grep 'noexp: foo y' &&
-// RUN: clang -E %s | grep 'expand: abc' &&
-// RUN: clang -E %s | grep 'noexp2: foo nonexp' &&
-// RUN: clang -E %s | grep 'expand2: abc'
+// 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'
#define A foo
#define foo() abc
-// RUN: clang -E %s | grep 'FUNC (3 +1);'
+// RUN: clang-cc -E %s | grep 'FUNC (3 +1);'
#define F(a) a
#define FUNC(a) (a+1)
-// RUN: clang %s -E | grep 'foo(A, )'
+// RUN: clang-cc %s -E | grep 'foo(A, )'
#define X(Y) foo(A, Y)
X()
-// RUN: clang %s -E | grep 'pre: 1 1 X' &&
-// RUN: clang %s -E | grep 'nopre: 1A(X)'
+// RUN: clang-cc %s -E | grep 'pre: 1 1 X' &&
+// RUN: clang-cc %s -E | grep 'nopre: 1A(X)'
/* Preexpansion of argument. */
#define A(X) 1 X
-// RUN: clang -E %s | grep 'foo{a, b, c, d, e}' &&
-// RUN: clang -E %s | grep 'foo2{d, C, B}' &&
-// RUN: clang -E %s | grep 'foo2{d,e, C, B}'
+// 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}'
#define va1(...) foo{a, __VA_ARGS__, e}
va1(b, c, d)
-// RUN: clang -E %s | grep '^a: x$' &&
-// RUN: clang -E %s | grep '^b: x y, z,h$' &&
-// RUN: clang -E %s | grep '^c: foo(x)$'
+// 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)$'
#define A(b, c...) b c
a: A(x)
-// RUN: clang %s -Eonly -verify
+// RUN: clang-cc %s -Eonly -verify
// This should not be rejected.
#ifdef defined
-// RUN: clang -E %s | grep '^ # define X 3$'
+// RUN: clang-cc -E %s | grep '^ # define X 3$'
#define H #
#define D define
-// RUN: clang -Eonly %s 2>&1 | grep error
+// RUN: clang-cc -Eonly %s 2>&1 | grep error
// pasting ""x"" and ""+"" does not give a valid preprocessing token
#define XYZ x ## +
XYZ
-// RUN: clang %s -Eonly 2>&1 | grep error
+// RUN: clang-cc %s -Eonly 2>&1 | grep error
#define COMM1 / ## /
COMM1
-// RUN: clang %s -Eonly 2>&1 | grep error &&
-// RUN: clang %s -Eonly 2>&1 | not grep unterminated &&
-// RUN: clang %s -Eonly 2>&1 | not grep scratch
+// 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
#define COMM / ## *
COMM
-// RUN: clang %s -E | grep 'V);' &&
-// RUN: clang %s -E | grep 'W, 1, 2);' &&
-// RUN: clang %s -E | grep 'X, 1, 2);' &&
-// RUN: clang %s -E | grep 'Y, );' &&
-// RUN: clang %s -E | grep 'Z, );'
+// 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, );'
#define debug(format, ...) format, ## __VA_ARGS__)
debug(V);
-// RUN: clang -E %s | grep 'a:Y' &&
-// RUN: clang -E %s | grep 'b:Y' &&
-// RUN: clang -E %s | grep 'c:YY'
+// RUN: clang-cc -E %s | grep 'a:Y' &&
+// RUN: clang-cc -E %s | grep 'b:Y' &&
+// RUN: clang-cc -E %s | grep 'c:YY'
#define FOO(X) X ## Y
a:FOO()
-// RUN: clang -E %s | grep '1: aaab 2' &&
-// RUN: clang -E %s | grep '2: 2 baaa' &&
-// RUN: clang -E %s | grep '3: 2 xx'
+// 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'
#define a(n) aaa ## n
#define b 2
-// RUN: clang -E %s | grep '^"x ## y";$'
+// RUN: clang-cc -E %s | grep '^"x ## y";$'
#define hash_hash # ## #
#define mkstr(a) # a
#define in_between(a) mkstr(a)
-// RUN: clang -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' |
+// RUN: clang-cc -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' |
// RUN: grep '^int foo;int bar;int baz;$' | count 1
// This horrible stuff should preprocess into (other than whitespace):
// int foo;
-// RUN: clang -E %s | grep '!!'
+// RUN: clang-cc -E %s | grep '!!'
#define A(B,C) B ## C
-// RUN: clang %s -E | grep "barbaz123"
+// RUN: clang-cc %s -E | grep "barbaz123"
#define FOO bar ## baz ## 123
-// RUN: clang %s -E | grep "^xy$"
+// RUN: clang-cc %s -E | grep "^xy$"
#define A x ## y
blah
-// RUN: clang -E %s | grep 'ei_1 = (17 +1);' &&
-// RUN: clang -E %s | grep 'ei_2 = (M1)(17);'
+// RUN: clang-cc -E %s | grep 'ei_1 = (17 +1);' &&
+// RUN: clang-cc -E %s | grep 'ei_2 = (M1)(17);'
#define M1(a) (a+1)
#define M2(b) b
-// RUN: clang %s -E | grep 'a: 2\*f(9)' &&
-// RUN: clang %s -E | grep 'b: 2\*9\*g'
+// RUN: clang-cc %s -E | grep 'a: 2\*f(9)' &&
+// RUN: clang-cc %s -E | grep 'b: 2\*9\*g'
#define f(a) a*g
#define g f
-// RUN: clang -E %s | grep -F "1: F, (, 'a', 'b', );" &&
-// RUN: clang -E %s | grep -F "2: 'a' + 'b';"
+// RUN: clang-cc -E %s | grep -F "1: F, (, 'a', 'b', );" &&
+// RUN: clang-cc -E %s | grep -F "2: 'a' + 'b';"
#define LPAREN (
#define RPAREN )
#define F(x, y) x + y
-// RUN: clang -E %s | grep '^3 ;$'
+// RUN: clang-cc -E %s | grep '^3 ;$'
/* Right paren scanning, hard case. Should expand to 3. */
#define i(x) 3
-// RUN: clang -E %s | grep -F 'static int glob = (1 + 1 );'
+// RUN: clang-cc -E %s | grep -F 'static int glob = (1 + 1 );'
#define R_PAREN )
-// RUN: clang %s -E | grep '! ,'
+// RUN: clang-cc %s -E | grep '! ,'
#define XX
! XX,
-// RUN: not clang -fsyntax-only %s
+// RUN: not clang-cc -fsyntax-only %s
// PR1900
// This test should get a redefinition error from m_iopt.h: the MI opt
// shouldn't apply.
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic
#import <stdio.h> // no warning.
-// RUN: clang -E %s | grep '+ + - - + + = = =' &&
-// RUN: clang -E %s | not grep -F '...' &&
-// RUN: clang -E %s | not grep -F 'L"str"'
+// RUN: clang-cc -E %s | grep '+ + - - + + = = =' &&
+// RUN: clang-cc -E %s | not grep -F '...' &&
+// RUN: clang-cc -E %s | not grep -F 'L"str"'
// This should print as ".. ." to avoid turning into ...
#define y(a) ..a
// GCC PR 20077
-// RUN: not clang -E %s &&
-// RUN: not clang -E %s 2>&1 | grep error: | wc -l | grep 10
+// RUN: not clang-cc -E %s &&
+// RUN: not clang-cc -E %s 2>&1 | grep error: | wc -l | grep 10
#define a a ## ## /* { dg-error "end of a macro expansion" } */
#define b() b ## ## /* { dg-error "end of a macro expansion" } */
-// RUN: clang %s -E 2>&1 | grep error
+// RUN: clang-cc %s -E 2>&1 | grep error
#pragma GCC poison rindex
rindex(some_string, 'h');
-// RUN: clang %s -E 2>&1 | not grep error
+// RUN: clang-cc %s -E 2>&1 | not grep error
#define strrchr rindex
#pragma GCC poison rindex
-// RUN: clang -E %s
+// RUN: clang-cc -E %s
#define test
#include "pr2086.h"
-// RUN: clang %s -fsyntax-only -verify -fms-extensions
+// RUN: clang-cc %s -fsyntax-only -verify -fms-extensions
// rdar://6495941
-// RUN: clang -E %s | grep '#pragma foo bar'
+// RUN: clang-cc -E %s | grep '#pragma foo bar'
// GCC doesn't expand macro args for unrecognized pragmas.
#define bar xX
-/* RUN: clang -E %s | grep 'a 3' &&
- * RUN: clang -E %s | grep 'b 16' &&
- * RUN: clang -E -P %s | grep 'a 3' &&
- * RUN: clang -E -P %s | grep 'b 16' &&
- * RUN: clang -E %s | not grep '# 0 '
+/* 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 '
* PR1848
* PR3437
*/
-// RUN: clang -E %s | grep bark
+// RUN: clang-cc -E %s | grep bark
#if 0
blah
-// RUN: clang -E %s | grep -F '"f(1, 2)" "g((x=y++, y))"' &&
-// RUN: clang -E %s | grep -F '"{a=1" "b=2;}"' &&
-// RUN: clang -E %s | grep -F '"<" "["' &&
-// RUN: clang -E %s | grep -F '"(,)" "(...)"' &&
-// RUN: clang -E %s | grep -F '{a=1 c=3; b=2;}' &&
-// RUN: clang -E %s | grep -F '"a COMMA b" "(a, b)"'
+// RUN: clang-cc -E %s | grep -F '"f(1, 2)" "g((x=y++, y))"' &&
+// RUN: clang-cc -E %s | grep -F '"{a=1" "b=2;}"' &&
+// RUN: clang-cc -E %s | grep -F '"<" "["' &&
+// RUN: clang-cc -E %s | grep -F '"(,)" "(...)"' &&
+// RUN: clang-cc -E %s | grep -F '{a=1 c=3; b=2;}' &&
+// RUN: clang-cc -E %s | grep -F '"a COMMA b" "(a, b)"'
#define M(x, y) #x #y
-// RUN: clang -E %s | grep -- '-"" , - "" , -"" , - ""'
+// RUN: clang-cc -E %s | grep -- '-"" , - "" , -"" , - ""'
#define A(b) -#b , - #b , -# b , - # b
A()
-/* RUN: clang -E %s | grep 'a c'
+/* RUN: clang-cc -E %s | grep 'a c'
*/
#define t(x) #x
t(a
-// RUN: clang %s -pedantic-errors -verify
+// RUN: clang-cc %s -pedantic-errors -verify
// PR2045
#define b
-// RUN: clang -E -verify %s
+// RUN: clang-cc -E -verify %s
// PR3096
#ifdef FOO // expected-error {{unterminated conditional directive}}
/* /* */
-// RUN: clang -rewrite-blocks %s -fblocks -o -
+// RUN: clang-cc -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;
-// RUN: clang -rewrite-objc -o - %s
+// RUN: clang-cc -rewrite-objc -o - %s
// rdar://5950938
@interface NSArray {}
+ (id)arrayWithObjects:(id)firstObj, ...;
-// RUN: clang -rewrite-objc -verify %s -o -
+// RUN: clang-cc -rewrite-objc -verify %s -o -
int main() {
@try {
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol P
- (id<P>) Meth: (id<P>) Arg;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface Intf
{
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@implementation Intf
{
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface Intf
@end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
typedef struct _NSPoint {
float x;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol P1
- (void) MyProtoMeth : (int **) arg1 : (void*) arg2;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
typedef struct NSMethodFrameArgInfo {
struct NSMethodFrameArgInfo *subInfo;
-// RUN: clang -rewrite-objc %s -o - &&
-// RUN: clang -rewrite-objc %s -o - | grep 'newInv->_container'
+// RUN: clang-cc -rewrite-objc %s -o - &&
+// RUN: clang-cc -rewrite-objc %s -o - | grep 'newInv->_container'
@interface NSMutableArray
- (void)addObject:(id)addObject;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@class NSString;
-// RUN: clang -rewrite-objc %s -o - | grep objc_msgSendSuper | grep MainMethod
+// RUN: clang-cc -rewrite-objc %s -o - | grep objc_msgSendSuper | grep MainMethod
typedef struct objc_selector *SEL;
typedef struct objc_object *id;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
id SYNCH_EXPR();
void SYNCH_BODY();
-// RUN: clang -rewrite-objc %s -o -
+// RUN: clang-cc -rewrite-objc %s -o -
@interface Foo {
int i;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
typedef struct MyWidget {
int a;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface MyDerived
- (void) instanceMethod;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol P @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol P @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol P @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface MyList
- (id) allKeys;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface MyList
- (id) allKeys;
-// RUN: clang %s -rewrite-objc -o=-
+// RUN: clang-cc %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
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface NSMapTable @end
@interface NSEnumerator @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol MyProto1
@end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface Foo @end
@interface GARF @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@protocol Proto
- (void) ProtoDidget;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
typedef struct S {
int * pint;
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface Derived @end
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
@interface MyDerived
{
-// RUN: clang -rewrite-objc %s -o=-
+// RUN: clang-cc -rewrite-objc %s -o=-
#include <stdarg.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int i128 __attribute__((__mode__(TI)));
typedef unsigned u128 __attribute__((__mode__(TI)));
-// RUN: clang -verify -fsyntax-only -std=c90 %s &&
-// RUN: clang -verify -fsyntax-only -std=c99 %s
+// RUN: clang-cc -verify -fsyntax-only -std=c90 %s &&
+// RUN: clang-cc -verify -fsyntax-only -std=c99 %s
int f (int x)
{
-// RUN: clang -verify -fsyntax-only -std=c90 %s &&
-// RUN: clang -verify -fsyntax-only -std=c99 %s
+// RUN: clang-cc -verify -fsyntax-only -std=c90 %s &&
+// RUN: clang-cc -verify -fsyntax-only -std=c99 %s
struct s
{
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
typedef struct foo T0;
typedef const struct foo T1;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Test for absence of crash reported in PR 2923:
//
-// RUN: clang %s -verify -pedantic -fsyntax-only
+// RUN: clang-cc %s -verify -pedantic -fsyntax-only
typedef short short_fixed;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int i;
int a[] = {0};
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
#define _AS1 __attribute__((address_space(1)))
#define _AS2 __attribute__((address_space(2)))
-// RUN: clang -triple i386-apple-darwin9 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s
// PR3433
double g1;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
void __attribute__((annotate("foo"))) foo(float *a) {
__attribute__((annotate("bar"))) int x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct X {
union {
float f3;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int f3(y, x,
x) // expected-error {{redefinition of parameter}}
-// RUN: clang -fsyntax-only -std=c99 -verify %s
+// RUN: clang-cc -fsyntax-only -std=c99 -verify %s
int bb(int sz, int ar[sz][sz]) { }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int aa(int b, int x[sizeof b]) {}
void foo(int i, int A[i]) {}
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -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}}
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
extern int a1[];
int a1[1];
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
extern int foof() = 1; // expected-error{{illegal initializer (only variables can be initialized)}}
-// RUN: clang %s -arch=i386 -verify -fsyntax-only
+// RUN: clang-cc %s -arch=i386 -verify -fsyntax-only
void f() {
int i;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stddef.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void *test1(void) { return 0; }
-// RUN: clang %s -ast-print
+// RUN: clang-cc %s -ast-print
typedef void func_typedef();
func_typedef xxx;
-// RUN: clang -triple i386-apple-darwin9 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s
int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
void c1(int *a);
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
int f() __attribute__((deprecated));
void g() __attribute__((deprecated));
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int i16_1 __attribute((mode(HI)));
int i16_1_test[sizeof(i16_1) == 2 ? 1 : -1];
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
int a __attribute__((nodebug)); // expected-warning {{'nodebug' attribute only applies to function types}}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
int a __attribute__((noinline)); // expected-warning {{'noinline' attribute only applies to function types}}
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -verify -fsyntax-only %s
static void (*fp0)(void) __attribute__((noreturn));
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -verify -fsyntax-only %s
static void (*fp0)(void) __attribute__((unused));
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -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}}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// rdar://6587766
int fn1() __attribute__ ((warn_unused_result));
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -verify -fsyntax-only %s
extern int g0 __attribute__((weak));
extern int g1 __attribute__((weak_import));
-// RUN: clang %s -fsyntax-only -verify -triple=i686-apple-darwin9
+// RUN: clang-cc %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];
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
enum e0; // expected-note{{forward declaration of 'enum e0'}}
struct a {
-// RUN: clang %s -fsyntax-only -verify -fblocks
+// RUN: clang-cc %s -fsyntax-only -verify -fblocks
void take(void*);
-// RUN: clang %s -fsyntax-only -verify -fblocks
+// RUN: clang-cc %s -fsyntax-only -verify -fblocks
@interface Whatever
- copy;
-// RUN: clang %s -fsyntax-only -verify -fblocks
+// RUN: clang-cc %s -fsyntax-only -verify -fblocks
#include <stdio.h>
-// RUN: clang -fsyntax-only -verify %s -fblocks
+// RUN: clang-cc -fsyntax-only -verify %s -fblocks
int (*FP)();
int (^IFP) ();
-// RUN: clang -ObjC -fsyntax-only %s -verify -fblocks
+// RUN: clang-cc -ObjC -fsyntax-only %s -verify -fblocks
// FIXME: should compile
// Test for blocks with explicit return type specified.
-// RUN: clang %s -verify -fblocks -fsyntax-only
+// RUN: clang-cc %s -verify -fblocks -fsyntax-only
int a() {
A:if (1) xx();
-// RUN: clang -fsyntax-only %s -verify -fblocks
+// RUN: clang-cc -fsyntax-only %s -verify -fblocks
void I( void (^)(void));
void (^noop)(void);
-// RUN: clang -fsyntax-only -verify %s -fblocks
+// RUN: clang-cc -fsyntax-only -verify %s -fblocks
void donotwarn();
int (^IFP) ();
-// RUN: clang -fsyntax-only %s -verify -fblocks
+// RUN: clang-cc -fsyntax-only %s -verify -fblocks
typedef void (^CL)(void);
-// RUN: clang %s -fsyntax-only -verify -fblocks
+// RUN: clang-cc %s -fsyntax-only -verify -fblocks
#include <stdio.h>
void _Block_byref_release(void*src){}
-// RUN: clang %s -fsyntax-only -verify -fblocks
+// RUN: clang-cc %s -fsyntax-only -verify -fblocks
void (^noop)(void);
-// RUN: clang -fsyntax-only -verify %s &&
-// RUN: clang -fsyntax-only -triple x86_64-apple-darwin9 -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s &&
+// RUN: clang-cc -fsyntax-only -triple x86_64-apple-darwin9 -verify %s
int a[10];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int foo() {
int a;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void* a(unsigned x) {
return __builtin_return_address(0);
}
-// RUN: clang %s -fsyntax-only -verify -pedantic -triple=i686-apple-darwin9
+// RUN: clang-cc %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) {
-/* RUN: not clang %s -std=c89 -pedantic-errors
+/* RUN: not clang-cc %s -std=c89 -pedantic-errors
*/
/* We can't put expected-warning lines on #if lines. */
-/* RUN: clang %s -std=c89 -pedantic -fsyntax-only -verify
+/* RUN: clang-cc %s -std=c89 -pedantic -fsyntax-only -verify
*/
void test1() {
{
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
void __attribute__((fastcall)) foo(float *a) {
}
-// RUN: clang %s -fsyntax-only -print-stats &&
-// RUN: clang -x c-header -o %t %s && clang -token-cache %t %s
+// RUN: clang-cc %s -fsyntax-only -print-stats &&
+// RUN: clang-cc -x c-header -o %t %s && clang-cc -token-cache %t %s
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
union u { int i; };
void f(union u);
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t;
cpumask_t x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stdio.h>
typedef int *pint;
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
int test(char *C) { // nothing here should warn.
return C != ((void*)0);
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
void a() {
__complex__ int arr;
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
float a;
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
struct foo { int a, b; };
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
void foo() {
*(0 ? (double *)0 : (void *)0) = 0;
// FIXME: GCC doesn't consider the the following two statements to be errors.
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r";
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];});
int x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stdint.h>
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
// Math stuff
-// RUN: clang -fsyntax-only %s -verify -pedantic
+// RUN: clang-cc -fsyntax-only %s -verify -pedantic
// Math stuff
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int x __attribute__((constructor)); // expected-warning {{'constructor' attribute only applies to function types}}
int f() __attribute__((constructor));
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef long unsigned int __darwin_size_t;
typedef long __darwin_ssize_t;
typedef __darwin_size_t size_t;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %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}}
-// RUN: clang -fsyntax-only -std=c99 -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -std=c99 -verify -pedantic %s
int x[10];
int x[] = {1,2,3};
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
typedef char T[4];
T foo(int n, int m) { } // expected-error {{cannot return array or function}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f5 (int z) {
if (z)
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f(int i = 0); // expected-error {{C does not support default arguments}}
-// RUN: clang -fsyntax-only -verify -std=c90 %s
+// RUN: clang-cc -fsyntax-only -verify -std=c90 %s
void
foo (void)
{
-// RUN: clang -fsyntax-only -verify -arch x86_64 %s
+// RUN: clang-cc -fsyntax-only -verify -arch x86_64 %s
int complete_array_from_init[] = { 1, 2, [10] = 5, 1, 2, [5] = 2, 6 };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
inline void __attribute__((dllexport)) foo1(){} // expected-warning{{dllexport attribute ignored}}
inline void __attribute__((dllimport)) foo2(){} // expected-warning{{dllimport attribute ignored}}
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %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 };
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
struct xx { int bitf:1; };
struct entry { struct xx *whatever;
-// RUN: clang %s -fsyntax-only -verify -std=c99
+// RUN: clang-cc %s -fsyntax-only -verify -std=c99
// rdar://6095180
#include <assert.h>
-// RUN: clang %s -fsyntax-only -verify -std=c89
+// RUN: clang-cc %s -fsyntax-only -verify -std=c89
// rdar://6095180
#include <assert.h>
-// RUN: clang %s -verify -pedantic -fsyntax-only
+// RUN: clang-cc %s -verify -pedantic -fsyntax-only
// PR1966
_Complex double test1() {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef __attribute__(( ext_vector_type(2) )) float float2;
typedef __attribute__(( ext_vector_type(3) )) float float3;
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
struct one {
int a;
int values[]; // expected-note 3{{initialized flexible array member 'values' is here}}
-// RUN: clang -fsyntax-only -Wfloat-equal -verify %s
+// RUN: clang-cc -fsyntax-only -Wfloat-equal -verify %s
int f1(float x, float y) {
return x == y; // expected-warning {{comparing floating point with ==}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Check C99 6.8.5p3
void b1 (void) { for (void (*f) (void);;); }
-//RUN: clang -fsyntax-only -verify %s
+//RUN: clang-cc -fsyntax-only -verify %s
#include <stdarg.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Define this to get vasprintf on Linux
#define _GNU_SOURCE
-// RUN: clang %s -verify -pedantic
+// RUN: clang-cc %s -verify -pedantic
typedef int unary_int_func(int arg);
unary_int_func *func;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR3588
void g0(int, int);
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic
// PR1892
void f(double a[restrict][5]); // should promote to restrict ptr.
void f(double (* restrict a)[5]);
-// RUN: clang %s -verify
+// RUN: clang-cc %s -verify
int foo() {
int a;
-// RUN: clang %s -verify -fheinous-gnu-extensions
+// RUN: clang-cc %s -verify -fheinous-gnu-extensions
int foo() {
int a;
-// RUN: clang %s -fsyntax-only -verify -pedantic -fpascal-strings
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic -fpascal-strings
#include <stdint.h>
#include <limits.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f1(int a) {
if (a); // expected-warning {{if statement has empty body}}
-// RUN: clang -fsyntax-only -verify -std=c++98 %s
+// RUN: clang-cc -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}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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'}} \
-// RUN: clang -fsyntax-only -verify -ffreestanding %s
+// RUN: clang-cc -fsyntax-only -verify -ffreestanding %s
int malloc(int a) { return a; }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR3592
static void* malloc(int);
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
static char *test1(int cf) {
return cf ? "abc" : 0;
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
typedef int int32_t;
typedef unsigned char Boolean;
-/* RUN: clang -fsyntax-only %s -std=c89 &&
- * RUN: not clang -fsyntax-only %s -std=c99 -pedantic-errors
+/* RUN: clang-cc -fsyntax-only %s -std=c89 &&
+ * RUN: not clang-cc -fsyntax-only %s -std=c99 -pedantic-errors
*/
int A() {
-// RUN: clang -fsyntax-only %s -verify -pedantic
+// RUN: clang-cc -fsyntax-only %s -verify -pedantic
foo() { // expected-warning {{type specifier missing, defaults to 'int'}}
}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %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}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct foo; // expected-note 3 {{forward declaration of 'struct foo'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct foo; // expected-note 4 {{forward declaration of 'struct foo'}}
-// RUN: clang -fsyntax-only -verify < %s
+// RUN: clang-cc -fsyntax-only -verify < %s
typedef float CGFloat;
typedef struct _NSPoint { CGFloat x; CGFloat y; } NSPoint;
typedef struct _NSSize { CGFloat width; CGFloat height; } NSSize;
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
#include <stdint.h>
-// RUN: clang -triple=i686-linux-gnu -fsyntax-only -verify %s
+// RUN: clang-cc -triple=i686-linux-gnu -fsyntax-only -verify %s
// Check types are the same through redeclaration
unsigned long x;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
void test() {
char = 4; // expected-error {{expected identifier}}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
int a;
struct {int x;} x = a; // expected-error {{incompatible type initializing 'int', expected 'struct <anonymous>'}}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// C DR #316, PR 3626.
void f0(a, b, c, d) int a,b,c,d; {}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
struct simple { int i; };
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
void foo(void);
void foo(void) {}
-// RUN: clang %s -verify -fms-extensions
+// RUN: clang-cc %s -verify -fms-extensions
#define M __asm int 0x2c
#define M2 int
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int f1(int x) __attribute__((nonnull)); // expected-warning{{'nonnull' attribute applied to function with no pointer arguments}}
int f2(int *x) __attribute__ ((nonnull (1)));
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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) {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute can only be applied to a function}}
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic
typedef struct S S; // expected-note 3 {{forward declaration of 'struct S'}}
void a(S* b, void* c) {
-// RUN: clang %s -fsyntax-only -verify -pedantic
+// RUN: clang-cc %s -fsyntax-only -verify -pedantic
typedef const char rchar;
int a(char* a, rchar* b) {
-// RUN: clang -triple i686-apple-darwin9 %s -fsyntax-only -verify
+// RUN: clang-cc -triple i686-apple-darwin9 %s -fsyntax-only -verify
#include <stddef.h>
-// RUN: clang -triple i686-apple-darwin9 -fsyntax-only -verify %s
+// RUN: clang-cc -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)
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f1(void) {
int x, y, z;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void abcdefghi12(void) {
const char (*ss)[12] = &__func__;
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
char *funk(int format);
enum Test {A=-1};
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
// Test case for:
// <rdar://problem/6248119> @finally doesn't introduce a new scope
-// RUN: clang -ast-dump %s 2>&1 | grep ImplicitCastExpr | count 2
+// RUN: clang-cc -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.
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
void a() {goto A; // expected-error {{use of undeclared label}}
// expected-error {{expected '}'}}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
int f(int a) { } // expected-note {{previous definition is here}}
int f(int);
int f(int a) { } // expected-error {{redefinition of 'f'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int test1(int x) {
goto L; // expected-error{{illegal jump}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int foo(int x) {
return x == x; // expected-warning {{self-comparison always results}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int x __attribute__((sentinel)); //expected-warning{{'sentinel' attribute only applies to function or method types}}
void f1(int a, ...) __attribute__ ((sentinel));
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
void test() {
char c;
-// RUN: clang -arch i386 -fsyntax-only -verify %s
+// RUN: clang-cc -arch i386 -fsyntax-only -verify %s
#include <stdint.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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}}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
typedef unsigned __uint32_t;
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
struct S {
int one;
-/* RUN: clang %s -fsyntax-only -pedantic -verify
+/* RUN: clang-cc %s -fsyntax-only -pedantic -verify
*/
extern struct {int a;} x; // expected-note {{previous definition is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR3459
struct bar {
char n[1];
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// Packed structs.
struct s {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f (int z) {
while (z) {
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// PR3310
struct a x1; // expected-note 2{{forward declaration of 'struct a'}}
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
unsigned char *foo = "texto\
que continua\
e continua";
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
typedef union {
union wait *__uptr;
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -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
-/* RUN: clang %s -fsyntax-only -pedantic -verify
+/* RUN: clang-cc %s -fsyntax-only -pedantic -verify
*/
struct incomplete;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int unary_int_func(int arg);
unary_int_func add_one;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// size_t coming from a system header.
#include <stddef.h>
-// RUN: clang -fsyntax-only -verify %s -fno-lax-vector-conversions
+// RUN: clang-cc -fsyntax-only -verify %s -fno-lax-vector-conversions
typedef float float4 __attribute__((vector_size(16)));
typedef int int4 __attribute__((vector_size(16)));
-// RUN: clang %s -verify -fsyntax-only -pedantic
+// RUN: clang-cc %s -verify -fsyntax-only -pedantic
typedef int (*a)[!.0]; // expected-warning{{size of static array must be an integer constant expression}}
-// RUN: clang %s -pedantic -verify
+// RUN: clang-cc %s -pedantic -verify
// rdar://6097662
typedef int (*T)[2];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct {
int a; int : 24; char b;
} S;
-// RUN: clang -fsyntax-only -verify -fno-math-errno %s
+// RUN: clang-cc -fsyntax-only -verify -fno-math-errno %s
int foo(int X, int Y);
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
typedef float CGFloat;
-// RUN: clang -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s
+// RUN: clang-cc -fsyntax-only -verify -triple=x86_64-unknown-freebsd7.0 %s
// PR2631
char* foo(char *fmt, __builtin_va_list ap)
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int outer1; // expected-note{{previous definition is here}}
extern int outer2; // expected-note{{previous definition is here}}
-// RUN: clang -fsyntax-only -verify %s &&
-// RUN: clang -fsyntax-only -verify %s -triple x86_64-apple-darwin9
+// RUN: clang-cc -fsyntax-only -verify %s &&
+// RUN: clang-cc -fsyntax-only -verify %s -triple x86_64-apple-darwin9
void f1(int a)
{
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
typedef unsigned int v2u __attribute__ ((vector_size (8)));
typedef signed int v2s __attribute__ ((vector_size (8)));
typedef signed int v1s __attribute__ ((vector_size (4)));
-// RUN: clang -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify
typedef long long t1 __attribute__ ((vector_size (8)));
typedef char t2 __attribute__ ((vector_size (16)));
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
//typedef __attribute__(( ext_vector_type(4) )) float float4;
typedef float float4 __attribute__((vector_size(16)));
-// RUN: clang %s -verify -fsyntax-only -pedantic
+// RUN: clang-cc %s -verify -fsyntax-only -pedantic
int test1() {
typedef int x[test1()]; // vla
-/* RUN: clang -fsyntax-only %s -verify
+/* RUN: clang-cc -fsyntax-only %s -verify
*/
typedef void Void;
-// RUN: clang -fsyntax-only -ffreestanding -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -ffreestanding -pedantic -verify %s
void foo(float _Complex c) { // expected-warning{{complex numbers are an extension in a freestanding C99 implementation}}
}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
#include <wchar.h>
int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1];
-// RUN: clang -triple x86_64-unknown-unknown %s -fsyntax-only -verify &&
-// RUN: clang -triple i686-unknown-unknown %s -fsyntax-only -verify
+// RUN: clang-cc -triple x86_64-unknown-unknown %s -fsyntax-only -verify &&
+// RUN: clang-cc -triple i686-unknown-unknown %s -fsyntax-only -verify
void f() {
int* i = __null;
-// RUN: clang -fsyntax-only -verify %s -std=c++0x
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
#ifndef __GXX_EXPERIMENTAL_CXX0X__
#define __CONCAT(__X, __Y) __CONCAT1(__X, __Y)
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int f(double);
int f(int);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR clang/3175
void bar(int*);
-// RUN: clang -fsyntax-only -verify -std=c++98 %s
+// RUN: clang-cc -fsyntax-only -verify -std=c++98 %s
// Verify that we can't initialize non-aggregates with an initializer
// list.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct X {
union {
float f3;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int &foo(int);
double &foo(double);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace N {
struct X { };
-// RUN: clang -fsyntax-only -verify %s -fblocks
+// RUN: clang-cc -fsyntax-only -verify %s -fblocks
void tovoid(void*);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Bool literals can be enum values.
enum {
-// RUN: clang %s -fsyntax-only -print-stats
+// RUN: clang-cc %s -fsyntax-only -print-stats
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class C { };
C c;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class C {
public:
auto int errx; // expected-error {{error: storage class specified for a member declaration}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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) {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void test() {
int x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct A {};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A {
int m;
};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int INT;
class Foo {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X {
public:
operator bool();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct ConvToBool {
operator bool() const;
};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class Z { };
class Y {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X {
public:
explicit X(const X&);
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
// C++ [dcl.init.aggr]p2
struct A {
int x;
-// RUN: clang -fsyntax-only -verify -pedantic-errors %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic-errors %s
void f() {
int a;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f(int i, int j, int k = 3);
void f(int i, int j, int k);
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
template<typename T, int Size> void f() {
T x1;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A { };
class B : public A { };
class C : public A { };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A {
public:
~A();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int x(1);
int (x2)(1);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void test() {
int x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct A {};
struct B : A {};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
enum E {
Val1,
Val2
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void choice(int);
int choice(bool);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR2942
typedef void fn(int);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int foo(int);
namespace N {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f() const; // expected-error {{type qualifier is not allowed on this function}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct SimpleValueInit {
int i;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// C++-specific tests for integral constant expressions.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
x; // expected-error{{C++ requires a type specifier for all declarations}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A { };
class B1 : A { };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern "C" {
extern "C" void f(int);
}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X{
public:
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// XFAIL
// fails due to exact diagnostic matching
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct A {};
enum B { Dummy };
-// RUN: clang %s -fsyntax-only -verify -fms-extensions
+// RUN: clang-cc %s -fsyntax-only -verify -fms-extensions
void f() throw(...) { }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace A { // expected-note 2 {{previous definition is here}}
int A;
void f() { A = 0; }
-// RUN: clang -fsyntax-only -std=c++98 -verify %s
+// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s
namespace A {
struct C {
static int cx;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stddef.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f() {
void *p = malloc(sizeof(int) * 10); // expected-error{{no matching function for call to 'malloc'}}
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
class X { };
int& copycon(X x);
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
int* f(int) { return 0; }
float* f(float) { return 0; }
void f();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f();
void f(int);
void f(int, float);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct X {
int& f(int) const; // expected-note 2 {{candidate function}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct yes;
struct no;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct X {
X();
X(int);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X { };
X operator+(X, X);
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -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}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace Ns {
int f(); // expected-note{{previous declaration is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace foo {
namespace wibble {
struct x { int y; };
-// RUN: clang -ast-print %s 2>&1 | grep "N::M::X<INT>::value"
+// RUN: clang-cc -ast-print %s 2>&1 | grep "N::M::X<INT>::value"
namespace N {
namespace M {
template<typename T>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int g(int);
void f() {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
enum test { testval = 1 };
struct structure { int m; };
-// RUN: clang -fsyntax-only -verify -std=c++98 -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -std=c++98 -pedantic %s
void fnptrs()
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int* ret_local() {
int x = 1;
-// RUN: clang -fsyntax-only -verify -std=c++0x %s
+// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s
typedef int&& irr;
typedef irr& ilr_c1; // Collapses to int&
-// RUN: clang %s -fsyntax-only -pedantic
+// RUN: clang-cc %s -fsyntax-only -pedantic
void foo() {
return foo();
-// RUN: clang -fsyntax-only -verify %s -std=c++0x
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
int f();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct A {};
struct B : public A {}; // Single public base.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int f()
{
return 10;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<int N> void f(int (&array)[N]);
template<> void f<1>(int (&array)[1]) { }
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}}
void f() {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct A; // expected-note 3 {{forward declaration of 'struct A'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f() {
float v1 = float(1);
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X {
public:
virtual int f();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#define T(b) (b) ? 1 : -1
#define F(b) (b) ? -1 : 1
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int INT;
typedef INT REALLY_INT; // expected-note {{previous definition is here}}
typedef REALLY_INT REALLY_REALLY_INT;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
void f()
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct X {
operator bool();
};
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// XFAIL
// fails due to exact diagnostic matching
-// RUN: clang -fsyntax-only -verify -fblocks %s
+// RUN: clang-cc -fsyntax-only -verify -fblocks %s
extern char version[];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class A {
virtual void f();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// rdar://6425550
int bar();
void do_something(int);
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
wchar_t x;
void f(wchar_t p) {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Subclass
{
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@protocol NSObject
- (oneway void)release;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Note: GCC doesn't produce any of the following errors.
@interface Super @end // expected-note {{previous definition is here}}
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
struct S { int a; };
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
@interface Test {
double a;
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
@class NSString;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
@interface A {
int X __attribute__((deprecated));
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
__attribute__((__objc_exception__))
@interface NSException {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
static id __attribute((objc_gc(weak))) a;
static id __attribute((objc_gc(strong))) b;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface I
- (id) retain;
-// RUN: clang -fsyntax-only -verify %s -fblocks
+// RUN: clang-cc -fsyntax-only -verify %s -fblocks
@interface NSObject {
struct objc_object *isa;
-// RUN: clang -fsyntax-only -verify -fblocks %s
+// RUN: clang-cc -fsyntax-only -verify -fblocks %s
@protocol NSObject;
void bar(id(^)(void));
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stddef.h>
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@protocol P;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MyClass1 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct objc_class *Class;
@interface NSObject
[[self class] classMethod];
}
-@end
\ No newline at end of file
+@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface SUPER
- (int) meth;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo // expected-note {{previous definition is here}}
@end
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
@interface X
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol P1 @end
@protocol P2 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol SUPER;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo
- (int) garf; // expected-note {{ previous declaration is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef int INTF3; // expected-note {{previous definition is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MyBase
- (void) rootInstanceMethod;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface INTF1 @end
-// RUN: clang %s -print-stats &&
-// RUN: clang %s -disable-free &&
-// RUN: clang -x objective-c-header -o %t %s && clang -token-cache %t %s &&
-// RUN: clang -x objective-c-header -o %t %s && clang -token-cache %t %s -E %s -o /dev/null
+// RUN: clang-cc %s -print-stats &&
+// RUN: clang-cc %s -disable-free &&
+// RUN: clang-cc -x objective-c-header -o %t %s &&
+// RUN: clang-cc -token-cache %t %s &&
+// RUN: clang-cc -x objective-c-header -o %t %s &&
+// RUN: clang-cc -token-cache %t %s -E %s -o /dev/null
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
-// RUN: clang -pedantic -fsyntax-only -verify %s
+// RUN: clang-cc -pedantic -fsyntax-only -verify %s
typedef signed char BOOL;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
#define nil (void *)0;
#define Nil (void *)0;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#define nil (void *)0;
#define Nil (void *)0;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#define nil (void *)0;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern void foo();
-// RUN: clang -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
#define nil (void *)0;
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
@interface Derived
@end
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
#define nil (void *)0;
#define Nil (void *)0;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol MyProtocol
@end
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -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.
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
typedef signed char BOOL;
typedef int NSInteger;
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
@protocol NSObject
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface A
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol P0
@end
int f11(int cond, A* a, B* b) {
return (cond? b : a)->x; // expected-error{{'A' does not have a member named 'x'}}
-}
\ No newline at end of file
+}
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
// XFAIL
// <rdar://problem/6212771>
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic %s
@protocol NSObject
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface INTF
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface ReadOnly
{
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface B1 {
@public
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@protocol MyProto1
@optional
-// RUN: clang -fobjc-gc -fsyntax-only -verify %s
+// RUN: clang-cc -fobjc-gc -fsyntax-only -verify %s
@interface INTF
{
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// rdar://6597252
Class test1(Class X) {
@"baz"
" b\0larg"; // expected-warning {{literal contains NUL character}}
-}
\ No newline at end of file
+}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@class NSArray;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@class FOO, BAR;
@class FOO, BAR;
-// RUN: clang %s -verify -fms-extensions
+// RUN: clang-cc %s -verify -fms-extensions
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
typedef struct _NSRange { } NSRange;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
/* Test attempt to redefine 'id' in an incompatible fashion. */
typedef int id; // expected-error {{typedef redefinition with different types}}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// id is now builtin. There should be no errors.
id obj;
-// RUN: clang -pedantic -fsyntax-only -verify %s
+// RUN: clang-cc -pedantic -fsyntax-only -verify %s
@protocol MyProto1
@end
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// rdar://5957506
@interface NSWhatever :
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
@interface A
{
int ivar;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
typedef struct objc_object {} *id;
typedef signed char BOOL;
typedef unsigned int NSUInteger;
-// RUN: clang -fsyntax-only -verify -triple i686-apple-darwin9 %s
+// RUN: clang-cc -fsyntax-only -verify -triple i686-apple-darwin9 %s
// FIXME: must also compile as Objective-C++
// <rdar://problem/6487662>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface I1 {
@private
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface XX
int x; // expected-error {{cannot declare variable inside a class, protocol or category}}
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// rdar://6124613
void test1() {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Super @end
Super s1; // expected-error{{Objective-C type cannot be statically allocated}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct NotAClass {
int a, b;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@class NSString, NSArray;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MySuperClass
{
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
@interface Test {
int x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Sprite {
int sprite, spree;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
struct S; // expected-note{{forward declaration of 'struct S'}}
typedef int FOO();
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@implementation INTF // expected-warning {{cannot find interface declaration for 'INTF'}}
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface foo
- (void)meth;
-// RUN: clang -checker-cfref -verify %s
+// RUN: clang-cc -checker-cfref -verify %s
typedef signed char BOOL;
typedef int NSInteger;
typedef unsigned int NSUInteger;
-// RUN: clang -verify -fsyntax-only %s
+// RUN: clang-cc -verify -fsyntax-only %s
@class NSString;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface foo
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
// GCC doesn't currently warn about this.
+ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec { // expected-warning {{conflicting types for 'compartmentsForClassifier:withSpecification:'}}
}
-@end
\ No newline at end of file
+@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface foo
- (int)meth;
-// RUN: clang -ast-print %s
+// RUN: clang-cc -ast-print %s
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort()
-// RUN: clang %s
+// RUN: clang-cc %s
// TODO: We don't support rewrite of method definitions
@interface Intf
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
@protocol NSObject
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct { int y; } Abstract;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface NSObject {}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef int NSInteger;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
- im0 { int a; return 0; // expected-error{{missing context for method declaration}}
// expected-error{{expected '}'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface A
- (void) setMoo: (int) x; // expected-note {{previous definition is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MyClass1
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface MyClass
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface INTF
- (void) meth;
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
- (void)compilerTestAgainst; // expected-error {{missing context for method declaration}}
void xx(); // expected-error {{expected method body}}
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
@interface Subclass
+ (int)magicNumber;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef struct CGColor * __attribute__ ((NSObject)) CGColorRef;
static int count;
-// RUN: clang -fsyntax-only -fobjc-gc -verify %s
+// RUN: clang-cc -fsyntax-only -fobjc-gc -verify %s
struct S {
__weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
};
-// RUN: clang -triple i386-apple-darwin9 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s
@interface I
{
-// RUN: clang -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks
+// RUN: clang-cc -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks
// Check property attribute consistency.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface NSSound
@end
-// RUN: clang -fsyntax-only -Wreadonly-setter-attrs -verify %s
+// RUN: clang-cc -fsyntax-only -Wreadonly-setter-attrs -verify %s
@protocol P0
@property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface NSObject
+ alloc;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Tester
@property char PropertyAtomic_char;
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@interface I
{
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@interface Object
@end
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@protocol P1 @end
@protocol P2 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
# 1 "<command line>"
# 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3
typedef signed char BOOL;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef struct _NSZone NSZone;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// rdar://5967199
typedef signed char BOOL;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
@protocol NSObject - (BOOL)isEqual:(id)object; @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Object
+ (id)new;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Test that a property can be synthesize in a category
// implementation with no error.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol P
@property(readonly) int X;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface A
-(int) x;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface I {
int Y;
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang-cc %s -fsyntax-only -verify
// <rdar://problem/6497242> Inherited overridden protocol declared objects don't work
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Test that arithmatic types on property and its ivar have exact match.
@interface Test4
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// PR3234
-// RUN: clang -fsyntax-only -triple x86_64-apple-darwin9 -verify %s
+// RUN: clang-cc -fsyntax-only -triple x86_64-apple-darwin9 -verify %s
typedef signed char BOOL;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Object
-// RUN: clang -fsyntax-only -Werror -verify %s
+// RUN: clang-cc -fsyntax-only -Werror -verify %s
@interface MyClass {
const char *_myName;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface A
-(float) x; // expected-note {{declared at}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface I0
@property(readonly) int x;
-// RUN: clang -triple i386-apple-darwin9 -fsyntax-only -verify %s
+// RUN: clang-cc -triple i386-apple-darwin9 -fsyntax-only -verify %s
@interface foo
@property(nonatomic) int foo __attribute__((weak_import));
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// rdar://5986251
@protocol SomeProtocol
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
__attribute ((unavailable))
@protocol FwProto; // expected-note{{marked unavailable}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol fproto;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@class Protocol;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol B;
@protocol C < B > // expected-warning{{cannot find protocol definition for 'B'}} // expected-note{{previous definition is here}}
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@interface FF
- (void) Meth;
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@protocol P
@end
-// RUN: clang -pedantic -fsyntax-only -verify %s
+// RUN: clang-cc -pedantic -fsyntax-only -verify %s
@protocol MyProto1
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol P0
-bar;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface NSObject @end
@protocol ProtocolA
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol NSObject
- retain;
- release;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol PROTO1
@required
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface INTF1 @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface NSObject @end
@protocol XCElementP @end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// XFAIL
// <rdar://problem/6211479>
-// RUN: clang -verify %s
+// RUN: clang-cc -verify %s
@interface Lancelot @end
@implementation Lancelot
-// RUN: clang %s -fsyntax-only
+// RUN: clang-cc %s -fsyntax-only
@interface NSObject
+ alloc;
-// RUN: clang -ast-print %s
+// RUN: clang-cc -ast-print %s
@interface current
{
-// RUN: clang %s -verify -fsyntax-only &&
-// RUN: clang %s -verify -fsyntax-only -DDECLAREIT
+// RUN: clang-cc %s -verify -fsyntax-only &&
+// RUN: clang-cc %s -verify -fsyntax-only -DDECLAREIT
// a declaration of NSConstantString is not required.
#ifdef DECLAREIT
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface B
+(int) classGetter;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo
- iMethod;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef struct _NSZone NSZone;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface _Child
+ (int) flashCache;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol P1
- (void) P1proto;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@class SUPER, Y;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol p1, p4;
@protocol p2 @end
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only
#include <stdio.h>
@interface Greeter
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
#include <stdarg.h>
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Object
- (void)foo;
-// RUN: clang -fsyntax-only -fobjc-gc -verify %s
+// RUN: clang-cc -fsyntax-only -fobjc-gc -verify %s
struct S {
__weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
typedef signed char BOOL;
typedef unsigned int NSUInteger;
-// RUN: clang -fsyntax-only -verify -fblocks %s
+// RUN: clang-cc -fsyntax-only -verify -fblocks %s
@protocol NSObject;
void bar(id(^)(void));
-// RUN: clang %s -print-stats &&
-// RUN: clang -x objective-c++-header -o %t %s && clang -token-cache %t %s
+// RUN: clang-cc %s -print-stats &&
+// RUN: clang-cc -x objective-c++-header -o %t %s &&
+// RUN: clang-cc -token-cache %t %s
#ifdef __APPLE__
#include <Cocoa/Cocoa.h>
#endif
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern "C" {
@class Protocol;
}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace C {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface Foo
@end
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@protocol NSObject
- retain;
- release;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
@interface A
- (void)asm;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
extern char version[];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// <rdar://problem/6463729>
@class XX;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T> class A;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace N {
template<typename T> class A { };
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T, typename U = float> struct A { };
typedef A<int> A_int;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T, typename U = int> struct A; // expected-note 2{{template is declared here}}
template<> struct A<double, double>; // expected-note{{forward declaration}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T, int N = 2> struct X; // expected-note{{template is declared here}}
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
// FIXME: The Fibonacci/FibonacciEval dance is here to work around our
// inability to parse injected-class-name<template-argument-list>.
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
// Tests that dependent expressions are always allowed, whereas non-dependent
// are checked as usual.
-// RUN: clang -fsyntax-only -verify %s -std=c++0x
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
#ifndef __GXX_EXPERIMENTAL_CXX0X__
#define __CONCAT(__X, __Y) __CONCAT1(__X, __Y)
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
template<typename T, T I, int J>
struct adder {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<int I, int J>
struct Bitfields {
-// RUN: clang -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s
typedef char one_byte;
typedef char (&two_bytes)[2];
typedef char (&four_bytes)[4];
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T>
struct X {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T>
class X {
public:
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T>
struct add_pointer {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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}} \
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T, typename U = const T> struct Def1;
template<> struct Def1<int> {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -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'}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T> struct A { };
-// RUN: clang -fsyntax-only -ftemplate-depth=5 -verify %s
+// RUN: clang-cc -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}} \
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace N {
namespace M {
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
namespace std {
template<typename T> class vector { };
-// RUN: clang -fsyntax-only -std=c++0x -verify %s
+// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s
template<typename T> struct X;
template<int I> struct Y;
-// RUN: clang -fsyntax-only -std=c++98 -verify %s
+// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s
template<typename T> struct X;
template<int I> struct Y;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T,
int I,
template<typename> class TT>
-// RUN: clang -fsyntax-only -std=c++98 -verify %s
+// RUN: clang-cc -fsyntax-only -std=c++98 -verify %s
template<int N> struct A; // expected-note 5{{template parameter is declared here}}
A<0> *a0;
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<template<typename T> class X> struct A; // expected-note 2{{previous template template parameter is here}}
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
template<typename T> class A; // expected-note 2 {{template parameter is declared here}}
// [temp.arg.type]p1
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify %s
class X;
else:
cmd_args.extend(arglist.renderAsInput(input.source))
- jobs.addJob(Jobs.Command(self.toolChain.getProgramPath('clang'),
+ jobs.addJob(Jobs.Command(self.toolChain.getProgramPath('clang-cc'),
cmd_args))
class Darwin_X86_CC1Tool(Tool):
// RUN: xcc -ccc-print-phases -### -arch ppc -arch ppc %s | grep 'linker,' | count 1 &&
// Check that -ccc-clang-archs is honored.
-// RUN: xcc -ccc-clang-archs i386 -### -arch ppc -arch i386 %s 2>&1 | grep 'clang"' | count 1
+// RUN: xcc -ccc-clang-archs i386 -### -arch ppc -arch i386 %s 2>&1 | grep 'clang-cc"' | count 1
int main() {
printf("Hello, World!\n");