brintos

brintos / llvm-project-archived public Read only

0
0
Text · 353 B · 5c0240b Raw
12 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2#include <stddef.h>3 4struct A {5  void *operator new(size_t) {6    return this; // expected-error {{invalid use of 'this' outside of a non-static member function}}7  }8  void *operator new[](size_t) {9    return this; // expected-error {{invalid use of 'this' outside of a non-static member function}}10  }11};12