]> granicus.if.org Git - clang/commitdiff
Fix a broken index left over from before this function was converted to
authorChandler Carruth <chandlerc@gmail.com>
Mon, 13 Jun 2011 05:00:35 +0000 (05:00 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 13 Jun 2011 05:00:35 +0000 (05:00 +0000)
handle memcpy and memmove. Spotted by Nico.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132902 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaChecking.cpp

index 05c257ab8332a4c25dbb19008cc04c465b5d8e35..8dc54ae55311be62973a9842e467efa16b6f1de3 100644 (file)
@@ -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)