[PATCH] D43230: [clangd] Explicitly initialize all primitive fields in Protocol.h

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 10:21:45 PST 2018


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Yup, I got bitten recently from some of our plain-c-style structs with no default initializers (in Index).

Definitely a fan of this change. Main downside is you can't use aggregate initialization, but the field-by-field initialization is often more readable anyway.

And +1 to avoiding explicit `= None` for optionals, etc.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43230





More information about the cfe-commits mailing list