gcc/testsuite/g++.dg/diagnostic/aka1.C
raw| 1 | // Basic test for typedef stripping in diagnostics. |
| 2 | |
| 3 | struct A { |
| 4 | void f(); |
| 5 | }; |
| 6 | |
| 7 | void A::f() { |
| 8 | // We don't want an aka for the injected-class-name. |
| 9 | A a = 0; // { dg-error "type .A. requested" } |
| 10 | } |
| 11 | |
| 12 | typedef A B; |
| 13 | |
| 14 | // We do want an aka for a real typedef. |
| 15 | B b = 0; // { dg-error "'B' {aka 'A'}" } |