From: Chandler Carruth Date: Mon, 13 Jun 2011 05:00:35 +0000 (+0000) Subject: Fix a broken index left over from before this function was converted to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fc99f3cb7a18f5306b4ed6f58f1a397e7fb7696;p=clang Fix a broken index left over from before this function was converted to handle memcpy and memmove. Spotted by Nico. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132902 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 05c257ab83..8dc54ae553 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1847,7 +1847,7 @@ void Sema::CheckMemsetcpymoveArguments(const CallExpr *Call, continue; } - SourceRange ArgRange = Call->getArg(0)->getSourceRange(); + SourceRange ArgRange = Call->getArg(ArgIdx)->getSourceRange(); DiagRuntimeBehavior( Dest->getExprLoc(), Dest, PDiag(diag::note_bad_memaccess_silence)