diff options
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 89470725bb3..7234d4c8327 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -2348,7 +2348,7 @@ bool FunctionDecl::isReplaceableGlobalAllocationFunction() const { return false; const FunctionProtoType *FPT = getType()->castAs<FunctionProtoType>(); - if (FPT->getNumParams() > 2 || FPT->isVariadic()) + if (FPT->getNumParams() == 0 || FPT->getNumParams() > 2 || FPT->isVariadic()) return false; // If this is a single-parameter function, it must be a replaceable global |