https://bugs.llvm.org/show_bug.cgi?id=40030

Aaron Ballman <aa...@aaronballman.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME
                 CC|                            |aa...@aaronballman.com

--- Comment #1 from Aaron Ballman <aa...@aaronballman.com> ---
This diagnostic appears to already be implemented:
https://godbolt.org/z/EPnG1EqKd

<source>:10:26: warning: ISO C++ requires field designators to be specified in
declaration order; field 's' will be initialized after field 'number'
[-Wreorder-init-list]
    return S{.s = "hi",  .number = 0}; // invalid (out of) order
                         ^~~~~~~~~~~
<source>:10:19: note: previous initialization for field 's' is here
    return S{.s = "hi",  .number = 0}; // invalid (out of) order
                  ^~~~
1 warning generated.

Closing as WORKSFORME, but if I'm missing something, please reopen with more
details. Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to