Add implicit declarations of allocation functions when looking them up for
redeclaration, not just when looking them up for a use -- we need the implicit
declaration to appropriately check various properties of them (notably, whether
they're deleted).

llvm-svn: 200729
diff --git a/clang/test/Analysis/NewDelete-variadic.cpp b/clang/test/Analysis/NewDelete-variadic.cpp
index 53dba46..62a7d17 100644
--- a/clang/test/Analysis/NewDelete-variadic.cpp
+++ b/clang/test/Analysis/NewDelete-variadic.cpp
@@ -5,15 +5,19 @@
   typedef __typeof__(sizeof(int)) size_t;
 }
 
-void *operator new(std::size_t, ...);
-void *operator new[](std::size_t, ...);
+struct X {};
+
+void *operator new(std::size_t, X, ...);
+void *operator new[](std::size_t, X, ...);
 
 void testGlobalCustomVariadicNew() {
-  void *p1 = operator new(0); // no warn
+  X x;
 
-  void *p2 = operator new[](0); // no warn
+  void *p1 = operator new(0, x); // no warn
 
-  int *p3 = new int; // no warn
+  void *p2 = operator new[](0, x); // no warn
 
-  int *p4 = new int[0]; // no warn
+  int *p3 = new (x) int; // no warn
+
+  int *p4 = new (x) int[0]; // no warn
 }