brintos

brintos / llvm-project-archived public Read only

0
0
Text · 399 B · e032a7f Raw
22 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4namespace pr6200 {5  struct v {};6  enum E { e };7  struct s {8    int i;9    operator struct v() { return v(); };10    operator enum E() { return e; }11  };12 13  void f()14  {15    // None of these is a declaration.16    (void)new struct s;17    (void)new enum E;18    (void)&s::operator struct v;19    (void)&s::operator enum E;20  }21}22