[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2018-01-23 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: clangd/ClangdLSPServer.cpp:78 {"documentHighlightProvider", true}, +{"configurationChangeProvider", true}, {"renameProvider", true}, simark wrote: > I find `configurationChangeProvi

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-21 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127900. Nebiroth marked 11 inline comments as done. Nebiroth added a comment. Minor code cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38639 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Protocol.h clangd/XRefs

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. Yes please land this. Repository: rC Clang https://reviews.llvm.org/D41365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127715. Nebiroth added a comment. Updated BeforeExecute comment Repository: rC Clang https://reviews.llvm.org/D41365 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/PrecompiledPreamble.cpp Index: lib/Frontend/PrecompiledPreamble.c

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127619. Nebiroth marked 2 inline comments as done. Nebiroth added a comment. Modified comment Changed where BeforeExecute is called Repository: rC Clang https://reviews.llvm.org/D41365 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127617. Nebiroth added a comment. Removed some useless inclusions Removed superfluous check when inserting data in map Moved addition to DeclarationLocations in finish() outside of DeclMacrosFinder Merged with revision 321087 (moved findDefinitions an

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 8 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:85 + +if (SourceMgr.getMainFileID() == SourceMgr.getFileID(FilenameRange.getAsRange().getBegin()) && SourceMgr.isInMainFile(FilenameRange.getAsRange().getBegin())) {

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127413. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. findHover properly returns an error Removed many cases of bad merging Separated getHover in two functions Minor indenting and NIT fixes Repository: rCTE Clang Tools Extra

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 21 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.h:306 + /// Run formatting for \p Rng inside \p File. + std::vector formatRange(PathRef File, Range Rng); + /// Run formatting for the whole \p File. il

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Nebiroth added reviewers: malaperle, ilya-biryukov. Adds BeforeExecute method to PrecompiledPreamble to be called before Execute(). This method can be overriden. Repository: rC Clang https://reviews.llvm.org/D41365 Files: include/clang/Frontend/PrecompiledP

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127386. Nebiroth marked 14 inline comments as done. Nebiroth added a comment. Herald added a subscriber: mgrang. CppFilePreambleCallbacks no longer extends PPCallbacks CppFilePreambleCallbacks no longer needs SourceManager parameter Removed temporary ve

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127161. Nebiroth marked 27 inline comments as done. Nebiroth added a comment. inner class IncludeReferenceMap replaced by one map fillRangeVector() and findPreambleIncludes() code moved into wrapper class Open definition now returns an empty Range struct (lin

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127131. Nebiroth added a comment. Rebase on master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cp

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-14 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126984. Nebiroth marked an inline comment as done. Nebiroth added a comment. Minor code cleanup Repository: rC Clang https://reviews.llvm.org/D39375 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/PrecompiledPreamble.cpp Index: li

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-12-14 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126980. Nebiroth marked 5 inline comments as done. Nebiroth added a comment. Removed test file Added mutex lock when changing CDB Minor code cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39571 Files: clangd/ClangdLSPServer.cpp

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126449. Nebiroth added a comment. Removed some more empty lines Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39571 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126447. Nebiroth added a comment. Herald added a subscriber: klimek. Merged with latest llvm + clang Minor code cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39571 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h c

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126430. Nebiroth added a comment. Removed unique_ptr parameter in PrecompiledPreamble::Build Added method createPPCallbacks() in PreambleCallback to be overriden Repository: rC Clang https://reviews.llvm.org/D39375 Files: include/clang/Frontend/Precom

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126429. Nebiroth added a comment. Creating unique_ptr for wrapper class now uses overriden method createPPCallbacks() from PrecompiledPreamble class Moved wrapper class to inline inside createPPCallbacks() Wrapper class now uses CppFilePreambleCallback

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. @ilya-biryukov Need someone to land this. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 126371. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Herald added a subscriber: mgrang. Merged with latest llvm/clang Minor code cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSP

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks &Callbacks) { +PreambleCallbacks &Callbacks, std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-07 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks &Callbacks) { +PreambleCallbacks &Callbacks, std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125815. Nebiroth added a comment. Reverted formatting changes to ASTUnit Repository: rC Clang https://reviews.llvm.org/D39375 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/ASTUnit.cpp lib/Frontend/PrecompiledPreamble.cpp Index

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125814. Nebiroth added a comment. Fixed re-added include Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38639 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Protocol.h unittests/clangd/ClangdTests

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125813. Nebiroth added a comment. Herald added a subscriber: klimek. Using PPCallbacks interface to find non-preamble includes Created inner class to store vectors in to find locations Refactored methods to remove some unnecessary parameters Refactored Unit t

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-05 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125619. Nebiroth added a comment. Added static_cast when unparsing Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clan

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-05 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked an inline comment as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:38 +class DelegatingPPCallbacks : public PPCallbacks { + ilya-biryukov wrote: > What's the purpose of this class? We need to be able to use a wrapper cl

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-05 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125522. Nebiroth added a comment. Added error returns in findDocumentHighlights Ran clang-format on ClangdUnit.h, .cpp and ClangdServer.cpp Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/C

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-04 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125346. Nebiroth added a comment. Minor code cleanup Refactored findDocumentHighlights() to make tests pass when assertions are enabled Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/Clan

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-01 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125228. Nebiroth added a comment. Minor code cleanup unparse and parse methods for JSON are updated Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.c

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-01 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 125224. Nebiroth added a comment. Minor code cleanup Merge with master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-01 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: clangd/Protocol.h:26 #include "llvm/ADT/Optional.h" -#include +#include "llvm/Support/YAMLParser.h" #include malaperle wrote: > Nebiroth wrote: > > malaperle wrote: > > > revert this change? > > #include is not nee

[PATCH] D35894: [clangd] Code hover for Clangd

2017-12-01 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 9 inline comments as done. Nebiroth added inline comments. Comment at: clangd/Protocol.h:26 #include "llvm/ADT/Optional.h" -#include +#include "llvm/Support/YAMLParser.h" #include malaperle wrote: > revert this change? #include is not needed.

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124951. Nebiroth marked 6 inline comments as done. Nebiroth added a comment. Minor code cleanup getDeclarationLocation now returns llvm::Optional operator< for DocumentHighlight struct now properly compares the kind field Repository: rCTE Clang Tool

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124945. Nebiroth marked an inline comment as done. Nebiroth added a comment. Simplified getHover() function Proper usage of ErrorOr to return errors Given range for Hover struct now only applies to the open file Fixed crash on MacroExpansion Reposit

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124834. Nebiroth added a comment. Fixed wrong content header making the test fail Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/Clangd

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124833. Nebiroth added a comment. Herald added a subscriber: klimek. Invalid FileEntries now return llvm:ErrorOr Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/C

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124810. Nebiroth added a comment. Added verification for llvm::Expected in onDocumentHighlight Removed unused variable in ClangdUnit Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLS

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-27 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124458. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Minor code cleanup Fixed highlights sometimes obtaining one too many characters inside range Updated test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Fil

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-27 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 12 inline comments as done. Nebiroth added inline comments. Comment at: test/clangd/did-change-configuration.test:33 + +{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///compile_commands.json","languageId":"json","version":1

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-27 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124391. Nebiroth marked an inline comment as done. Nebiroth added a comment. Herald added a subscriber: klimek. Removed temporary test file Updated test to account for read-access symbol verification Repository: rCTE Clang Tools Extra https://reviews.llv

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124238. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Fixed test checking for values from an incorrect bit shift https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124230. Nebiroth marked 6 inline comments as done. Nebiroth added a comment. Fixed a few outstanding issues that were reported as completed https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124224. Nebiroth marked an inline comment as done. Nebiroth added a comment. Getting DocumentHighlightKind is now done in DocumentHighlightsFinder Removed duplicated and unused code Refactored method and variable names https://reviews.llvm.org/D38425 Files

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 31 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.h:291 + /// Get document highlights for a symbol hovered on. + Tagged> findDocumentHighlights(PathRef File, +

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-23 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124116. Nebiroth marked 32 inline comments as done. Nebiroth added a comment. Minor code cleanup and improvements getRawCommentForDeclNoCache() now called for every Decl and only once per Decl getHover() now properly handles templates https://reviews.llvm.o

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-22 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: clangd/GlobalCompilationDatabase.cpp:108 Logger.log("Failed to find compilation database for " + Twine(File) + - "in overriden directory " + CompileCommandsDir.getValue() + + " in overriden directo

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-22 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124024. Nebiroth marked 19 inline comments as done. Nebiroth added a comment. Fixed DraftStore thread-safe API being broken Removed superfluous getCompilationDatabase call Changed name of struct to ClangDConfigurationParamsChange Removed operator ! overload f

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-22 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 123958. Nebiroth marked 10 inline comments as done. Nebiroth added a comment. Removed accidentally included files Fixed some coding standard issues Removed getDeclarationLocation declaration from header file Replaced getFunctionComments with clang implementat

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-21 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 123848. Nebiroth added a comment. Removed some commented lines and temporary code Streamlined and removed some code that overlaps/conflicts with code hover patch so it's easier to merge (patch https://reviews.llvm.org/D35894) https://reviews.llvm.org/D3842

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. Forgot to mention this last patch also added support for displaying function comments above the function definition displayed. https://reviews.llvm.org/D35894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 123662. Nebiroth marked 10 inline comments as done. Nebiroth added a comment. Removed all std::pair objects Fixed and updated all tests findHover doesn't call findDefinitions anymore DeclarationLocationsFinder fills two Decl and MacroInfos vectors instead of

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-17 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 6 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:981 +} + if (isSearchedLocation(FID, Offset)) { malaperle wrote: > I think we need to do a check that the computed SourceRange is valid > (isVal

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-17 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 25 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.cpp:360 + + auto FileContents = DraftMgr.getDraft(File); + assert(FileContents.Draft && malaperle wrote: > Why are you adding this? Is this coming from a

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 123069. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Added test for didChangeConfiguration notification. Compilation database and extra file flags are now properly reloaded when changing database path. ClangdConfigurationParams now us

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-14 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 18 inline comments as done. Nebiroth added inline comments. Comment at: clangd/Protocol.h:285 + + DidChangeConfigurationParams() {} + malaperle wrote: > I don't think you need this constructor? I do inside parse() for DidChangeConfigurationParams

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-10 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. This updated patch still does not handle highlighting macro references correctly. I will make another patch at a later time for this issue. In https://reviews.llvm.org/D38425#922408, @ioeric wrote: > Drive-by comment: in general, have you considered reusing the existin

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-10 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 122529. Nebiroth added a comment. Decls and MacroInfos vectors are now private and passed by reference instead of copied. DeclarationLocationsFinder does not store Locations anymore, instead the vector is filled in their respective methods in ClangdUnit.cpp

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-10 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 122528. Nebiroth added a comment. - Decls and MacroInfos vectors are now private and passed by reference instead of copied. https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/C

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: clangd/ClangdLSPServer.cpp:51 + "definitionProvider": true, + "configurationChangeProvider": true }})"); malaperle wrote: > Are you sure the existing tests don't fail? usually when we change t

[PATCH] D39571: [clangd] DidChangeConfiguration Notification

2017-11-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Implementation of DidChangeConfiguration notification handling in clangd. This currently only supports changing one setting: the path of the compilation database to be used for the current project In other words, it is no longer necessary to restart clangd with a d

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. I also have a quick patch that supports displaying comments preceding the declaration of a function. Once the review comments have been addressed for this revision I will submit it. https://reviews.llvm.org/D35894 ___ cfe

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 120894. Nebiroth added a comment. Code hover now displays declaration of symbol instead of source code by default. Code hover now displays context information such as namespace and class name. Array of MarkedString objects is now sent as response in JSON. h

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-10-27 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Revision https://reviews.llvm.org/D38639 needs this commit in order to properly make open definition calls on include statements work. Since this modifies clang and not clangd, I decided to include it in a different patch. https://reviews.llvm.org/D39375 Files:

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-10-26 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 120485. Nebiroth added a comment. - Fixed adding incorrect test file. https://reviews.llvm.org/D38639 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/GlobalCompilationDatabase.cpp clangd/Protocol.h unittests/clan

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-10-26 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 120482. Nebiroth added a comment. - Now overriding InclusionDirective as a callback to get proper includes information. - Fixed tests. https://reviews.llvm.org/D38639 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-23 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. In https://reviews.llvm.org/D35894#903594, @ilya-biryukov wrote: > In https://reviews.llvm.org/D35894#903552, @malaperle wrote: > > > I think he meant to have multiple sections in the hover, one C/C++ and one > > not. But we noticed you can have an array of MarkedString

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-10-16 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 21 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:103 + void AfterExecute(CompilerInstance &CI) override { +const SourceManager &SM = CI.getSourceManager(); ilya-biryukov wrote: > There's a much b

[PATCH] D38425: [clangd] Document highlights for clangd

2017-10-12 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 118838. Nebiroth marked an inline comment as done. Nebiroth added a comment. Addressed review comments. Fixed some tests not having updated providers. Removed TargetDeclarationFinder for less code reuse. DocumentHighlight struct is now unparsed correctly. h

[PATCH] D38425: [clangd] Document highlights for clangd

2017-10-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked an inline comment as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:784 +/// Finds declarations locations that a given source location refers to. +class TargetDeclarationFinder : public index::IndexDataConsumer { + std::vector Declaration

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. Bumping this. I've worked on a patch for this feature that currently supports showing the declaration of whatever is being hovered on instead of the raw source code. It also has basic support to distinguish declarations in types ( class/struct, namespace, global varia

[PATCH] D38425: [clangd] Document highlights for clangd

2017-10-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 3 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:1017 + + auto DeclLocationsFinder = std::make_shared( + llvm::errs(), SourceLocationBeg, AST.getASTContext(), ilya-biryukov wrote: > I wonder if we

[PATCH] D38425: [clangd] Document highlights for clangd

2017-10-10 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 118482. Nebiroth added a comment. Rebased on master. https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Pro

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-10-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 118046. Nebiroth added a comment. Fixed accidental removal of CheckSourceHeaderSwitch test https://reviews.llvm.org/D38639 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h unittests/clangd/ClangdTests.cpp Index: unittests/c

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-10-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. ctrl-clicking on #include statements now opens the file being pointed by that statement. https://reviews.llvm.org/D38639 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h unittests/clangd/ClangdTests.cpp Index: unittests/clangd/Cl

[PATCH] D38425: [clangd] Document highlights for clangd

2017-10-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 117351. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Addressed initial comments. Formatted ClangdUnit.h https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/C

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-10-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. In https://reviews.llvm.org/D37150#885749, @ilya-biryukov wrote: > Thanks for fixing the last comment. > Do you want me to land this for you? Yes please! https://reviews.llvm.org/D37150 ___ cfe-commits mailing list cfe-

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-10-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 117340. Nebiroth added a comment. Improved logging message when unable to find compilation database in specified overriden directory. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilation

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-10-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 117337. Nebiroth marked 2 inline comments as done. Nebiroth added a comment. Changed placement of logging instruction to reduce logging output. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCo

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-10-02 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 117327. Nebiroth added a comment. Fixed changes that were lost while merging with head. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompilationDatabase

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 117217. Nebiroth added a comment. Fixed missed comments and suggstions. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompilationDatabase.h clangd/tool

[PATCH] D38425: [clangd] Document highlights for clangd

2017-09-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Implementation of Document Highlights Request as described in LSP. https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Protocol.cpp clangd/P

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-28 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: clangd/tool/ClangdMain.cpp:20 #include +#include malaperle wrote: > William, did you perhaps miss this comment? I don't think unistd.h makes > sense here. I indeed missed it. https://reviews.llvm.org/D37150 _

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-25 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 116559. Nebiroth added a comment. Fixed inverted compile_commands check logic that made tests fail. More readable command arg checks. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationD

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-25 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. In https://reviews.llvm.org/D36150#879194, @ilya-biryukov wrote: > Looks good. > Do you want me to submit this patch for you? Yes please. https://reviews.llvm.org/D36150 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-22 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 116387. Nebiroth marked 2 inline comments as done. Nebiroth added a comment. Rebased on latest version. Corrected code style issues in test file. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdS

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-21 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 116198. Nebiroth added a comment. More consistent logging in clangdmain. Restructured argument checking in ClangdMain Fixed empty compile-commands-dir triggering error messages. Fixed failing standard tests. https://reviews.llvm.org/D37150 Files: clangd/

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 116038. Nebiroth added a comment. Added unit test. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h unittests/clangd/ClangdTest

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-19 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. In https://reviews.llvm.org/D36150#867971, @ilya-biryukov wrote: > Overall looks good, but still needs at least a few tests. I have a test for this commit that uses included source and header files, would that be okay to do or should I generate files dynamically? If s

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 115462. Nebiroth marked an inline comment as done. Nebiroth added a comment. Fixed a few comments. Rebased on latest clangd version. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDa

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114654. Nebiroth added a comment. Simpilified a pointer return value. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompilation

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114652. Nebiroth added a comment. Return value when no file is found is now an empty string instead of file:// Minor code style changes and cleanup. Ran clang-format on ClangdServer.h https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp cl

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-11 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 5 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdLSPServer.cpp:234 + else +ResultUri = URI::fromFile(""); + ilya-biryukov wrote: > Running `unparse` on an instance created via `URI::fromFile("")` will resul

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114424. Nebiroth marked 7 inline comments as done. Nebiroth added a comment. Ran clang-format on modified files. Minor refactoring. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clan

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114371. Nebiroth marked 10 inline comments as done. Nebiroth added a comment. Ran clang-format on modified files. More minor refactoring. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.c

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-07 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114199. Nebiroth marked 7 inline comments as done. Nebiroth added a comment. Modified CompileCommandsDir to only look in the specified path if the value is set. Moved CompileCommandsDir field to DirectoryBasedGlobalCompilationDatabase class. Minor refactorin

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114054. Nebiroth added a comment. Some more code cleanup. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h Index: clangd/Protoco

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114048. Nebiroth added a comment. Remove unintentional file addition Updating D36150: [clangd] LSP extension to switch between source/header file ll# https://reviews.llvm.org/D36

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114046. Nebiroth added a comment. Refactored switchSourceHeader function help from ilya Added helper function to check for uppercase on current file. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/Cla

  1   2   >