Fix an off by one error when trying to perform copy initialization of operator new and operator delete arguments. Sebastian, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72670 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 73cc051..a44dcf6 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -550,7 +550,7 @@
// asserted on, though, since invalid decls are left in there.)
for (unsigned i = 1; i < NumArgs; ++i) {
// FIXME: Passing word to diagnostic.
- if (PerformCopyInitialization(Args[i-1],
+ if (PerformCopyInitialization(Args[i],
FnDecl->getParamDecl(i)->getType(),
"passing"))
return true;