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

2017-07-31 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 108979. Nebiroth marked 19 inline comments as done. Nebiroth added a comment. Implemention of Code Hover as described in LSP definition. Removed unintentional changes to formatting. Removed file id field in Location struct. https://reviews.llvm.org/D35894

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

2017-07-31 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. I had missed a typo in the code, should be fixed and compiling properly now. https://reviews.llvm.org/D35894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-07-31 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 108997. Nebiroth added a comment. Implemention of Code Hover as described in LSP definition. Removed unintentional changes to formatting. Removed file id field in Location struct. https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServer.cpp

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

2017-08-03 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 109566. Nebiroth marked 7 inline comments as done. Nebiroth added a comment. [clangd] LSP extension to switch between source/header file https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h

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

2017-08-16 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 111368. Nebiroth marked 8 inline comments as done. Nebiroth added a comment. Fixed diff comments. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp

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

2017-08-01 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Small extension to LSP to allow clients to use clangd to switch between C header files and source files. Final version will use the completed clangd indexer. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp

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

2017-08-18 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 111675. Nebiroth added a comment. Fixed more diff comments. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h Index:

[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

[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

[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

[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

[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:

[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:

[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:

[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

[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.

[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 ) override { +const SourceManager = CI.getSourceManager(); ilya-biryukov wrote: > There's a much better

[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

[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

[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

[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

[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

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

2017-09-05 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 113895. Nebiroth added a comment. Added function to avoid code reuse and extra nesting. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h

[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

[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#

[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:

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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-08-25 Thread William Enright via Phabricator via cfe-commits
Nebiroth created this revision. Adds compileCommands command line argument to specify an absolute path directly to the requested compile_commands.json for flags. https://reviews.llvm.org/D37150 Files: clangd/GlobalCompilationDatabase.cpp Index: clangd/GlobalCompilationDatabase.cpp

[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

[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] 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

[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

[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

[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

[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 +

[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] 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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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] 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:

[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:

[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.

[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

[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

[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

[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

[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] 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

[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

[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 >

[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

[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

[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

[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

[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-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

[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)

[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

[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

[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

[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 ) { +PreambleCallbacks , std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[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

[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

[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 ) { +PreambleCallbacks , std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[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:

[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

[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:

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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 ___

[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.

[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

  1   2   >