[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146339. ioeric marked 3 inline comments as done. ioeric added a comment. - Rebase on https://reviews.llvm.org/D46758 - Addressed comments. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. The moving of IncludeStyle has been split into a separate patch https://reviews.llvm.org/D46758. Comment at: include/clang/Format/Format.h:1818 /// from \p Code if it exists. +/// See documentation for `tooling::HeaderIncludes` for the behavior. llv

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146384. ioeric added a comment. - Also moved yaml traits. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderIncludes.h include/clang/Tooling/Core/IncludeStyle.h lib/Format/Fo

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146385. ioeric added a comment. - Revert commit on wrong branch. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderIncludes.h include/clang/Tooling/Core/IncludeStyle.h lib/Fo

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146390. ioeric marked an inline comment as done. ioeric added a comment. Herald added a subscriber: mgorny. - also moved yaml traits. Repository: rC Clang https://reviews.llvm.org/D46758 Files: include/clang/Format/Format.h include/clang/Tooling/Core/

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146393. ioeric added a comment. - Rebase on https://reviews.llvm.org/D46758 Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderIncludes.h lib/Format/Format.cpp lib/Tooling/Cor

[PATCH] D46675: [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146581. ioeric marked an inline comment as done. ioeric added a comment. - Merged with origin/master - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46675 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h cla

[PATCH] D46675: [clangd] Add helper for collecting #include directives in file.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE332237: [clangd] Add helper for collecting #include directives in file. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D46675?vs=146581&id=146583#toc Repositor

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:2277 auto Replace = -Includes.insert(trimInclude(IncludeName), IncludeName.startswith("<")); +Includes.insert(IncludeName.trim("\"<>"), IncludeName.startswith("<")); if (Replace) { -

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146598. ioeric marked an inline comment as done. ioeric added a comment. - Remove an unintended change. Repository: rC Clang https://reviews.llvm.org/D46758 Files: include/clang/Format/Format.h include/clang/Tooling/Core/IncludeStyle.h lib/Format/Fo

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332284: [clang-format] Move #include related style to libToolingCore (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46758 F

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 14. ioeric added a comment. - Merged with origin/master - Make copy instead of taking references to ensure lifetime. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderInclude

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332287: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146675. ioeric marked 7 inline comments as done. ioeric added a comment. - Addressed review comments. - Merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdServer.cpp clangd/CodeComplete.cpp

[PATCH] D46000: [AST] Added a helper to extract a user-friendly text of a comment.

2018-05-15 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 Comment at: include/clang/AST/RawCommentList.h:138 + /// the overload with ASTContext in the rest of the code. + std::string getFormattedText(const SourceManager &Sour

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146770. ioeric added a comment. - Add heuristic to reduce false position on identifying proto headers Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46751 Files: clangd/ClangdLSPServer.cpp clangd/SourceCode.cpp clangd/SourceCode.h cl

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > I think this is good if that's true that the comment is always there. I think > it would be OK for this to be enabled by default, with a general option to > turn heuristics off. Not sure what to call it... > -use-symbol-filtering-heuristics :) @malaperle Having an opt

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D46751#1099479, @malaperle wrote: > In https://reviews.llvm.org/D46751#1099097, @ioeric wrote: > > > > I think this is good if that's true that the comment is always there. I > > > think it would be OK for this to be enabled by default, with a

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146834. ioeric marked 4 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146838. ioeric added a comment. - Rebase on https://reviews.llvm.org/D46676 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/CodeComplete.cpp

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146839. ioeric added a comment. - Rebase... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdServer.cpp clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Headers.cpp clangd/Headers.h clangd/Protocol.h

[PATCH] D46676: [clangd] Remove LSP command-based #include insertion.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked an inline comment as done. Closed by commit rL332362: [clangd] Remove LSP command-based #include insertion. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146843. ioeric added a comment. - Merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdServer.cpp clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Headers.cpp clangd/Headers.h cla

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE332363: [clangd] Populate #include insertions as additional edits in completion items. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D46497?vs=146843&id=146844

[PATCH] D46906: [clangd] Fix a link failure in unittests

2018-05-16 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:101 +// we check whether it starts with PROTO_HEADER_COMMENT. +bool isPrivateProtoSymbol(const NamedDecl &ND) { + const auto &SM = ND.getASTContext().getSourceManager(); sammccall wrote:

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147032. ioeric marked an inline comment as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46751 Files: clangd/ClangdLSPServer.cpp clangd/SourceCode.cpp clangd/SourceCode.h clan

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > ...I hadn't noticed the latest version. I think it's safe enough in the new > version that we don't need to discuss this much further until it becomes a > bigger problem (more libraries, etc). Sounds good, thanks! @ilya-biryukov Could you take another look at the patc

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147058. ioeric marked 3 inline comments as done. ioeric added a comment. - Merge remote-tracking branch 'origin/master' into proto - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46751 Files: clangd/index/Symbol

[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332456: [clangd] Filter out private proto symbols in SymbolCollector. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46751

[PATCH] D46942: Make sure getCanonicalName returns absolute paths even on VFS.

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Herald added a subscriber: cfe-commits. Generally, canonical paths are expected to be absolute. This is the behavior for Windows build. But for unix, it might return relative paths when failing to resolve real path (e.g. unsupported s

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:24 + if (SemaCCResult.Declaration) +AllDeclsInMainFile = allDeclsInMainFile(SemaCCResult.Declaration); if (SemaCCResult.Availability == CXAvailability_Deprecated) Could you explain why `AllDecls

[PATCH] D46942: Add vfs::FileSystem::getRealPath

2018-05-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147167. ioeric added a comment. - Add vfs::FileSystem::getRealPath; change getCanonicalName to use getRealPath Repository: rC Clang https://reviews.llvm.org/D46942 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/FileManager.cpp lib/Basic/Vi

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-doc/Representation.h:238 + // Non-const accessors for YAML output. + std::vector &getNamespaceInfos() { return NamespaceInfos; } There are two alternatives to avoid this: 1) Pull the info storage into a separate

[PATCH] D46942: Add vfs::FileSystem::getRealPath

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147278. ioeric marked an inline comment as done. ioeric added a comment. - s/PATH_MAX/4096/ Repository: rC Clang https://reviews.llvm.org/D46942 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/FileManager.cpp lib/Basic/VirtualFileSystem.cpp

[PATCH] D46942: Add vfs::FileSystem::getRealPath

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:537 -#ifdef LLVM_ON_UNIX - char CanonicalNameBuf[PATH_MAX]; - if (realpath(Dir->getName().str().c_str(), CanonicalNameBuf)) + SmallString CanonicalNameBuf; + if (!FS->getRealPath(Dir->getName(), CanonicalNa

[PATCH] D43424: [clang-doc] Implement a (simple) Markdown generator

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-doc/generators/Generators.h:44 +class MDGenerator : public Generator { +public: Could you add high-level comment on what this does? This seems to build up some directory structure and write different infos into d

[PATCH] D46942: Add vfs::FileSystem::getRealPath

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332590: Add vfs::FileSystem::getRealPath (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46942 Files: cfe/trunk/include/cl

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D44954#1101922, @malaperle wrote: > @ioeric You mentioned in https://reviews.llvm.org/D46751 that it would make > sense to add a flag to disable indexing members. Could you comment on that? > What kind of granularity were you thinking? Would a

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:24 + if (SemaCCResult.Declaration) +AllDeclsInMainFile = allDeclsInMainFile(SemaCCResult.Declaration); if (SemaCCResult.Availability == CXAvailability_Deprecated) ilya-biryukov wrote: > sammccal

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.cpp:24 + if (SemaCCResult.Declaration) +AllDeclsInMainFile = allDeclsInMainFile(SemaCCResult.Declaration); if (SemaCCResult.Availability == CXAvailability_Deprecated) ioeric wrote: > ilya-biryukov w

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:113 - // We only want: - // * symbols in namespaces or translation unit scopes (e.g. no class - // members) - // * enum constants in unscoped enum decl (e.g. "red" in "enum {red};") - auto I

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. > It's also for textDocument/documentSymbol. For this, we technically don't > need them in the static index since we could collect symbols when the > document is opened, but we also want them for workspaceSymbols so we might as > well use the same symbol collector, etc.

[PATCH] D47060: [VFS] Implement getRealPath for OverlayFileSystem.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D47060 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: u

[PATCH] D47060: [VFS] Implement getRealPath for OverlayFileSystem.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147487. ioeric added a comment. Minor cleanup Repository: rC Clang https://reviews.llvm.org/D47060 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/Virt

[PATCH] D47060: [VFS] Implement getRealPath for OverlayFileSystem.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147488. ioeric added a comment. Fix test... Repository: rC Clang https://reviews.llvm.org/D47060 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/Virtua

[PATCH] D47060: [VFS] Implement getRealPath for OverlayFileSystem.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 147491. ioeric marked an inline comment as done. ioeric added a comment. - Add and use const_iterator. Repository: rC Clang https://reviews.llvm.org/D47060 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basi

[PATCH] D47060: [VFS] Implement getRealPath for OverlayFileSystem.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332717: [VFS] Implement getRealPath for OverlayFileSystem. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47060 Files: cf

[PATCH] D47068: Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, mgorny, klimek. clangToolingCore is linked into almost everything (incl. clang), but not few tools need #include manipulation at this point. So pull this into a separate library in Tooling.

[PATCH] D47068: Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: include/clang/Format/Format.h:20 #include "clang/Tooling/Core/Replacement.h" +#include "clang/Tooling/Inclusions/IncludeStyle.h" #include "llvm/ADT/ArrayRef.h" ilya-biryukov wrot

[PATCH] D47068: Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked an inline comment as done. Closed by commit rL332720: Move #include manipulation code to new lib/Tooling/Inclusions. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D47074: [Tooling] Add an overload of runToolOnCodeWithArgs that takes VFS

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Herald added subscribers: cfe-commits, klimek. ... to support purely VFS-based tools. Repository: rC Clang https://reviews.llvm.org/D47074 Files: include/clang/Tooling/Tooling.h lib/Tooling/Tooling.cpp Index: lib/Tooling/T

[PATCH] D47074: [Tooling] Add an overload of runToolOnCodeWithArgs that takes VFS

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332731: [Tooling] Add an overload of runToolOnCodeWithArgs that takes VFS (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D47074?vs=147526&id=147529#toc Repositor

[PATCH] D47065: [clangd] Enable parsing of non-doxygen comments in global-symbol-builder

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Should we also change the behavior in dynamic index? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D47068: Move #include manipulation code to new lib/Tooling/Inclusions.

2018-05-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric reopened this revision. ioeric added a comment. This revision is now accepted and ready to land. This was reverted in r332751 due to build bot failure with module config. I don't see how this failed as the directory setup is very similar to Tooling/Core/. Will investigate further next wee

[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, klimek. Currently, we only handle the first callback from sema code completion and ignore results from potential following callbacks. This causes causes loss of

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov, klimek. This assumes that .inc files are supposed to be included via headers that include them. Repository: rCTE Clang Tools Extra https://reviews.llvm.org

[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical result

[PATCH] D47066: [clangd] Remove ignored Preamble::CanReuse call from completion

2018-05-22 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. OK, it turned out that there are a few things that I overlooked: 1. Top-N Ranking would be broken among different callbacks. We would need to keep a single `TopN` for all callbacks. 2. Due to 1), materialization of TopN candidates would happen after all callbacks have fi

[PATCH] D47065: [clangd] Enable parsing of non-doxygen comments in global-symbol-builder

2018-05-22 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D46943: [clangd] Boost scores for decls from current file in completion

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D46943#1107880, @ilya-biryukov wrote: > I've added an initial version of testing for the matching header and wanted > to get feedback before proceeding further with tests and other changes. > > A few things that bug me so far: > > - We need to

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148189. ioeric marked 4 inline comments as done. ioeric added a comment. - Include main file in the include stack when mapping headers. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47187 Files: clangd/index/CanonicalIncludes.cpp clangd

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:209 + while (true) { +if (!Loc.isValid() || SM.isInMainFile(Loc)) + break; sammccall wrote: > (as above, maybe want to include the main file for simplicity/symmetry) Thanks! As y

[PATCH] D47256: [clangd] Fix code completion in MACROs with stringification.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay, klimek. Currently, we only handle the first callback from sema code completion and ignore results from potential following callbacks. This causes causes loss of completion

[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Dropping this in favor of https://reviews.llvm.org/D47256 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D47256: [clangd] Fix code completion in MACROs with stringification.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148206. ioeric added a comment. - Fix broken test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47256 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.cpp =

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 148218. ioeric marked 3 inline comments as done. ioeric added a comment. - addressed comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47187 Files: clangd/index/CanonicalIncludes.cpp clangd/index/CanonicalIncludes.h clangd/index

[PATCH] D47262: [VFS] Implement getRealPath in InMemoryFileSystem.

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Repository: rC Clang https://reviews.llvm.org/D47262 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/VirtualFileSystemTest.cpp

[PATCH] D47262: [VFS] Implement getRealPath in InMemoryFileSystem.

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333172: [VFS] Implement getRealPath in InMemoryFileSystem. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47262 Files: cf

[PATCH] D47262: [VFS] Implement getRealPath in InMemoryFileSystem.

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333172: [VFS] Implement getRealPath in InMemoryFileSystem. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D47262?vs=148220&id=148376#toc Repository: rC Clang

[PATCH] D47256: [clangd] Fix code completion in MACROs with stringification.

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333174: [clangd] Fix code completion in MACROs with stringification. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47256 F

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Would it be possible to add some integration tests for file index plus preamble? Comment at: clangd/index/FileIndex.cpp:37 + std::vector TopLevelDecls( + AST.getTranslationUnitDecl()->decls().begin(), + AST.getTranslationUnitDecl()->decls().en

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.cpp:37 + std::vector TopLevelDecls( + AST.getTranslationUnitDecl()->decls().begin(), + AST.getTranslationUnitDecl()->decls().end()); ilya-biryukov wrote: > ioeric wrote: > > Would this gi

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333188: [clangd] Skip .inc headers when canonicalizing header #include. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47187

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-24 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. lg. Thanks for adding the test! Comment at: clangd/index/FileIndex.cpp:37 + std::vector TopLevelDecls( + AST.getTranslationUnitDecl()->decls().begin(), + AST.getTr

[PATCH] D47331: [clangd] Remove accessors for top-level decls from preamble

2018-05-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Nice! This looks good to me. Just some nits. I'll let Sam stamp. Comment at: clangd/ClangdUnit.h:81 ASTContext &getASTContext(); const ASTContext &getASTContext() const; IIUC, `ASTContext` in a `ParsedAST` may not contain informa

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. The change looks mostly good. Some nits and questions about the testing. Comment at: clangd/index/Index.h:158 unsigned References = 0; - + /// Whether or not this is symbol is meant to be used for the global + /// completion. s/this

[PATCH] D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums

2018-05-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D47223#1110571, @malaperle wrote: > In https://reviews.llvm.org/D47223#1109247, @ilya-biryukov wrote: > > > I'm not sure if we have tests for that, but I remember that we kept the > > enumerators in the outer scope so that completion could find

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. The reduce logic seems to be in a good shape. Some nits and questions inlined. Comment at: clang-doc/Reducer.cpp:19 + +#define REDUCE(INFO) \ + {

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-doc/BitcodeReader.cpp:553 + +#define READINFO(INFO) \ + { \ Convert this to a tem

[PATCH] D47466: [clangd] Avoid inserting new #include when declaration is present in the main file.

2018-05-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, jkorous, MaskRay, klimek. Also fix USR generation for classes in unit tests. The previous USR only works for class members, which happens to work when completing class name inside

[PATCH] D47471: [clangd] Minor cleanup

2018-05-29 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. Nice! :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D47466: [clangd] Avoid inserting new #include when declaration is present in the main file.

2018-05-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 149061. ioeric marked 2 inline comments as done. ioeric added a comment. Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47466 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unitte

[PATCH] D47466: [clangd] Avoid inserting new #include when declaration is present in the main file.

2018-05-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333519: [clangd] Avoid inserting new #include when declaration is present in the main… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.

[PATCH] D37976: [docs][refactor] add refactoring engine design documentation

2017-09-26 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 documentation! Now we just need to try to keep it up-to-date ;) Comment at: docs/RefactoringEngine.rst:33 +operations (rules). These rules are grouped u

[PATCH] D37681: [refactor] Simplify the interface and remove some template magic

2017-09-26 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. @klimek Have you got a chance to take a look? Repository: rL LLVM https://reviews.llvm.org/D37681 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D37856: [refactor] add support for refactoring options

2017-10-01 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. Looks good with some nits. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h:73 +template +class OptionRequirement : public RefactoringOptio

[PATCH] D38402: [clang-refactor] Apply source replacements

2017-10-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: test/Refactor/tool-apply-replacements.cpp:6 + +class RenameMe { // CHECK: class { +}; Why is the result `class {`? Comment at: tools/clang-refactor/ClangRefactor.cpp:319 - // FIXME: Consume atomic ch

[PATCH] D38723: [clang-rename] Don't add prefix qualifiers to the declaration and definition of the renamed symbol.

2017-10-10 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. Lg with nits. Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:163 const NestedNameSpecifier *Specifier; +// Determine whether the prefix qualifiers of th

[PATCH] D38402: [clang-refactor] Apply source replacements

2017-10-10 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 Repository: rL LLVM https://reviews.llvm.org/D38402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 118898. ioeric added a comment. - Minor cleanups. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/ToolExecutorPluginRegistry.h include/clang/Tooling/Tooling.h

[PATCH] D38882: [clang-rename] Add function unit tests.

2017-10-13 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. Lg https://reviews.llvm.org/D38882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D38893: [change-namespace] do not change type locs in defaulted functions.

2017-10-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. https://reviews.llvm.org/D38893 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp === --- un

[PATCH] D38893: [change-namespace] do not change type locs in defaulted functions.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315892: [change-namespace] do not change type locs in defaulted functions. (authored by ioeric). Repository: rL LLVM https://reviews.llvm.org/D38893 Files: clang-tools-extra/trunk/change-namespace/C

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 119117. ioeric added a comment. - clang-format code. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/ToolExecutorPluginRegistry.h include/clang/Tooling/Tooling

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Comment at: include/clang/Tooling/CommonOptionsParser.h:109 + + const std::string &getErrorMessage() const { return ErrorMessage; } + hokein wrote: > return `llvm::StringRef`? I'm not a big fan of `StringRef` as a

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 119122. ioeric marked 5 inline comments as done. ioeric added a comment. - Address review comments. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/ToolExecutorP

[PATCH] D38882: [clang-rename] Add function unit tests.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. Still LGTM Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:469 + // name. + // FIXME: Consider using using-decls to shorten the namespace + // qualifers. The current b

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 119150. ioeric added a comment. - Add a ExecutionContext class. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/ToolExecutorPluginRegistry.h include/clang/Tool

<    1   2   3   4   5   6   7   8   9   10   >