diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 8 |
2 files changed, 3 insertions, 11 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 813a20a9f52..d1e8d25ea04 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -3408,10 +3408,6 @@ unsigned FunctionDecl::getMemoryFunctionKind() const { case Builtin::BIstrlen: return Builtin::BIstrlen; - case Builtin::BI__builtin_bzero: - case Builtin::BIbzero: - return Builtin::BIbzero; - default: if (isExternC()) { if (FnInfo->isStr("memset")) @@ -3434,8 +3430,6 @@ unsigned FunctionDecl::getMemoryFunctionKind() const { return Builtin::BIstrndup; else if (FnInfo->isStr("strlen")) return Builtin::BIstrlen; - else if (FnInfo->isStr("bzero")) - return Builtin::BIbzero; } break; } diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index c7163943cfb..12f3923f8e1 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -6179,15 +6179,13 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call, // It is possible to have a non-standard definition of memset. Validate // we have enough arguments, and if not, abort further checking. - unsigned ExpectedNumArgs = - (BId == Builtin::BIstrndup || Builtin::BIbzero ? 2 : 3); + unsigned ExpectedNumArgs = (BId == Builtin::BIstrndup ? 2 : 3); if (Call->getNumArgs() < ExpectedNumArgs) return; - unsigned LastArg = (BId == Builtin::BImemset || BId == Builtin::BIbzero || + unsigned LastArg = (BId == Builtin::BImemset || BId == Builtin::BIstrndup ? 1 : 2); - unsigned LenArg = - (BId == Builtin::BIbzero || BId == Builtin::BIstrndup ? 1 : 2); + unsigned LenArg = (BId == Builtin::BIstrndup ? 1 : 2); const Expr *LenExpr = Call->getArg(LenArg)->IgnoreParenImpCasts(); if (CheckMemorySizeofForComparison(*this, LenExpr, FnName, |