[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 140180. malaperle added a comment. Use operator<< where we can Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 Files: clangd/Protocol.cpp clangd/Protocol.h unittests/clangd/CodeCompleteTests.cpp unittests/clangd/JSONExprTests

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44764#1046766, @sammccall wrote: > I understand the template instantiations here are a mess and we need to solve > the problem. However I'm not sure this is the right direction: > > - it violates IWYU, and we expect people consistently to g

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D44764#1046766, @sammccall wrote: > You raise a good point. If we can get away with using `operator <<` everywhere, it is definitely the best approach. Then our rule of thumb is: never define `PrintTo` overload, define `operator <<` f

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D44764#1045992, @malaperle wrote: > In https://reviews.llvm.org/D44764#1045682, @ilya-biryukov wrote: > > > In https://reviews.llvm.org/D44764#1045648, @simark wrote: > > > > > We could create a file `ClangdTesting.h" which includes everythin

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-23 Thread Simon Marchi via Phabricator via cfe-commits
simark accepted this revision. simark added inline comments. Comment at: unittests/clangd/Printers.h:12 +// objects on failure. Otherwise, it is possible that there will be two +// different instantiations of the printer template for a given type and some +// tests could end up c