aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-06-13 05:00:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-06-13 05:00:35 +0000
commit5fc99f3cb7a18f5306b4ed6f58f1a397e7fb7696 (patch)
tree3104dbcacf2ad24fddd882e5cec8d2abf4f22cf8
parent56dde4ac5639555f0b44572be7db2808c606ea46 (diff)
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
-rw-r--r--lib/Sema/SemaChecking.cpp2
1 files changed, 1 insertions, 1 deletions
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)