From ff455bbc3c4b7200a69d0fafdaccc356d1db0e63 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 13 Jun 2011 05:00:35 +0000 Subject: [PATCH] Fix a broken index left over from before this function was converted to handle memcpy and memmove. Spotted by Nico. llvm-svn: 132902 --- clang/lib/Sema/SemaChecking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 05c257ab8332..8dc54ae55311 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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)