[analyzer] Enabled unix.Malloc checker.
+ Refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178388 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/NewDelete-custom.cpp b/test/Analysis/NewDelete-custom.cpp
index 47105ff..04dda2e 100644
--- a/test/Analysis/NewDelete-custom.cpp
+++ b/test/Analysis/NewDelete-custom.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -analyzer-store region -std=c++11 -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
 #include "Inputs/system-header-simulator-cxx.h"
 
 void *allocator(std::size_t size);
@@ -22,8 +22,8 @@
 } // expected-warning{{Memory is never released; potential leak}}
 
 void testOpNewArray() {
-  void *p = operator new[](0);
-} //FIXME: expected 'Memory is never released; potential leak'
+  void *p = operator new[](0); // call is inlined, no warn
+}
 
 void testNewExprArray() {
   int *p = new int[0];
@@ -31,8 +31,8 @@
 
 //----- Custom non-placement operators
 void testOpNew() {
-  void *p = operator new(0);
-} //FIXME: expected 'Memory is never released; potential leak'
+  void *p = operator new(0); // call is inlined, no warn
+}
 
 void testNewExpr() {
   int *p = new int;