aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-01-04 22:40:33 +0000
committerChad Rosier <mcrosier@apple.com>2013-01-04 22:40:33 +0000
commite3b29886ab053123feeb256e92bf8af23ba136cc (patch)
treeb05bd768d0b0be87d118e519dbf840ffe8d3fa03 /lib/Rewrite
parent7ac928b4dc15b5eeb13ea62e96330a145cc71068 (diff)
Fix indent and remove parameter with a matching default value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r--lib/Rewrite/Frontend/RewriteModernObjC.cpp86
-rw-r--r--lib/Rewrite/Frontend/RewriteObjC.cpp82
2 files changed, 74 insertions, 94 deletions
diff --git a/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/lib/Rewrite/Frontend/RewriteModernObjC.cpp
index 81e334e212..a113fec39a 100644
--- a/lib/Rewrite/Frontend/RewriteModernObjC.cpp
+++ b/lib/Rewrite/Frontend/RewriteModernObjC.cpp
@@ -2309,11 +2309,10 @@ void RewriteModernObjC::SynthSelGetUidFunctionDecl() {
QualType getFuncType =
getSimpleFunctionType(Context->getObjCSelType(), &ArgTys[0], ArgTys.size());
SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- SelGetUidIdent, getFuncType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ SelGetUidIdent, getFuncType, 0,
+ SC_Extern, SC_None);
}
void RewriteModernObjC::RewriteFunctionDecl(FunctionDecl *FD) {
@@ -2408,11 +2407,10 @@ void RewriteModernObjC::SynthSuperContructorFunctionDecl() {
QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size());
SuperContructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType,
+ 0, SC_Extern, SC_None);
}
// SynthMsgSendFunctionDecl - id objc_msgSend(id self, SEL op, ...);
@@ -2429,11 +2427,10 @@ void RewriteModernObjC::SynthMsgSendFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendSuperFunctionDecl - id objc_msgSendSuper(void);
@@ -2445,11 +2442,10 @@ void RewriteModernObjC::SynthMsgSendSuperFunctionDecl() {
&ArgTys[0], 1,
true /*isVariadic*/);
MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendStretFunctionDecl - id objc_msgSend_stret(id self, SEL op, ...);
@@ -2466,11 +2462,10 @@ void RewriteModernObjC::SynthMsgSendStretFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendSuperStretFunctionDecl -
@@ -2486,9 +2481,9 @@ void RewriteModernObjC::SynthMsgSendSuperStretFunctionDecl() {
MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ msgSendIdent,
+ msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendFpretFunctionDecl - double objc_msgSend_fpret(id self, SEL op, ...);
@@ -2505,11 +2500,10 @@ void RewriteModernObjC::SynthMsgSendFpretFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthGetClassFunctionDecl - Class objc_getClass(const char *name);
@@ -2520,11 +2514,10 @@ void RewriteModernObjC::SynthGetClassFunctionDecl() {
QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(),
&ArgTys[0], ArgTys.size());
GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- getClassIdent, getClassType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ getClassIdent, getClassType, 0,
+ SC_Extern, SC_None);
}
// SynthGetSuperClassFunctionDecl - Class class_getSuperclass(Class cls);
@@ -2540,9 +2533,7 @@ void RewriteModernObjC::SynthGetSuperClassFunctionDecl() {
SourceLocation(),
getSuperClassIdent,
getClassType, 0,
- SC_Extern,
- SC_None,
- false);
+ SC_Extern, SC_None);
}
// SynthGetMetaClassFunctionDecl - Class objc_getMetaClass(const char *name);
@@ -2553,11 +2544,10 @@ void RewriteModernObjC::SynthGetMetaClassFunctionDecl() {
QualType getClassType = getSimpleFunctionType(Context->getObjCClassType(),
&ArgTys[0], ArgTys.size());
GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- getClassIdent, getClassType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ getClassIdent, getClassType,
+ 0, SC_Extern, SC_None);
}
Stmt *RewriteModernObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {
@@ -3213,8 +3203,8 @@ Expr *RewriteModernObjC::SynthMsgSendStretCallExpr(FunctionDecl *MsgSendStretFla
// AST for __Stretn(receiver, args).s;
IdentifierInfo *ID = &Context->Idents.get(name);
FunctionDecl *FD = FunctionDecl::Create(*Context, TUDecl, SourceLocation(),
- SourceLocation(), ID, castType, 0, SC_Extern,
- SC_None, false, false);
+ SourceLocation(), ID, castType, 0,
+ SC_Extern, SC_None, false, false);
DeclRefExpr *DRE = new (Context) DeclRefExpr(FD, false, castType, VK_RValue,
SourceLocation());
CallExpr *STCE = new (Context) CallExpr(*Context, DRE, MsgExprs,
diff --git a/lib/Rewrite/Frontend/RewriteObjC.cpp b/lib/Rewrite/Frontend/RewriteObjC.cpp
index abde3513e7..e78bd6d356 100644
--- a/lib/Rewrite/Frontend/RewriteObjC.cpp
+++ b/lib/Rewrite/Frontend/RewriteObjC.cpp
@@ -2265,11 +2265,10 @@ void RewriteObjC::SynthSelGetUidFunctionDecl() {
QualType getFuncType =
getSimpleFunctionType(Context->getObjCSelType(), &ArgTys[0], ArgTys.size());
SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- SelGetUidIdent, getFuncType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ SelGetUidIdent, getFuncType, 0,
+ SC_Extern, SC_None);
}
void RewriteObjC::RewriteFunctionDecl(FunctionDecl *FD) {
@@ -2362,11 +2361,10 @@ void RewriteObjC::SynthSuperContructorFunctionDecl() {
QualType msgSendType = getSimpleFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size());
SuperContructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType,
+ 0, SC_Extern, SC_None);
}
// SynthMsgSendFunctionDecl - id objc_msgSend(id self, SEL op, ...);
@@ -2383,11 +2381,10 @@ void RewriteObjC::SynthMsgSendFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendSuperFunctionDecl - id objc_msgSendSuper(struct objc_super *, SEL op, ...);
@@ -2407,11 +2404,10 @@ void RewriteObjC::SynthMsgSendSuperFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendStretFunctionDecl - id objc_msgSend_stret(id self, SEL op, ...);
@@ -2428,11 +2424,10 @@ void RewriteObjC::SynthMsgSendStretFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendSuperStretFunctionDecl -
@@ -2456,9 +2451,9 @@ void RewriteObjC::SynthMsgSendSuperStretFunctionDecl() {
MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ msgSendIdent,
+ msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthMsgSendFpretFunctionDecl - double objc_msgSend_fpret(id self, SEL op, ...);
@@ -2475,11 +2470,10 @@ void RewriteObjC::SynthMsgSendFpretFunctionDecl() {
&ArgTys[0], ArgTys.size(),
true /*isVariadic*/);
MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- msgSendIdent, msgSendType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ msgSendIdent, msgSendType, 0,
+ SC_Extern, SC_None);
}
// SynthGetClassFunctionDecl - id objc_getClass(const char *name);
@@ -2490,11 +2484,10 @@ void RewriteObjC::SynthGetClassFunctionDecl() {
QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size());
GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- getClassIdent, getClassType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ getClassIdent, getClassType, 0,
+ SC_Extern, SC_None);
}
// SynthGetSuperClassFunctionDecl - Class class_getSuperclass(Class cls);
@@ -2510,9 +2503,7 @@ void RewriteObjC::SynthGetSuperClassFunctionDecl() {
SourceLocation(),
getSuperClassIdent,
getClassType, 0,
- SC_Extern,
- SC_None,
- false);
+ SC_Extern, SC_None);
}
// SynthGetMetaClassFunctionDecl - id objc_getMetaClass(const char *name);
@@ -2523,11 +2514,10 @@ void RewriteObjC::SynthGetMetaClassFunctionDecl() {
QualType getClassType = getSimpleFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size());
GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
- SourceLocation(),
- SourceLocation(),
- getClassIdent, getClassType, 0,
- SC_Extern,
- SC_None, false);
+ SourceLocation(),
+ SourceLocation(),
+ getClassIdent, getClassType,
+ 0, SC_Extern, SC_None);
}
Stmt *RewriteObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {