teach FormatDiagnostic to aggregate previously formatted arguments and
pass them down into the ArgToStringFn implementation.  This allows 
redundancy across operands to a diagnostic to be eliminated.

This isn't used yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 6e9362f..1cb0dcf 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -148,6 +148,8 @@
 static void ConvertArgToStringFn(Diagnostic::ArgumentKind Kind, intptr_t Val,
                                  const char *Modifier, unsigned ModLen,
                                  const char *Argument, unsigned ArgLen,
+                                 const Diagnostic::ArgumentValue *PrevArgs,
+                                 unsigned NumPrevArgs,
                                  llvm::SmallVectorImpl<char> &Output,
                                  void *Cookie) {
   ASTContext &Context = *static_cast<ASTContext*>(Cookie);