// RUN: %clang_cc1 -fblocks -verify %s
/**
* Test 'noderef' attribute with c++ constructs.
*/
// Stub out types for 'typeid' to work.
// namespace std
void
const int NODEREF *const_i_ptr;
static int NODEREF *static_i_ptr;
void
// Function declarations
int NODEREF ; // expected-warning{{'noderef' can only be used on an array or pointer type}}
int NODEREF *; // ok (returning pointer)
typedef int ; // expected-warning{{'noderef' can only be used on an array or pointer type}}
typedef int NODEREF *;
void
void
typedef int NODEREF *;
// Arguments
void ; // expected-warning{{'noderef' can only be used on an array or pointer type}}
void ;
void NODEREF;
void
void
;
;
void
int
int
std::type_info
;
std::type_info
;
void
int NODEREF *glob_ptr; // expected-note{{glob_ptr declared here}}
int glob_int = *glob_ptr; // expected-warning{{dereferencing glob_ptr; was declared with a 'noderef' type}}
void
void
int *
A *
Child *
A *
void *
int *
const int *