| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
|---|---|
| 2 | |
| 3 | void h() |
| 4 | { |
| 5 | int i; |
| 6 | extern void h2(int x = sizeof(i)); // expected-error {{default argument references local variable 'i' of enclosing function}} |
| 7 | } |
| 8 |
| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
|---|---|
| 2 | |
| 3 | void h() |
| 4 | { |
| 5 | int i; |
| 6 | extern void h2(int x = sizeof(i)); // expected-error {{default argument references local variable 'i' of enclosing function}} |
| 7 | } |
| 8 |