This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up serialization.
ClosedPublic

Authored by sammccall on Oct 18 2018, 5:15 AM.

Details

Summary

CodeAction provides us with a standard way of representing fixes inline, so
use it, replacing our existing ad-hoc extension.

After this, it's easy to serialize diagnostics using the structured
toJSON/Protocol.h mechanism rather than assembling JSON ad-hoc.

Event Timeline

sammccall created this revision.Oct 18 2018, 5:15 AM
hokein accepted this revision.Oct 18 2018, 8:17 AM

LGTM.

clangd/ClangdLSPServer.cpp
558

nit: we can reuse URI insteading of calling URIForFile again.

This revision is now accepted and ready to land.Oct 18 2018, 8:17 AM
sammccall marked an inline comment as done.

Don't call URIForFile again, rebase.

Thanks! @arphaman, any concerns about the change to extension format?

This revision was automatically updated to reflect the committed changes.