summaryrefslogtreecommitdiff
path: root/clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp
blob: 164eb3682f31a99852c89b22d074314f26ff99f6 (about) (plain)
1
2
3
4
5
6
7
// RUN: %clang_cc1 -fsyntax-only -verify %s

void h()
{
  int i;
  extern void h2(int x = sizeof(i)); // expected-error {{default argument references local variable 'i' of enclosing function}}
}