summaryrefslogtreecommitdiff
path: root/clang/test/CXX/dcl.decl/dcl.name/p1.cpp
blob: 9838b4f4737dbd1da203f771734fbf9d176b9327 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fsyntax-only -verify %s

namespace pr6200 {
  struct v {};
  enum E { e };
  struct s {
    int i;
    operator struct v() { return v(); };
    operator enum E() { return e; }
  };

  void f()
  {
    // None of these is a declaration.
    (void)new struct s;
    (void)new enum E;
    (void)&s::operator struct v;
    (void)&s::operator enum E;
  }
}