Alloc != AllocEnd; ++Alloc) {
// Even member operator new/delete are implicitly treated as
// static, so don't use AddMemberCandidate.
- if (FunctionDecl *Fn = dyn_cast<FunctionDecl>(*Alloc)) {
+ if (FunctionDecl *Fn =
+ dyn_cast<FunctionDecl>((*Alloc)->getUnderlyingDecl())) {
AddOverloadCandidate(Fn, Args, NumArgs, Candidates,
/*SuppressUserConversions=*/false);
continue;
void f() {
X11 x11; // expected-note {{implicit default destructor for 'struct X11' first required here}}
}
+
+struct X12 {
+ void* operator new(size_t, void*);
+};
+
+struct X13 : X12 {
+ using X12::operator new;
+};
+
+static void* f(void* g)
+{
+ return new (g) X13();
+}
+