Reapply 81096, now with a fix. Spot the bug:

      for (unsigned i = numargs; i < NumArgs; ++i)
        Args[0] = 0;

;)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81123 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp
index 0ffb152..c532b8c 100644
--- a/lib/AST/ExprCXX.cpp
+++ b/lib/AST/ExprCXX.cpp
@@ -403,6 +403,8 @@
       Args = new (C) Stmt*[NumArgs];
       for (unsigned i = 0; i < numargs; ++i)
         Args[i] = args[i];
+      for (unsigned i = numargs; i < NumArgs; ++i)
+        Args[i] = 0;
     }
 }