Debian Codegraph @

clang/test/SemaCXX/GH175783.cpp

raw
1 // RUN: %clang_cc1 -fspell-checking-limit=0 -verify %s
2
3 namespace GH175783 {
4 class B {
5 public:
6 virtual void foo(); // #foo
7 };
8 void (*p)() = &GH175783::foo;
9 // expected-error@-1 {{no member named 'foo' in namespace 'GH175783'; did you mean 'B::foo'?}}
10 // expected-error@-2 {{cannot initialize a variable of type 'void (*)()' with an rvalue of type 'void (B::*)()'}}
11 // expected-note@#foo {{'B::foo' declared here}}
12 } // namespace GH175783