summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-21 22:15:06 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-21 22:15:06 +0000
commit36c569fb33842342d293388eef57fdd8e51e4d60 (patch)
tree007dcbe095ea7d3a20e8f35d7f720ad7c3b6ef52 /clang/lib/Frontend/RewriteObjC.cpp
parent7126183006ec694211afcf3b82b92e96afee01bc (diff)
downloadbcm5719-llvm-36c569fb33842342d293388eef57fdd8e51e4d60.tar.gz
bcm5719-llvm-36c569fb33842342d293388eef57fdd8e51e4d60.zip
Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. llvm-svn: 96766
Diffstat (limited to 'clang/lib/Frontend/RewriteObjC.cpp')
-rw-r--r--clang/lib/Frontend/RewriteObjC.cpp50
1 files changed, 37 insertions, 13 deletions
diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp
index fff8b54ba6c..d2fe599c763 100644
--- a/clang/lib/Frontend/RewriteObjC.cpp
+++ b/clang/lib/Frontend/RewriteObjC.cpp
@@ -2165,8 +2165,10 @@ void RewriteObjC::SynthSelGetUidFunctionDecl() {
llvm::SmallVector<QualType, 16> ArgTys;
ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
QualType getFuncType = Context->getFunctionType(Context->getObjCSelType(),
- &ArgTys[0], ArgTys.size(),
- false /*isVariadic*/, 0);
+ &ArgTys[0], ArgTys.size(),
+ false /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
SelGetUidFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
SelGetUidIdent, getFuncType, 0,
@@ -2261,7 +2263,9 @@ void RewriteObjC::SynthSuperContructorFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- false, 0);
+ false, 0,
+ false, false, 0, 0, false,
+ CC_Default);
SuperContructorFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2280,7 +2284,9 @@ void RewriteObjC::SynthMsgSendFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- true /*isVariadic*/, 0);
+ true /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
MsgSendFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2302,7 +2308,9 @@ void RewriteObjC::SynthMsgSendSuperFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- true /*isVariadic*/, 0);
+ true /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
MsgSendSuperFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2321,7 +2329,9 @@ void RewriteObjC::SynthMsgSendStretFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- true /*isVariadic*/, 0);
+ true /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
MsgSendStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2345,7 +2355,9 @@ void RewriteObjC::SynthMsgSendSuperStretFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- true /*isVariadic*/, 0);
+ true /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
MsgSendSuperStretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2364,7 +2376,9 @@ void RewriteObjC::SynthMsgSendFpretFunctionDecl() {
ArgTys.push_back(argT);
QualType msgSendType = Context->getFunctionType(Context->DoubleTy,
&ArgTys[0], ArgTys.size(),
- true /*isVariadic*/, 0);
+ true /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
MsgSendFpretFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
msgSendIdent, msgSendType, 0,
@@ -2378,7 +2392,9 @@ void RewriteObjC::SynthGetClassFunctionDecl() {
ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
QualType getClassType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- false /*isVariadic*/, 0);
+ false /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
GetClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
getClassIdent, getClassType, 0,
@@ -2392,7 +2408,9 @@ void RewriteObjC::SynthGetMetaClassFunctionDecl() {
ArgTys.push_back(Context->getPointerType(Context->CharTy.withConst()));
QualType getClassType = Context->getFunctionType(Context->getObjCIdType(),
&ArgTys[0], ArgTys.size(),
- false /*isVariadic*/, 0);
+ false /*isVariadic*/, 0,
+ false, false, 0, 0, false,
+ CC_Default);
GetMetaClassFunctionDecl = FunctionDecl::Create(*Context, TUDecl,
SourceLocation(),
getClassIdent, getClassType, 0,
@@ -2804,7 +2822,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) {
QualType castType = Context->getFunctionType(returnType,
&ArgTypes[0], ArgTypes.size(),
// If we don't have a method decl, force a variadic cast.
- Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : true, 0);
+ Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : true, 0,
+ false, false, 0, 0, false,
+ CC_Default);
castType = Context->getPointerType(castType);
cast = NoTypeInfoCStyleCastExpr(Context, castType, CastExpr::CK_Unknown,
cast);
@@ -2833,7 +2853,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) {
// Now do the "normal" pointer to function cast.
castType = Context->getFunctionType(returnType,
&ArgTypes[0], ArgTypes.size(),
- Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false, 0);
+ Exp->getMethodDecl() ? Exp->getMethodDecl()->isVariadic() : false, 0,
+ false, false, 0, 0, false,
+ CC_Default);
castType = Context->getPointerType(castType);
cast = NoTypeInfoCStyleCastExpr(Context, castType, CastExpr::CK_Unknown,
cast);
@@ -4306,7 +4328,9 @@ Stmt *RewriteObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp) {
}
// Now do the pointer to function cast.
QualType PtrToFuncCastType = Context->getFunctionType(Exp->getType(),
- &ArgTypes[0], ArgTypes.size(), false/*no variadic*/, 0);
+ &ArgTypes[0], ArgTypes.size(), false/*no variadic*/, 0,
+ false, false, 0, 0,
+ false, CC_Default);
PtrToFuncCastType = Context->getPointerType(PtrToFuncCastType);
OpenPOWER on IntegriCloud