diff options
author | John McCall <rjmccall@apple.com> | 2010-12-14 07:30:51 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-14 07:30:51 +0000 |
commit | 5546da68bb616a27e06a3f8a4cfc0a275916a14e (patch) | |
tree | 7c40bef1ecfdc6a39c54e5137f52639c5f6e1f74 /clang/lib/Sema/SemaDecl.cpp | |
parent | 9fd838d31b44108b99327ebc927ed8bed70634f9 (diff) | |
download | bcm5719-llvm-5546da68bb616a27e06a3f8a4cfc0a275916a14e.tar.gz bcm5719-llvm-5546da68bb616a27e06a3f8a4cfc0a275916a14e.zip |
Pull out r121752 in case it's causing the selfhost breakage.
llvm-svn: 121759
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 66e517008ca..403838176c6 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1285,7 +1285,10 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) { OldProto->arg_type_end()); NewQType = Context.getFunctionType(NewFuncType->getResultType(), ParamTypes.data(), ParamTypes.size(), - OldProto->getExtProtoInfo()); + OldProto->isVariadic(), + OldProto->getTypeQuals(), + false, false, 0, 0, + OldProto->getExtInfo()); New->setType(NewQType); New->setHasInheritedPrototype(); @@ -1367,7 +1370,9 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) { New->setType(Context.getFunctionType(MergedReturn, &ArgTypes[0], ArgTypes.size(), - OldProto->getExtProtoInfo())); + OldProto->isVariadic(), 0, + false, false, 0, 0, + OldProto->getExtInfo())); return MergeCompatibleFunctionDecls(New, Old); } @@ -4041,11 +4046,9 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, // Turn this into a variadic function with no parameters. const FunctionType *FT = NewFD->getType()->getAs<FunctionType>(); - FunctionProtoType::ExtProtoInfo EPI; - EPI.Variadic = true; - EPI.ExtInfo = FT->getExtInfo(); - - QualType R = Context.getFunctionType(FT->getResultType(), 0, 0, EPI); + QualType R = Context.getFunctionType(FT->getResultType(), + 0, 0, true, 0, false, false, 0, 0, + FT->getExtInfo()); NewFD->setType(R); } |