diff options
Diffstat (limited to 'clang/test/SemaCXX/constant-expression-cxx1y.cpp')
| -rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx1y.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx1y.cpp b/clang/test/SemaCXX/constant-expression-cxx1y.cpp index 521526ddba4..e1929f76377 100644 --- a/clang/test/SemaCXX/constant-expression-cxx1y.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx1y.cpp @@ -719,8 +719,7 @@ namespace deduced_return_type { namespace modify_temporary_during_construction { struct A { int &&temporary; int x; int y; }; constexpr int f(int &r) { r *= 9; return r - 12; } - // FIXME: The 'uninitialized' warning here is bogus. - constexpr A a = { 6, f(a.temporary), a.temporary }; // expected-warning {{uninitialized}} expected-note {{temporary created here}} + constexpr A a = { 6, f(a.temporary), a.temporary }; // expected-note {{temporary created here}} static_assert(a.x == 42, ""); static_assert(a.y == 54, ""); constexpr int k = a.temporary++; // expected-error {{constant expression}} expected-note {{outside the expression that created the temporary}} |

