Debian Codegraph @

gcc/testsuite/g++.dg/Wshadow.C

raw
1 // { dg-do compile }
2 // { dg-options "-Wshadow" }
3 // PR c++/57709
4 class C {
5 int both_var; // { dg-message "declaration" }
6 void var_and_method(void) {} // { dg-message "declaration" }
7 void m() {
8 int
9 both_var, // { dg-warning "shadows" }
10 var_and_method;
11 }
12 void m2() {
13 void (C::*var_and_method)(void); // { dg-warning "shadows" }
14 }
15 };