зеркало из https://github.com/microsoft/clang-1.git
Address comments from Doug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1fe067ab21
Коммит
994b6cb65c
|
@ -276,7 +276,17 @@ static bool DeduceTemplateArguments(ASTContext &Context, QualType Param,
|
|||
|
||||
const FunctionProtoType *FunctionProtoParam =
|
||||
cast<FunctionProtoType>(Param);
|
||||
|
||||
if (FunctionProtoParam->getTypeQuals() !=
|
||||
FunctionProtoArg->getTypeQuals())
|
||||
return false;
|
||||
|
||||
if (FunctionProtoParam->getNumArgs() != FunctionProtoArg->getNumArgs())
|
||||
return false;
|
||||
|
||||
if (FunctionProtoParam->isVariadic() != FunctionProtoArg->isVariadic())
|
||||
return false;
|
||||
|
||||
// Check return types.
|
||||
if (!DeduceTemplateArguments(Context,
|
||||
FunctionProtoParam->getResultType(),
|
||||
|
@ -284,9 +294,6 @@ static bool DeduceTemplateArguments(ASTContext &Context, QualType Param,
|
|||
Deduced))
|
||||
return false;
|
||||
|
||||
if (FunctionProtoParam->getNumArgs() != FunctionProtoArg->getNumArgs())
|
||||
return false;
|
||||
|
||||
for (unsigned I = 0, N = FunctionProtoParam->getNumArgs(); I != N; ++I) {
|
||||
// Check argument types.
|
||||
if (!DeduceTemplateArguments(Context,
|
||||
|
|
|
@ -134,6 +134,8 @@ int is_unary_function6[is_unary_function_with_same_return_type_as_argument_type<
|
|||
int is_unary_function7[is_unary_function_with_same_return_type_as_argument_type<int (*)(int, bool)>::value ? -1 : 1];
|
||||
int is_unary_function8[is_unary_function_with_same_return_type_as_argument_type<int (*)(bool)>::value ? -1 : 1];
|
||||
int is_unary_function9[is_unary_function_with_same_return_type_as_argument_type<int (*)(int)>::value ? 1 : -1];
|
||||
int is_unary_function10[is_unary_function_with_same_return_type_as_argument_type<int (*)(int, ...)>::value ? -1 : 1];
|
||||
int is_unary_function11[is_unary_function_with_same_return_type_as_argument_type<int (* const)(int)>::value ? -1 : 1];
|
||||
|
||||
template<typename T>
|
||||
struct is_binary_function {
|
||||
|
|
Загрузка…
Ссылка в новой задаче