Code cleanup in new handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60557 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp
index c90cd2f..fa19c6a 100644
--- a/test/SemaCXX/new-delete.cpp
+++ b/test/SemaCXX/new-delete.cpp
@@ -14,6 +14,9 @@
// A special new, to verify that the global version isn't used.
void* operator new(size_t, S*);
};
+struct V : U
+{
+};
void* operator new(size_t); // expected-note {{candidate}}
void* operator new(size_t, int*); // expected-note {{candidate}}
@@ -34,6 +37,8 @@
ia4 *pai = new (int[3][4]);
pi = ::new int;
U *pu = new (ps) U;
+ // This is xfail. Inherited functions are not looked up currently.
+ //V *pv = new (ps) V;
}
void bad_news(int *ip)
@@ -56,7 +61,7 @@
(void)new int[*(S*)0]; // expected-error {{array size expression must have integral or enumerated type, not 'struct S'}}
(void)::S::new int; // expected-error {{expected unqualified-id}}
(void)new (0, 0) int; // expected-error {{no matching function for call to 'operator new'}}
- (void)new (0L) int; // expected-error {{use of overloaded operator 'new' is ambiguous}}
+ (void)new (0L) int; // expected-error {{call to 'operator new' is ambiguous}}
// This must fail, because the member version shouldn't be found.
(void)::new ((S*)0) U; // expected-error {{no matching function for call to 'operator new'}}
// Some lacking cases due to lack of sema support.