diff options
Diffstat (limited to 'clang/test/SemaCXX/uninitialized.cpp')
| -rw-r--r-- | clang/test/SemaCXX/uninitialized.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/uninitialized.cpp b/clang/test/SemaCXX/uninitialized.cpp index b0b4ef672db..8d0338c3d83 100644 --- a/clang/test/SemaCXX/uninitialized.cpp +++ b/clang/test/SemaCXX/uninitialized.cpp @@ -566,6 +566,12 @@ namespace references { int &e = d ?: e; // expected-warning{{reference 'e' is not yet bound to a value when used within its own initialization}} int &f = f ?: d; // expected-warning{{reference 'f' is not yet bound to a value when used within its own initialization}} + int &return_ref1(int); + int &return_ref2(int&); + + int &g = return_ref1(g); // expected-warning{{reference 'g' is not yet bound to a value when used within its own initialization}} + int &h = return_ref2(h); // expected-warning{{reference 'h' is not yet bound to a value when used within its own initialization}} + struct S { S() : a(a) {} // expected-warning{{reference 'a' is not yet bound to a value when used here}} int &a; |

