diff options
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 98 |
1 files changed, 37 insertions, 61 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index f5456ee..d455426 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -293,11 +293,10 @@ static ObjCMethodDecl *getNSNumberFactoryMethod(Sema &S, SourceLocation Loc, /*isImplicitlyDeclared=*/true, /*isDefined=*/false, ObjCMethodDecl::Required, /*HasRelatedResultType=*/false); - ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, - SourceLocation(), SourceLocation(), - &CX.Idents.get("value"), - NumberType, /*TInfo=*/nullptr, - SC_None, nullptr); + ParmVarDecl *value = ParmVarDecl::Create( + S.Context, Method, SourceLocation(), SourceLocation(), + &CX.Idents.get("value"), NumberType, /*TInfo=*/nullptr, + StorageClass::None, nullptr); Method->setMethodParams(S.Context, value, None); } @@ -570,13 +569,11 @@ ExprResult Sema::BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr) { /*isDefined=*/false, ObjCMethodDecl::Required, /*HasRelatedResultType=*/false); QualType ConstCharType = Context.CharTy.withConst(); - ParmVarDecl *value = - ParmVarDecl::Create(Context, M, - SourceLocation(), SourceLocation(), - &Context.Idents.get("value"), - Context.getPointerType(ConstCharType), - /*TInfo=*/nullptr, - SC_None, nullptr); + ParmVarDecl *value = ParmVarDecl::Create( + Context, M, SourceLocation(), SourceLocation(), + &Context.Idents.get("value"), + Context.getPointerType(ConstCharType), + /*TInfo=*/nullptr, StorageClass::None, nullptr); M->setMethodParams(Context, value, None); BoxingMethod = M; } @@ -686,23 +683,17 @@ ExprResult Sema::BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr) { SmallVector<ParmVarDecl *, 2> Params; - ParmVarDecl *bytes = - ParmVarDecl::Create(Context, M, - SourceLocation(), SourceLocation(), - &Context.Idents.get("bytes"), - Context.VoidPtrTy.withConst(), - /*TInfo=*/nullptr, - SC_None, nullptr); + ParmVarDecl *bytes = ParmVarDecl::Create( + Context, M, SourceLocation(), SourceLocation(), + &Context.Idents.get("bytes"), Context.VoidPtrTy.withConst(), + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(bytes); QualType ConstCharType = Context.CharTy.withConst(); - ParmVarDecl *type = - ParmVarDecl::Create(Context, M, - SourceLocation(), SourceLocation(), - &Context.Idents.get("type"), - Context.getPointerType(ConstCharType), - /*TInfo=*/nullptr, - SC_None, nullptr); + ParmVarDecl *type = ParmVarDecl::Create( + Context, M, SourceLocation(), SourceLocation(), + &Context.Idents.get("type"), Context.getPointerType(ConstCharType), + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(type); M->setMethodParams(Context, Params, None); @@ -817,21 +808,15 @@ ExprResult Sema::BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements) { /*isImplicitlyDeclared=*/true, /*isDefined=*/false, ObjCMethodDecl::Required, false); SmallVector<ParmVarDecl *, 2> Params; - ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, - SourceLocation(), - SourceLocation(), - &Context.Idents.get("objects"), - Context.getPointerType(IdT), - /*TInfo=*/nullptr, - SC_None, nullptr); + ParmVarDecl *objects = ParmVarDecl::Create( + Context, Method, SourceLocation(), SourceLocation(), + &Context.Idents.get("objects"), Context.getPointerType(IdT), + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(objects); - ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, - SourceLocation(), - SourceLocation(), - &Context.Idents.get("cnt"), - Context.UnsignedLongTy, - /*TInfo=*/nullptr, SC_None, - nullptr); + ParmVarDecl *cnt = ParmVarDecl::Create( + Context, Method, SourceLocation(), SourceLocation(), + &Context.Idents.get("cnt"), Context.UnsignedLongTy, + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(cnt); Method->setMethodParams(Context, Params, None); } @@ -979,29 +964,20 @@ ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, /*isImplicitlyDeclared=*/true, /*isDefined=*/false, ObjCMethodDecl::Required, false); SmallVector<ParmVarDecl *, 3> Params; - ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, - SourceLocation(), - SourceLocation(), - &Context.Idents.get("objects"), - Context.getPointerType(IdT), - /*TInfo=*/nullptr, SC_None, - nullptr); + ParmVarDecl *objects = ParmVarDecl::Create( + Context, Method, SourceLocation(), SourceLocation(), + &Context.Idents.get("objects"), Context.getPointerType(IdT), + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(objects); - ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, - SourceLocation(), - SourceLocation(), - &Context.Idents.get("keys"), - Context.getPointerType(IdT), - /*TInfo=*/nullptr, SC_None, - nullptr); + ParmVarDecl *keys = ParmVarDecl::Create( + Context, Method, SourceLocation(), SourceLocation(), + &Context.Idents.get("keys"), Context.getPointerType(IdT), + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(keys); - ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, - SourceLocation(), - SourceLocation(), - &Context.Idents.get("cnt"), - Context.UnsignedLongTy, - /*TInfo=*/nullptr, SC_None, - nullptr); + ParmVarDecl *cnt = ParmVarDecl::Create( + Context, Method, SourceLocation(), SourceLocation(), + &Context.Idents.get("cnt"), Context.UnsignedLongTy, + /*TInfo=*/nullptr, StorageClass::None, nullptr); Params.push_back(cnt); Method->setMethodParams(Context, Params, None); } |