summaryrefslogtreecommitdiff
path: root/clang/test/CXX/basic/basic.scope/basic.scope.hiding/p2.cpp
blob: 911df989530f7aea10538df769719b6389137fc1 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -fsyntax-only -verify %s

// rdar4641403
namespace N {
  struct X { // expected-note{{candidate found by name lookup}}
    float b;
  };
}

using namespace N;

typedef struct {
  int a;
} X; // expected-note{{candidate found by name lookup}}


struct Y { };
void Y(int) { }

void f() {
  X *x; // expected-error{{reference to 'X' is ambiguous}}
  Y(1); // okay
}