diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-08-05 16:41:00 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-08-05 16:41:00 +0000 |
commit | 9e4374daa3954d4603b6fd64c741cb080da79e44 (patch) | |
tree | b22b4fea981e52edce1f5fe98c877f158ea95890 /clang/lib/Sema/SemaChecking.cpp | |
parent | f3bb3617506e0e73c94f5928b805922cf021911a (diff) | |
download | bcm5719-llvm-9e4374daa3954d4603b6fd64c741cb080da79e44.tar.gz bcm5719-llvm-9e4374daa3954d4603b6fd64c741cb080da79e44.zip |
Revert "[Sema] Add sizeof diagnostics for bzero"
This reverts commit r277787, which caused PR28870.
llvm-svn: 277830
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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, |