Create fix-it hints to fix the order of constructors.
To make this a lot simpler, I've grouped all the warnings for each out of order initializer into 1.
This is necessary as fixing one initializer would often interfere with other initializers.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaDeclCXX.cpp | ||
---|---|---|
5242 | This was copied from the old impl, Not sure it this is going to change behaviour though. |
Thanks for this! The changes LGTM, but wait to land it for a day or two in case @rsmith has concerns.
clang/lib/Sema/SemaDeclCXX.cpp | ||
---|---|---|
5242 | The diagnostic engine knows how to format anything that's a NamedDecl (including quoting it properly, etc), but it does the same work for DeclarationName. There shouldn't be a change in behavior in this case, just a slight simplification of code. |
Hmmm, how about initializer order does not match the declaration order or something along those lines? The "some" and "in the correct order" feel a bit hand-wavy for a warning.