diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/Sema.h | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 16 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 10 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 18 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 34 | ||||
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 10 |
9 files changed, 58 insertions, 58 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 68e0ce8f7d9..22bfee47fa9 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -458,7 +458,7 @@ public: Expr *From, QualType ToType, OverloadCandidateSet& CandidateSet); void AddSurrogateCandidate(CXXConversionDecl *Conversion, - const FunctionTypeProto *Proto, + const FunctionProtoType *Proto, Expr *Object, Expr **Args, unsigned NumArgs, OverloadCandidateSet& CandidateSet); bool AddOperatorCandidates(OverloadedOperatorKind Op, Scope *S, @@ -1107,7 +1107,7 @@ public: IdentifierInfo &Member); bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, - const FunctionTypeProto *Proto, + const FunctionProtoType *Proto, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc); diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index fdd22fa4bfb..3e6bd5a2efb 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -144,8 +144,8 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) { if (const FormatAttr *Format = FDecl->getAttr<FormatAttr>()) { if (Format->getType() == "printf") { bool HasVAListArg = false; - if (const FunctionTypeProto *Proto - = FDecl->getType()->getAsFunctionTypeProto()) + if (const FunctionProtoType *Proto + = FDecl->getType()->getAsFunctionProtoType()) HasVAListArg = !Proto->isVariadic(); CheckPrintfArguments(TheCall, HasVAListArg, Format->getFormatIdx() - 1, Format->getFirstArg() - 1); @@ -210,8 +210,8 @@ bool Sema::SemaBuiltinVAStart(CallExpr *TheCall) { // Determine whether the current function is variadic or not. bool isVariadic; if (getCurFunctionDecl()) { - if (FunctionTypeProto* FTP = - dyn_cast<FunctionTypeProto>(getCurFunctionDecl()->getType())) + if (FunctionProtoType* FTP = + dyn_cast<FunctionProtoType>(getCurFunctionDecl()->getType())) isVariadic = FTP->isVariadic(); else isVariadic = false; diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 0ad3839fde1..b3f25005392 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -340,7 +340,7 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid, // Create Decl objects for each parameter, adding them to the // FunctionDecl. - if (FunctionTypeProto *FT = dyn_cast<FunctionTypeProto>(R)) { + if (FunctionProtoType *FT = dyn_cast<FunctionProtoType>(R)) { llvm::SmallVector<ParmVarDecl*, 16> Params; for (unsigned i = 0, e = FT->getNumArgs(); i != e; ++i) Params.push_back(ParmVarDecl::Create(Context, New, SourceLocation(), 0, @@ -609,9 +609,9 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) { if (!getLangOptions().CPlusPlus && Context.typesAreCompatible(OldQType, NewQType)) { const FunctionType *NewFuncType = NewQType->getAsFunctionType(); - const FunctionTypeProto *OldProto = 0; - if (isa<FunctionTypeNoProto>(NewFuncType) && - (OldProto = OldQType->getAsFunctionTypeProto())) { + const FunctionProtoType *OldProto = 0; + if (isa<FunctionNoProtoType>(NewFuncType) && + (OldProto = OldQType->getAsFunctionProtoType())) { // The old declaration provided a function prototype, but the // new declaration does not. Merge in the prototype. llvm::SmallVector<QualType, 16> ParamTypes(OldProto->arg_type_begin(), @@ -625,7 +625,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) { // Synthesize a parameter for each argument type. llvm::SmallVector<ParmVarDecl*, 16> Params; - for (FunctionTypeProto::arg_type_iterator + for (FunctionProtoType::arg_type_iterator ParamType = OldProto->arg_type_begin(), ParamEnd = OldProto->arg_type_end(); ParamType != ParamEnd; ++ParamType) { @@ -1834,7 +1834,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, // typedef void fn(int); // fn f; // @endcode - const FunctionTypeProto *FT = R->getAsFunctionTypeProto(); + const FunctionProtoType *FT = R->getAsFunctionProtoType(); if (!FT) { // This is a typedef of a function with no prototype, so we // don't need to do anything. @@ -1845,7 +1845,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, } else { // Synthesize a parameter for each argument type. llvm::SmallVector<ParmVarDecl*, 16> Params; - for (FunctionTypeProto::arg_type_iterator ArgType = FT->arg_type_begin(); + for (FunctionProtoType::arg_type_iterator ArgType = FT->arg_type_begin(); ArgType != FT->arg_type_end(); ++ArgType) { ParmVarDecl *Param = ParmVarDecl::Create(Context, DC, SourceLocation(), 0, @@ -1900,7 +1900,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, // Functions marked "overloadable" must have a prototype (that // we can't get through declaration merging). - if (!R->getAsFunctionTypeProto()) { + if (!R->getAsFunctionProtoType()) { Diag(NewFD->getLocation(), diag::err_attribute_overloadable_no_prototype) << NewFD; InvalidDecl = true; diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index fb8b795af22..8757005a478 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -56,7 +56,7 @@ static bool isFunctionOrMethod(Decl *d) { /// isFunctionOrMethod. static bool hasFunctionProto(Decl *d) { if (const FunctionType *FnTy = getFunctionType(d)) { - return isa<FunctionTypeProto>(FnTy); + return isa<FunctionProtoType>(FnTy); } else { assert(isa<ObjCMethodDecl>(d)); return true; @@ -68,20 +68,20 @@ static bool hasFunctionProto(Decl *d) { /// hasFunctionProto first). static unsigned getFunctionOrMethodNumArgs(Decl *d) { if (const FunctionType *FnTy = getFunctionType(d)) - return cast<FunctionTypeProto>(FnTy)->getNumArgs(); + return cast<FunctionProtoType>(FnTy)->getNumArgs(); return cast<ObjCMethodDecl>(d)->param_size(); } static QualType getFunctionOrMethodArgType(Decl *d, unsigned Idx) { if (const FunctionType *FnTy = getFunctionType(d)) - return cast<FunctionTypeProto>(FnTy)->getArgType(Idx); + return cast<FunctionProtoType>(FnTy)->getArgType(Idx); return cast<ObjCMethodDecl>(d)->param_begin()[Idx]->getType(); } static bool isFunctionOrMethodVariadic(Decl *d) { if (const FunctionType *FnTy = getFunctionType(d)) { - const FunctionTypeProto *proto = cast<FunctionTypeProto>(FnTy); + const FunctionProtoType *proto = cast<FunctionProtoType>(FnTy); return proto->isVariadic(); } else { return cast<ObjCMethodDecl>(d)->isVariadic(); @@ -688,7 +688,7 @@ static void HandleSentinelAttr(Decl *d, const AttributeList &Attr, Sema &S) { if (FunctionDecl *FD = dyn_cast<FunctionDecl>(d)) { QualType FT = FD->getType(); - if (!FT->getAsFunctionTypeProto()->isVariadic()) { + if (!FT->getAsFunctionProtoType()->isVariadic()) { S.Diag(Attr.getLoc(), diag::warn_attribute_sentinel_not_variadic); return; } diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 8dd409bd218..1c98529fa89 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1077,7 +1077,7 @@ bool Sema::CheckConstructorDeclarator(Declarator &D, QualType &R, << SourceRange(D.getDeclSpec().getTypeSpecTypeLoc()) << SourceRange(D.getIdentifierLoc()); } - if (R->getAsFunctionTypeProto()->getTypeQuals() != 0) { + if (R->getAsFunctionProtoType()->getTypeQuals() != 0) { DeclaratorChunk::FunctionTypeInfo &FTI = D.getTypeObject(0).Fun; if (FTI.TypeQuals & QualType::Const) Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_constructor) @@ -1095,7 +1095,7 @@ bool Sema::CheckConstructorDeclarator(Declarator &D, QualType &R, // return type, since constructors don't have return types. We // *always* have to do this, because GetTypeForDeclarator will // put in a result type of "int" when none was specified. - const FunctionTypeProto *Proto = R->getAsFunctionTypeProto(); + const FunctionProtoType *Proto = R->getAsFunctionProtoType(); R = Context.getFunctionType(Context.VoidTy, Proto->arg_type_begin(), Proto->getNumArgs(), Proto->isVariadic(), @@ -1187,7 +1187,7 @@ bool Sema::CheckDestructorDeclarator(Declarator &D, QualType &R, << SourceRange(D.getDeclSpec().getTypeSpecTypeLoc()) << SourceRange(D.getIdentifierLoc()); } - if (R->getAsFunctionTypeProto()->getTypeQuals() != 0) { + if (R->getAsFunctionProtoType()->getTypeQuals() != 0) { DeclaratorChunk::FunctionTypeInfo &FTI = D.getTypeObject(0).Fun; if (FTI.TypeQuals & QualType::Const) Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_destructor) @@ -1201,7 +1201,7 @@ bool Sema::CheckDestructorDeclarator(Declarator &D, QualType &R, } // Make sure we don't have any parameters. - if (R->getAsFunctionTypeProto()->getNumArgs() > 0) { + if (R->getAsFunctionProtoType()->getNumArgs() > 0) { Diag(D.getIdentifierLoc(), diag::err_destructor_with_params); // Delete the parameters. @@ -1209,7 +1209,7 @@ bool Sema::CheckDestructorDeclarator(Declarator &D, QualType &R, } // Make sure the destructor isn't variadic. - if (R->getAsFunctionTypeProto()->isVariadic()) + if (R->getAsFunctionProtoType()->isVariadic()) Diag(D.getIdentifierLoc(), diag::err_destructor_variadic); // Rebuild the function type "R" without any type qualifiers or @@ -1258,7 +1258,7 @@ bool Sema::CheckConversionDeclarator(Declarator &D, QualType &R, } // Make sure we don't have any parameters. - if (R->getAsFunctionTypeProto()->getNumArgs() > 0) { + if (R->getAsFunctionProtoType()->getNumArgs() > 0) { Diag(D.getIdentifierLoc(), diag::err_conv_function_with_params); // Delete the parameters. @@ -1266,7 +1266,7 @@ bool Sema::CheckConversionDeclarator(Declarator &D, QualType &R, } // Make sure the conversion function isn't variadic. - if (R->getAsFunctionTypeProto()->isVariadic()) + if (R->getAsFunctionProtoType()->isVariadic()) Diag(D.getIdentifierLoc(), diag::err_conv_function_variadic); // C++ [class.conv.fct]p4: @@ -1285,7 +1285,7 @@ bool Sema::CheckConversionDeclarator(Declarator &D, QualType &R, // of the errors above fired) and with the conversion type as the // return type. R = Context.getFunctionType(ConvType, 0, 0, false, - R->getAsFunctionTypeProto()->getTypeQuals()); + R->getAsFunctionProtoType()->getTypeQuals()); // C++0x explicit conversion operators. if (D.getDeclSpec().isExplicitSpecified() && !getLangOptions().CPlusPlus0x) @@ -2122,7 +2122,7 @@ bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) { // Overloaded operators other than operator() cannot be variadic. if (Op != OO_Call && - FnDecl->getType()->getAsFunctionTypeProto()->isVariadic()) { + FnDecl->getType()->getAsFunctionProtoType()->isVariadic()) { return Diag(FnDecl->getLocation(), diag::err_operator_overload_variadic) << FnDecl->getDeclName(); } diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 01be6b2474c..29d5f59de91 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -887,8 +887,8 @@ Sema::ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc, // type. QualType T = Func->getType(); QualType NoProtoType = T; - if (const FunctionTypeProto *Proto = T->getAsFunctionTypeProto()) - NoProtoType = Context.getFunctionTypeNoProto(Proto->getResultType()); + if (const FunctionProtoType *Proto = T->getAsFunctionProtoType()) + NoProtoType = Context.getFunctionNoProtoType(Proto->getResultType()); return Owned(BuildDeclRefExpr(VD, NoProtoType, Loc, false, false, SS)); } } @@ -1949,7 +1949,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc, bool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, - const FunctionTypeProto *Proto, + const FunctionProtoType *Proto, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc) { // C99 6.5.2.2p7 - the arguments are implicitly converted, as if by @@ -2164,12 +2164,12 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc, // We know the result type of the call, set it. TheCall->setType(FuncT->getResultType().getNonReferenceType()); - if (const FunctionTypeProto *Proto = dyn_cast<FunctionTypeProto>(FuncT)) { + if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FuncT)) { if (ConvertArgumentsForCall(&*TheCall, Fn, FDecl, Proto, Args, NumArgs, RParenLoc)) return ExprError(); } else { - assert(isa<FunctionTypeNoProto>(FuncT) && "Unknown FunctionType!"); + assert(isa<FunctionNoProtoType>(FuncT) && "Unknown FunctionType!"); // Promote the arguments (C99 6.5.2.2p6). for (unsigned i = 0; i != NumArgs; i++) { @@ -4501,7 +4501,7 @@ Sema::ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, StmtTy *body, QualType BlockTy; if (!BSI->hasPrototype) - BlockTy = Context.getFunctionTypeNoProto(RetTy); + BlockTy = Context.getFunctionNoProtoType(RetTy); else BlockTy = Context.getFunctionType(RetTy, &ArgTypes[0], ArgTypes.size(), BSI->isVariadic, 0); diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 7c5464a4a30..00849a68812 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -1269,12 +1269,12 @@ addAssociatedClassesAndNamespaces(QualType T, Context, AssociatedNamespaces, AssociatedClasses); - const FunctionTypeProto *Proto = dyn_cast<FunctionTypeProto>(FunctionType); + const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FunctionType); if (!Proto) return; // Argument types - for (FunctionTypeProto::arg_type_iterator Arg = Proto->arg_type_begin(), + for (FunctionProtoType::arg_type_iterator Arg = Proto->arg_type_begin(), ArgEnd = Proto->arg_type_end(); Arg != ArgEnd; ++Arg) addAssociatedClassesAndNamespaces(*Arg, Context, diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 5392af4abf0..c33389eda4c 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -310,12 +310,12 @@ Sema::IsOverload(FunctionDecl *New, Decl* OldD, // If either of these functions is a K&R-style function (no // prototype), then we consider them to have matching signatures. - if (isa<FunctionTypeNoProto>(OldQType.getTypePtr()) || - isa<FunctionTypeNoProto>(NewQType.getTypePtr())) + if (isa<FunctionNoProtoType>(OldQType.getTypePtr()) || + isa<FunctionNoProtoType>(NewQType.getTypePtr())) return false; - FunctionTypeProto* OldType = cast<FunctionTypeProto>(OldQType.getTypePtr()); - FunctionTypeProto* NewType = cast<FunctionTypeProto>(NewQType.getTypePtr()); + FunctionProtoType* OldType = cast<FunctionProtoType>(OldQType.getTypePtr()); + FunctionProtoType* NewType = cast<FunctionProtoType>(NewQType.getTypePtr()); // The signature of a function includes the types of its // parameters (C++ 1.3.10), which includes the presence or absence @@ -1052,10 +1052,10 @@ bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType, // differences in the argument and result types are in Objective-C // pointer conversions. If so, we permit the conversion (but // complain about it). - const FunctionTypeProto *FromFunctionType - = FromPointeeType->getAsFunctionTypeProto(); - const FunctionTypeProto *ToFunctionType - = ToPointeeType->getAsFunctionTypeProto(); + const FunctionProtoType *FromFunctionType + = FromPointeeType->getAsFunctionProtoType(); + const FunctionProtoType *ToFunctionType + = ToPointeeType->getAsFunctionProtoType(); if (FromFunctionType && ToFunctionType) { // If the function types are exactly the same, this isn't an // Objective-C pointer conversion. @@ -1985,8 +1985,8 @@ Sema::AddOverloadCandidate(FunctionDecl *Function, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions) { - const FunctionTypeProto* Proto - = dyn_cast<FunctionTypeProto>(Function->getType()->getAsFunctionType()); + const FunctionProtoType* Proto + = dyn_cast<FunctionProtoType>(Function->getType()->getAsFunctionType()); assert(Proto && "Functions without a prototype cannot be overloaded"); assert(!isa<CXXConversionDecl>(Function) && "Use AddConversionCandidate for conversion functions"); @@ -2075,8 +2075,8 @@ Sema::AddMethodCandidate(CXXMethodDecl *Method, Expr *Object, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions) { - const FunctionTypeProto* Proto - = dyn_cast<FunctionTypeProto>(Method->getType()->getAsFunctionType()); + const FunctionProtoType* Proto + = dyn_cast<FunctionProtoType>(Method->getType()->getAsFunctionType()); assert(Proto && "Methods without a prototype cannot be overloaded"); assert(!isa<CXXConversionDecl>(Method) && "Use AddConversionCandidate for conversion functions"); @@ -2228,7 +2228,7 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion, /// with the given arguments (C++ [over.call.object]p2-4). Proto is /// the type of function that we'll eventually be calling. void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion, - const FunctionTypeProto *Proto, + const FunctionProtoType *Proto, Expr *Object, Expr **Args, unsigned NumArgs, OverloadCandidateSet& CandidateSet) { CandidateSet.push_back(OverloadCandidate()); @@ -2318,7 +2318,7 @@ IsAcceptableNonMemberOperatorCandidate(FunctionDecl *Fn, if (T1->isRecordType() || (!T2.isNull() && T2->isRecordType())) return true; - const FunctionTypeProto *Proto = Fn->getType()->getAsFunctionTypeProto(); + const FunctionProtoType *Proto = Fn->getType()->getAsFunctionProtoType(); if (Proto->getNumArgs() < 1) return false; @@ -3773,7 +3773,7 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, MemExpr->setBase(ObjectArg); // Convert the rest of the arguments - const FunctionTypeProto *Proto = cast<FunctionTypeProto>(Method->getType()); + const FunctionProtoType *Proto = cast<FunctionProtoType>(Method->getType()); if (ConvertArgumentsForCall(&*TheCall, MemExpr, Method, Proto, Args, NumArgs, RParenLoc)) return true; @@ -3842,7 +3842,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object, if (const PointerType *ConvPtrType = ConvType->getAsPointerType()) ConvType = ConvPtrType->getPointeeType(); - if (const FunctionTypeProto *Proto = ConvType->getAsFunctionTypeProto()) + if (const FunctionProtoType *Proto = ConvType->getAsFunctionProtoType()) AddSurrogateCandidate(Conv, Proto, Object, Args, NumArgs, CandidateSet); } @@ -3909,7 +3909,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object, // that calls this method, using Object for the implicit object // parameter and passing along the remaining arguments. CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); - const FunctionTypeProto *Proto = Method->getType()->getAsFunctionTypeProto(); + const FunctionProtoType *Proto = Method->getType()->getAsFunctionProtoType(); unsigned NumArgsInProto = Proto->getNumArgs(); unsigned NumArgsToCheck = NumArgs; diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 47cf8e5611d..d1dcca6cf12 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -172,7 +172,7 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) { Expr *E = static_cast<Expr *>(DS.getTypeRep()); assert(E && "Didn't get an expression for typeof?"); // TypeQuals handled by caller. - Result = Context.getTypeOfExpr(E); + Result = Context.getTypeOfExprType(E); break; } case DeclSpec::TST_error: @@ -505,7 +505,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) { T = Context.getFunctionType(T, NULL, 0, FTI.isVariadic, 0); } else { // Simple void foo(), where the incoming T is the result type. - T = Context.getFunctionTypeNoProto(T); + T = Context.getFunctionNoProtoType(T); } } else if (FTI.ArgInfo[0].Param == 0) { // C99 6.7.5.3p3: Reject int(x,y,z) when it's not a function definition. @@ -540,7 +540,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) { // Look for 'void'. void is allowed only as a single argument to a // function with no other parameters (C99 6.7.5.3p10). We record - // int(void) as a FunctionTypeProto with an empty argument list. + // int(void) as a FunctionProtoType with an empty argument list. else if (ArgTy->isVoidType()) { // If this is something like 'float(int, void)', reject it. 'void' // is an incomplete type (C99 6.2.5p19) and function decls cannot @@ -634,8 +634,8 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) { } if (getLangOptions().CPlusPlus && T->isFunctionType()) { - const FunctionTypeProto *FnTy = T->getAsFunctionTypeProto(); - assert(FnTy && "Why oh why is there not a FunctionTypeProto here ?"); + const FunctionProtoType *FnTy = T->getAsFunctionProtoType(); + assert(FnTy && "Why oh why is there not a FunctionProtoType here ?"); // C++ 8.3.5p4: A cv-qualifier-seq shall only be part of the function type // for a nonstatic member function, the function type to which a pointer |