This revision was automatically updated to reflect the committed changes.
Closed by commit rL319309: [clangd] Simplify common JSON-parsing patterns in
Protocol. (authored by sammccall).
Changed prior to commit:
https://reviews.llvm.org/D40564?vs=124585&id=124713#toc
Repository:
rL LLVM
http
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: clangd/Protocol.cpp:56
+assert(*this && "Must check this is an object before calling parse()");
+if (const json::Expr *E = O->get(Prop)) {
+ ret
sammccall created this revision.
Herald added subscribers: cfe-commits, klimek.
This makes the parse() functions about as short as they can be given the
current signature, and moves all array-traversal etc code to a
central location.
We keep the ability to distinguish between optional and require