summaryrefslogtreecommitdiff
path: root/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p1.cpp
blob: 20c059eab6f350f92d94c28d801c7f05cff111ec (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
int g(int);
void f() {
  int i; 
  int& r = i;
  r = 1; 
  int* p = &r;
  int &rr=r; 
  int (&rg)(int) = g; 
  rg(i); 
  int a[3]; 
  int (&ra)[3] = a; 
  ra[1] = i;
}