[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-28 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE319157: [clangd] Add missing (but documented!) JSONExpr typed accessors (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D40399?vs=124204=124528#toc Repository: rCTE

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm Thanks for the rename! https://reviews.llvm.org/D40399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for the review! I think you're right about new names. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null();

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124203. sammccall marked 2 inline comments as done. sammccall added a comment. Renames to address review comments https://reviews.llvm.org/D40399 Files: clangd/ClangdUnit.cpp clangd/JSONExpr.cpp clangd/JSONExpr.h clangd/JSONRPCDispatcher.cpp

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null(); ioeric wrote: > Why is this needed?

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null(); Why is this needed? `v[x].null()` seems to

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124105. sammccall added a comment. While here, fix a duplicated test. https://reviews.llvm.org/D40399 Files: clangd/JSONExpr.h unittests/clangd/JSONExprTests.cpp Index: unittests/clangd/JSONExprTests.cpp