brintos

brintos / llvm-project-archived public Read only

0
0
Text · 512 B · 7a08f2f Raw
14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -verify %s2// RUN: %clang_cc1 -fsyntax-only -Wno-uninitialized  -verify=good %s3//good-no-diagnostics4 5template <class T>6class RefMem { // expected-warning {{class 'RefMem<int &>' does not declare any constructor to initialize its non-modifiable members}}7  T &M; // expected-note {{reference member 'M' will never be initialized}}8};9 10struct RefRef {11  RefMem<int &> R; // expected-note {{in instantiation of template class 'RefMem<int &>' requested here}}12};13 14