[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:563 FillDiagBase(*LastDiag); -adjustDiagFromHeader(*LastDiag, Info, *LangOpts); +if (!InsideMainFile) + LastDiagWasAdjusted = adjustDiagFromHeader(*LastDiag, Info, *LangOpts);

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210838. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64863/new/ https://reviews.llvm.org/D64863 Files:

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210834. kadircet added a comment. - Move deduplication logic back into the `flushLastDiag` as discussed offline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64863/new/ https://reviews.llvm.org/D64863

[PATCH] D64990: [clangd] Disable background-index on lit-tests by default

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366575: [clangd] Disable background-index on lit-tests by default (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64990: [clangd] Disable background-index on lit-tests by default

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Since background-index can perform disk writes, we don't want to turn it on tests that won't clear it.

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks, LGTM from my side. Do you have any concerns @sammccall ? Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:427 R"cpp(void f(int a) {

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:208 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); - if (!N) -return false; - Target = llvm::make_unique(N, SM, Ctx); - return

[PATCH] D64980: [clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366559: Revert Revert r366458, r366467 and r366468 (authored by kadircet, committed by ). Herald added subscribers: llvm-commits, mgorny. Herald added a project: LLVM. Changed prior to commit:

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 2 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:473 + SourceManager = Info.getSourceManager(); + if (!InsideMainFile && SM.isWrittenInBuiltinFile(Info.getLocation())) { +

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210786. kadircet added a comment. - Add tests. - Change the layer we ignore the diags: - Mark diags from headers as insidemainfile when we decide to surface them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64970: [clangd] Handle windows line endings in QueryDriver

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366545: [clangd] Handle windows line endings in QueryDriver (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64980: [clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We were deferring the population of DependentTU field in LoadedShard until BackgroundIndexLoader was consumed.

[PATCH] D64970: [clangd] Handle windows line endings in QueryDriver

2019-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM thanks! Do you have commit access? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64970/new/ https://reviews.llvm.org/D64970

[PATCH] D64745: [clangd] BackgroundIndex stores shards to the closest project

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366467: [clangd] BackgroundIndex stores shards to the closest project (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64745: [clangd] BackgroundIndex stores shards to the closest project

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210621. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64745/new/ https://reviews.llvm.org/D64745 Files:

[PATCH] D64745: [clangd] BackgroundIndex stores shards to the closest project

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp:149 + std::unique_ptr create(PathRef CDBDirectory) { +assert(!CDBDirectory.empty() && + "Tried to create storage for empty directory!");

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366458: [clangd] Refactor background-index shard loading (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366455: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210594. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64860/new/ https://reviews.llvm.org/D64860 Files: clang-tools-extra/clangd/FS.cpp

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210589. kadircet marked an inline comment as done. kadircet added a comment. - Get rid of CachedShard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210564. kadircet added a comment. - Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D64918: [ASTUnit] Fix a regression in cached completions

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. LGTM from my side as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64918/new/ https://reviews.llvm.org/D64918 ___ cfe-commits mailing

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:208 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); - if (!N) -return false; - Target = llvm::make_unique(N, SM, Ctx); - return

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp:93 + +void BackgroundIndexLoader::load(PathRef MainFile, + BackgroundIndexStorage *Storage) { sammccall wrote: > This handles

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210541. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64912: [Clangd] Changed ExtractVariable to only work on non empty selections

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Tweak.h:51 +/// The Length of the selection +unsigned SelectionLength; /// The AST nodes that were selected. SureYeaah wrote: > kadircet wrote: > > maybe expose a

[PATCH] D64912: [Clangd] Changed ExtractVariable to only work on non empty selections

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/Tweak.h:51 +/// The Length of the selection +unsigned SelectionLength; /// The AST nodes that were selected. maybe expose a `SourceLocation SelectionEnd` ? Repository:

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:490 + auto FS = FSProvider.getFileSystem(); + llvm::DenseSet TUsToIndex; + for (auto : Result.Shards) { sammccall wrote: > nit: again, this patch is adding Path/PathRef

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210511. kadircet marked 13 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64712/new/ https://reviews.llvm.org/D64712 Files:

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:195 Intent intent() const override { return Refactor; } + // Compute the extraction context for the Selection + void computeExtractionContext(const SelectionTree::Node

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210354. kadircet marked 5 inline comments as done. kadircet added a comment. - Add removeDots helper to FS.h - Revert changes in getFallbackCommands. - Add comments for the reasoning behind removeDots calls. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:77 GlobalCompilationDatabase::getFallbackCommand(PathRef File) const { + llvm::SmallString<128> CanonPath(File); + llvm::sys::path::remove_dots(CanonPath, true);

[PATCH] D64863: [clangd] Ignore diags from builtin files

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Herald added a project: clang. This fixes a case where we show diagnostics on arbitrary lines, in an internal codebase. Open for ideas on unittesting this.

[PATCH] D64789: [clangd] Handle windows line endings in QueryDriver

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366320: [clangd] Handle windows line endings in QueryDriver (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64712: [clangd][NFC] Refactor background-index shard loading

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 210303. kadircet added a comment. - As discussed offline, moved the "staleness" detection back to background index - A renaming within Rebuilder, "LoadedTUs -> LoadedShards" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64613: [clangd] Type hierarchy: don't resolve parents if the client only asked for children

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64613/new/ https://reviews.llvm.org/D64613

[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

2019-07-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64860 Files:

[PATCH] D64789: [clangd] Handle windows line endings in QueryDriver

2019-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. fixes second case of https://github.com/clangd/clangd/issues/93 Repository: rG LLVM Github Monorepo

[PATCH] D58710: Added more detailed documentation for clangd

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/trunk/docs/clangd/Installation.rst:325 + + $ ln -s ~/myproject/compile_commands.json ~/myproject-build/ + thakis wrote: > Isn't the order of the arguments the wrong way round here? yeah that seems to

[PATCH] D64745: [clangd] BackgroundIndex stores shards to the closest project

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Changes persistance logic to store shards at the directory of closest CDB. Previously we were storing all shards

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:323 while(a < ^1) -^a++; +[[a++]]; // do while SureYeaah wrote: > kadircet wrote: > > I thought extractor didn't handle this case(missing

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:299 // return statement return ^1; } SureYeaah wrote: > kadircet wrote: > > left out this one ? > Since that's an IntegerLiteral, this patch doesn't

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:302 void f() { - int a = 5 + [[4 ^* ^xyz^()]]; + int a = 5 + [[4 * [[xyz(); // multivariable initialization kadircet wrote: > how come these

[PATCH] D64717: [Clangd] Fixed ExtractVariable for MemberExprs and Assignment Exprs

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:83 static bool isExtractableExpr(const clang::Expr *Expr) { if (Expr) { // FIXME: check if we need to cover any other types nit: Could you reduce

[PATCH] D64718: [clangd] Triggering indexing on each translation unit with an error

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Background indexing triggers indexing only on the first TU that includes a stale dependency. This patch extends

[PATCH] D64712: [clangd] Refactor background-index shard loading

2019-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64712 Files:

[PATCH] D64613: [clangd] Type hierarchy: don't resolve parents if the client only asked for children

2019-07-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1238 Optional Result = - getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet); + getTypeAncestors(*CXXRD, AST.getASTContext(), RPSet, ResolveParents); if (!Result)

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:252 -llvm::Optional toHalfOpenFileRange(const SourceManager , +// FIXME: Here we check whether the token at the location is a greatergreater +// (>>) token and consider it as a single greater

[PATCH] D64489: [clangd][QueryDriver] Use language from underlying database if possible

2019-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365776: [clangd][QueryDriver] Use language from underlying database if possible (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D64489: [clangd][QueryDriver] Use language from underlying database if possible

2019-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/QueryDriverDatabase.cpp:121 // Should we also preserve flags like "-sysroot", "-nostdinc" ? - const llvm::StringRef Args[] = { - Driver, "-E", "-x",

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365634: [clangd] Filter out non-governed files from broadcast (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64489: [clangd][QueryDriver] Use language from underlying database if possible

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64489 Files:

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 208890. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64247/new/ https://reviews.llvm.org/D64247 Files:

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 208697. kadircet added a comment. - Rearrange changes to get a better diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64247/new/ https://reviews.llvm.org/D64247 Files:

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:653 +auto PI = CDB.getProjectInfo(File); +assert(PI && "Found CDB but no ProjectInfo!"); + sammccall wrote: > This looks like a bad assertion: it should be OK to

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 208686. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64247/new/ https://reviews.llvm.org/D64247 Files:

[PATCH] D64391: [CodeComplete] an option to suppress endings for header completion

2019-07-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1088 + + if (Trigger == "/") { // trigger only on '#include.../' +auto StartOfLine = Code->rfind('\n', *Offset); i think instead of regex, it would be better to just

[PATCH] D64247: [clangd] Filter out non-governed files from broadcast

2019-07-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This also turns off implicit discovery of additional compilation databases. Repository: rG LLVM Github

[PATCH] D64196: [clangd] Query driver reads stderr and passes driver as first argument

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365132: [clangd] Query driver reads stderr and passes driver as first argument (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365124: [clangd] Turn background-index on by default (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64147: [clangd] Make HadErrors part of background index's internal state

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365123: [clangd] Make HadErrors part of background indexs internal state (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365122: [clangd] Add HadErrors field into shards (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365121: [clangd] Store hash of command line in index shards. (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365120: [clangd] Also cache failures while indexing (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:191 "Index project code in the background and persist index on disk. " "Experimental"), +llvm::cl::init(true));

[PATCH] D64147: [clangd] Make HadErrors part of background index's internal state

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207986. kadircet marked 6 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64147/new/ https://reviews.llvm.org/D64147 Files:

[PATCH] D64196: [clangd] Query driver reads stderr and passes driver as first argument

2019-07-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. gcc invokes cc1 through a path deduced from argv[0] therefore it must be correctly set. Also it prints the search

[PATCH] D64147: [clangd] Make HadErrors part of background index's internal state

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64147 Files:

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207832. kadircet added a comment. - Populate HadErrors in background index Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64133/new/ https://reviews.llvm.org/D64133 Files: clang-tools-extra/clangd/Headers.h

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Headers.h:65 struct IncludeGraphNode { - // True if current file is a main file rather than a header. - bool IsTU = false; + enum class SourceFlag : uint8_t { +

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207793. kadircet added a comment. - Delete leftover header swap Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64133/new/ https://reviews.llvm.org/D64133 Files: clang-tools-extra/clangd/Headers.h

[PATCH] D64133: [clangd] Add HadErrors field into shards

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64133 Files:

[PATCH] D64127: [clangd] Deduplicate clang-tidy diagnostic messages.

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Could you also revert changes in `LSPDiagnosticCompare` in `Protocol.h`, that were introduced by rL363889 ? (or bring back `fixits-duplication.test`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207721. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ https://reviews.llvm.org/D64018 Files:

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rL365005: [clang][HeaderSearch] Shorten paths for includes in mainfiles directory (authored by kadircet, committed by ). Herald added subscribers: llvm-commits,

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207578. kadircet marked 3 inline comments as done. kadircet added a comment. - Use an InternedCompileCommand struct rather than a pack of StringRefs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364904: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207497. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 Files:

[PATCH] D64063: [clang][ArgumentAdjusters] Do not add fsyntax-only if already exists

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added a project: clang. Herald added a subscriber: cfe-commits. kadircet added a child revision: D64018: [clangd] Store hash of command line in index shards.. Repository: rG LLVM Github Monorepo

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207489. kadircet added a comment. - Store Cmdline itself instead of hash Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ https://reviews.llvm.org/D64018 Files:

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D64018#1566085 , @sammccall wrote: > This makes sense but is hard to debug - is there a reason we don't just store > (the relevant parts of) the actual compile command? Size? Yes I had the size in mind, also didn't see any

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207484. kadircet marked 2 inline comments as done. kadircet added a comment. - Update fixme to mention error case in addition to the missing files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64019 Files:

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:313 +// we don't even know what absolute path they should fall in. +if (HadErrors && !IGN.IsTU) + continue; sammccall wrote: > Maybe add a FIXME that we should

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This is to enable cache invalidation when command line flags changes. Repository: rG LLVM Github Monorepo

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207316. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/ https://reviews.llvm.org/D63986 Files:

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207312. kadircet added a comment. - Add comments to the CheckDir lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 Files:

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207308. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments. - Use TUs path as a fallback, rather than a search path. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/IndexAction.cpp:161 CI.getDiagnostics().hasUncompilableErrorOccurred()) { llvm::errs() << "Skipping TU due to uncompilable errors\n"; +} else { sammccall wrote: > I'm

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207296. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/ https://reviews.llvm.org/D63986 Files:

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Clangd currently doesn't cache any indexing failures, which results in retrying those failed files even if their

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:34 +// class to store information about the Expr that is being extracted +class Extract { +public: most of the methods seem to be taking a SM, why not make

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63931: [clangd] Make PreambleStatusCache handle filenames more carefully

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63931/new/ https://reviews.llvm.org/D63931

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clangd/Selection.cpp:45 + if (R.first > Begin) +return false; // [R.First, Begin) is not covered. + if (Begin < R.second)

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:54 + +// RAV subclass to find all DeclRefs in a given Stmt +class FindDeclRefsVisitor I believe this class is rather used to check if any decl referenced in

[PATCH] D63330: [clangd] Add Value field to HoverInfo

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364390: [clangd] Add Value field to HoverInfo (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364389: [clangd] Enable extraction of system includes from custom toolchains (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63194: [clangd] Link and initialize target infos

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet closed this revision. kadircet added a comment. Landed as rL364387 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D63194

[PATCH] D63755: [clang][Tooling] Infer target and mode from argv[0] when using JSONCompilationDatabase

2019-06-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364386: [clang][Tooling] Infer target and mode from argv[0] when using… (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

  1   2   3   4   5   6   7   8   9   >