[PATCH] D75503: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd9b2e18bd69: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75503/new/ http

[PATCH] D75106: [clangd] Fix early selection for non-vardecl declarators

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 248123. kadircet marked 2 inline comments as done. kadircet added a comment. - Add the old test for hover over operator back. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75106/new/ https://reviews.llvm.org/D

[PATCH] D75106: [clangd] Fix early selection for non-vardecl declarators

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:612 + // underlying TypeLoc. + // FIXME: Unfortunately this doesn't work, even though RecursiveASTVisitor + // traverses the underlying TypeLoc inside DeclarationName, it is null f

[PATCH] D74842: [clangd] Make use of syntax tokens in ReplayPreamble

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 248124. kadircet marked 2 inline comments as done. kadircet added a comment. - More annotations to the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74842/new/ https://reviews.llvm.org/D74842 Files: cl

[PATCH] D74842: [clangd] Make use of syntax tokens in ReplayPreamble

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGec7c8bae8455: [clangd] Make use of syntax tokens in ReplayPreamble (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74842/new/ https://

[PATCH] D75106: [clangd] Fix early selection for non-vardecl declarators

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6b8181895b9: [clangd] Fix early selection for non-vardecl declarators (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75106/new/ http

[PATCH] D75582: [clangd] Track document versions, include them with diags, enhance logs

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:73 virtual void onDiagnosticsReady(PathRef File, +const llvm::json::Value &Version, std::vector Diagnostics) {} --

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1465 +if (Opts.EnableInstrumentationMode) + (*Opts.RecordCCResults)(toCodeCompleteResult(Top)); + can't we make use of the trace::Span instead ? Repository: rG LLVM

[PATCH] D75602: [clangd] Cancel certain operations if the file changes before we start.

2020-03-04 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 Comment at: clang-tools-extra/clangd/Cancellation.cpp:39 + return true; return false; // Not in scope of a task. } comment seems to

[PATCH] D75602: [clangd] Cancel certain operations if the file changes before we start.

2020-03-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:58 +/// without any explicit user action. +static TUScheduler::ASTActionInvalidation LikelyImplicit = +TUScheduler::InvalidateOnUpdate; nit: i would actually keep `Invalidat

[PATCH] D75582: [clangd] Track document versions, include them with diags, enhance logs

2020-03-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:73 virtual void onDiagnosticsReady(PathRef File, +const llvm::json::Value &Version, std::vector Diagnostics) {} --

[PATCH] D75603: [clangd] Add instrumentation mode in clangd for metrics collection.

2020-03-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D75603#1906418 , @sammccall wrote: > Forgot to mention: I also think the trace approach certainly has things going > for it, or even parsing out the messages from the existing logs. > But in this particular case the callback

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 227035. kadircet added a comment. - Add comments - Early return when generating edits fails Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/ https://reviews.llvm.org/D68937 Files: clang-tools-extra/

[PATCH] D69608: [clangd] Helper for getting nested namespace qualification

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Introduce a new helper for getting minimally required qualifiers necessary to spell a name at a point in a given De

[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 227040. kadircet added a comment. - Rebase - Move qualification logic into AST.h so that it can be used by define outline, see D69033 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:55 + // Include template parameter list. + if (auto *FTD = FD->getDescribedFunctionTemplate()) +return FTD->getBeginLoc(); hokein wrote: > Could you confi

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 227108. 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/D69298/new/ https://reviews.llvm.org/D69298 Files: clang-tools-ex

[PATCH] D69624: [clangd] Fix namespace aliases in findExplicitReferences

2019-10-31 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. This looks good, but it is missing the context. I suppose we were previously not providing any references for namespace aliases, because we were filtering both the alias and the underlying

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 227233. kadircet marked an inline comment as done. kadircet added a comment. - Address comments - Get rid of raw string literals inside macro calls, to not break stage1 compilers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D68937: [clangd] Add parameter renaming to define-inline code action

2019-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71aa3f7b7e43: [clangd] Add parameter renaming to define-inline code action (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68937/new/

[PATCH] D69624: [clangd] Fix namespace aliases in findExplicitReferences

2019-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. As discussed offline, it might make more sense to fix this in `targetDecls` itself. Considering how the `Alias` is handled for typedefs and usings, it feels like this is a mistake for namespace aliases to be marked in that way. Repository: rG LLVM Github Monorepo C

[PATCH] D70173: [clang][Tooling] Filter flags that generate output in SyntaxOnlyAdjuster

2019-11-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, ilya-biryukov. Herald added a project: clang. Flags that generate output could result in failures when creating syntax only actions. This patch introduces initial logic for filterin

[PATCH] D70173: [clang][Tooling] Filter flags that generate output in SyntaxOnlyAdjuster

2019-11-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 229069. kadircet marked an inline comment as done. kadircet added a comment. - Update comment to mention droppage of options that generate output. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70173/new/ https

[PATCH] D70173: [clang][Tooling] Filter flags that generate output in SyntaxOnlyAdjuster

2019-11-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16bdcc809c72: [clang][Tooling] Filter flags that generate output in SyntaxOnlyAdjuster (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D70209: [clangd] Expose value of enumerators to Hover API. (not UI yet)

2019-11-13 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: clang-tools-extra/clangd/unittests/XRefsTests.cpp:984 }}, + {R"cpp(enum Color { RED, [[GR^EEN]], };)cpp", + [](HoverInfo &HI)

[PATCH] D70203: [AST] Attach comment in `/** doc */ typedef struct A {} B` to B as well as A.

2019-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/test/Index/annotate-comments-typedef.m:20 } MyEnum; -// CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:3 (Definition) FullCommentAsHTML=[ Documentation for MyEnum ] FullCommentAsXML=[c:@EA@MyEnumtypedef enum MyEnum MyEnum Docu

[PATCH] D70194: [clangd] Ignore more implicit nodes in computing selection.

2019-11-14 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: clang-tools-extra/clangd/Selection.cpp:162 + // Refs to operator() and [] are (almost?) always implicit as part of calls. + if (auto *DRE = ll

[PATCH] D69543: [clangd] Add a tweak refactoring to wrap Objective-C string literals in `NSLocalizedString` macros

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. implementation lgtm with a few nits. main concern is about the new getlangopts helper Comment at: clang-tools-extra/clangd/ParsedAST.h:80 + const LangOptions &getLangOpts() const { +return getASTContext().getLangOpts(); can we

[PATCH] D70203: [AST] Attach comment in `/** doc */ typedef struct A {} B` to B as well as A.

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang/test/Index/annotate-comments-typedef.m:20 } MyEnum; -// CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:

[PATCH] D70325: [clangd] Fix hover 'local scope' to include class template params

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. LGTM, with a question. What about default template params? I believe we would also like to print them, could you add a test case for that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70325/new/ https://reviews.llvm.org/

[PATCH] D70359: [clangd] Show values of more expressions on hover

2019-11-18 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/Hover.cpp:247 + // to the enclosing call. + if (E->getType()->isFunctionType() || E->getType()->isFunctionPointerType() || + E->getType()->isFunctionReferenceTy

[PATCH] D70357: [clangd] Untangle Hover from XRefs, move into own file.

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:374 + } else { +auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos); +if (!Offset) { nit: `SM.getFileOffset(SourceLocationBeg)` ? Comm

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks for taking a look into this, the `rsp files` issue has came up before in the past but there wasn't enough investment to implement it. Haven't checked the implementation in detail yet, I believe the layering should be different; This is a common problem for all

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks, layering seems better now. But as Sam mentioned in the issue it would be better to have something like `expandRSPFiles` similar to `inferMissingCompileCommands`. As the problem is not in the `JSONCompilationDatabase` itself, it can also occur in `FixedCompilati

[PATCH] D70325: [clangd] Fix hover 'local scope' to include class template params

2019-11-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! but again it looks as if rebasing went wrong :/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70325/new/ https://reviews.llvm.org/D7

[PATCH] D70359: [clangd] Show values of more expressions on hover

2019-11-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. it feels like rebasing went wrong :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70359/new/ https://reviews.llvm.org/D70359 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D70357: [clangd] Untangle Hover from XRefs, move into own file.

2019-11-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Hover.cpp:374 + } else { +auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos); +if (!Offset) { ---

[PATCH] D70359: [clangd] Show values of more expressions on hover

2019-11-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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70359/new/ https://reviews.llvm.org/D70359 __

[PATCH] D70446: [clangd] Treat UserDefinedLiteral as a leaf in SelectionTree, sidestepping tokenization issues

2019-11-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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70446/new/ https://reviews.llvm.org/D70446 ___

[PATCH] D69608: [clangd] Helper for getting nested namespace qualification

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230211. kadircet marked 4 inline comments as done. kadircet added a comment. - Add support for non-namespace decl contexts. - Add an overload for "textual namespace" handling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230213. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments - Rebase - Get rid of string literals inside macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69033/new/ http

[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:196 //~ -> we need to qualify Bar not x. -if (!ND->getDeclContext()->isNamespace()) +if (!ND->getLexicalDeclContext()->isNamespace()) retu

[PATCH] D70481: [clangd] Fix a crash in expected types

2019-11-20 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70481/new/ https://reviews.llvm.org/D70481 ___

[PATCH] D68682: Clang-tidy fix removals removing all non-blank text from a line should remove the line

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. also could you rename the revision so that it reflects the fact that, this is a change to clang-format and has nothing to do with clang-tidy ? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68682/new/ https://reviews.llvm.o

[PATCH] D68682: Clang-tidy fix removals removing all non-blank text from a line should remove the line

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. The changes are not directly related to clang-tidy, so could you get rid of that clang-tidy some-checker-specific tests and put some unittests into clang/unittests/Format/CleanupTest.cpp ? Comment at: clang/include/clang/Basic/CharInfo.h:196 +/// R

[PATCH] D70494: [clangd] Fix diagnostic location for macro expansions

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Diagnostic locations were broken when it was result of a macro expansion. This patch fixes it by using exp

[PATCH] D70440: [Driver] Use VFS to check if sanitizer blacklists exist

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/unittests/Driver/SanitizerArgsTest.cpp:37 + +static constexpr const char *ClangPath = "/opt/llvm/bin/clang"; +static constexpr const char *InputFile = "/sources/foo.c"; can't this be just `clang` ? as we are passi

[PATCH] D70440: [Driver] Use VFS to check if sanitizer blacklists exist

2019-11-21 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! Comment at: clang/unittests/Driver/SanitizerArgsTest.cpp:89 +return FS; + }; + llvm::Optional Driver; nit: semicolon Repository: rG LLV

[PATCH] D68682: format::cleanupAroundReplacements removes whole line when Removals leave previously non-blank line blank

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. `ToolingTests/ApplyAtomicChangesTest.FormatsCorrectLineWhenHeaderIsRemoved` also seems to be failing, you can run it with `ninja ToolingTests && ./tools/clang/unittests/Tooling/ToolingTests --gtest_filter="ApplyAtomicChangesTest.FormatsCorrectLineWhenHeaderIsRemoved"`

[PATCH] D69608: [clangd] Helper for getting nested namespace qualification

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 14 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:330 + [&](NestedNameSpecifier *NNS) { +return llvm::any_of( +VisibleNamesp

[PATCH] D69608: [clangd] Helper for getting nested namespace qualification

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230423. kadircet marked 14 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69608/new/ https://reviews.llvm.org/D69608 Files: clang-tools-e

[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230424. 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/D69033/new/ https://reviews.llvm.org/D69033 Files: clang-tools-ex

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kadircet added a parent revision: D69298: [clangd] Define out-of-line initial apply logic. Return type mi

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230439. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://reviews.llvm.org/D70535 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp clang-

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230437. kadircet added a comment. - Get rid of raw string literals inside macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69298/new/ https://reviews.llvm.org/D69298 Files: clang-tools-extra/clangd/refa

[PATCH] D70569: [clangd] Allow extract-to-function on regions that always return.

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. btw forgot to add a comment, it might be worth mentioning in change description that, this works in its current state because we don't allow extractions inside lambda expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D70569: [clangd] Allow extract-to-function on regions that always return.

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:173 +bool alwaysReturns(const Extraction

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sorry wrote comments but forgot to hit submit :( Comment at: clang/include/clang/Tooling/CompilationDatabase.h:229 +/// \return true if all @files were expanded successfully or there were none. +bool expandResponseFiles(tooling::CompileCommand &Cmd, +

[PATCH] D70569: [clangd] Allow extract-to-function on regions that always return.

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:611 + // (Others are possible if there are conversions, but this seems clearest). + if (CapturedInfo.HasReturnStmt) { +// If the return is conditional, neither replacing

[PATCH] D70494: [clangd] Fix diagnostic location for macro expansions

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 5 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:121 const SourceManager &SM = Info.getSourceManager(); + const SourceLocation &DiagLoc = SM.getFileLoc(Info.getLocation()); SourceLocation Includ

[PATCH] D70494: [clangd] Fix diagnostic location for macro expansions

2019-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230636. 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/D70494/new/ https://reviews.llvm.org/D70494 Files: clang-tools-ex

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230841. kadircet added a comment. - Move TargetContext generation logic to a separate function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://reviews.llvm.org/D70535 Files: clang-tools-ext

[PATCH] D70656: [clangd] Define out-of-line qualify function name

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230843. kadircet added a comment. - Get rid of debug output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70656/new/ https://reviews.llvm.org/D70656 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOut

[PATCH] D70656: [clangd] Define out-of-line qualify function name

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kadircet updated this revision to Diff 230843. kadircet added a comment. - Get rid of debug output When

[PATCH] D68261: [clangd] Add "inline" keyword to prevent ODR-violations in DefineInline

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230847. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68261/new/ https://reviews.llvm.org/D68261 Files: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp clang-t

[PATCH] D70494: [clangd] Fix diagnostic location for macro expansions

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230849. kadircet marked an inline comment as done. kadircet added a comment. - Group similar tests together Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70494/new/ https://reviews.llvm.org/D70494 Files: cl

[PATCH] D69608: [clangd] Helper for getting nested namespace qualification

2019-11-25 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 rG97d6e8e0f374: [clangd] Helper for getting nested namespace qualification (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5075c6821982: [clangd] Improve symbol qualification in DefineInline code action (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D69033?vs=230424&id=230851#toc Repository: rG

[PATCH] D70494: [clangd] Fix diagnostic location for macro expansions

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe841029aef74: [clangd] Fix diagnostic location for macro expansions (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70494/new/ https:/

[PATCH] D70684: [clangd] Shutdown cleanly on signals.

2019-11-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. Thanks, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70684/new/ https://reviews.llvm.org/D70684 __

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Tooling/CompilationDatabase.h:223 +/// Returns a wrapped CompilationDatabase that will expand all response files on +/// commandline returned by underlying database. nit: `s/response files/rsp(res

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp:167 +for (auto &Cmd : Cmds) { + expandResponseFiles(Cmd, Tokenizer); +} lh123 wrote: > lh123 wrote: > > lh123 wrote: > > > kadircet wrote: > > >

[PATCH] D70723: [clangd] Store index::SymbolKind in HoverInfo

2019-11-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. LSP's SymbolKind has some shortcomings when it comes to C++ types, index::SymbolKind has more detailed info like Destructor, Parameter, MACRO

[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

2019-11-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: llvm/include/llvm/Support/CommandLine.h:47 +class FileSystem; +IntrusiveRefCntPtr getRealFileSystem(); + now that we are also pulling the the function, I think it is OK to include the header instead.

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp:28 + llvm::IntrusiveRefCntPtr FS) + : Base(std::move(Base)), Tokenizer(Tokenizer), FS(FS) { +assert(this->Base != nullptr); nit: `FS(std::move(F

[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

2019-11-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1053 + llvm::ErrorOr CurrDir = FS.getCurrentWorkingDirectory(); + if (!CurrDir) +return false; this comment has moved into a irrelevant line and wasn't addressed, so re-stating it

[PATCH] D69266: [clangd] Define out-of-line availability checks

2019-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231374. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments - Bail out on templated classes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69266/new/ https://reviews.llvm.org

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231382. kadircet marked an inline comment as done. kadircet added a comment. - Address comments - Better handling for macros and tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69298/new/ https://reviews.l

[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

2019-11-28 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, please make sure you've clang-formatted the changes though Comment at: llvm/lib/Support/CommandLine.cpp:1054 + llvm::ErrorOr CurrDirOrErr = FS.getCurrentWorkingDir

[PATCH] D70222: [clangd] Add support for .rsp files in compile_commands.json

2019-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. mostly LG, a few last nits. Comment at: clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp:51 + // FIXME: we should rather propagate the current directory into + // ExpandResponseFiles as well in addition to FS and someone can take

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231391. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://reviews.llvm.org/D70535 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp clang-

[PATCH] D70222: [clang][Tooling] Add support for .rsp files in compile_commands.json

2019-11-29 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 a lot for working on this patch, LGTM! again please make sure the changes are clang-formatted. Do you have commit access? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231511. kadircet marked 9 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://reviews.llvm.org/D70535 Files: clang-tools-ex

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:153 + // Get new begin and end positions for the qualified body. + auto OrigFuncRange = toHalfOpenFileRange( + SM, FD->getASTContext().getLangOpts(), FD->getSourceRange()

[PATCH] D70656: [clangd] Define out-of-line qualify function name

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231512. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70656/new/ https://reviews.llvm.org/D70656 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cp

[PATCH] D70656: [clangd] Define out-of-line qualify function name

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231513. kadircet added a comment. - Update comments after rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70656/new/ https://reviews.llvm.org/D70656 Files: clang-tools-extra/clangd/refactor/tweaks/Defi

[PATCH] D70769: [Support] add vfs support for ExpandResponseFiles

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. @jhenderson I am planning to commit this if the discussion around `std::errc` vs `llvm::errc` is resolved, I don't have any preference towards one or the other both seems to get the work done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D70857: [llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

2019-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. kadircet added a parent revision: D70769: [Support] add vfs support for ExpandResponseFiles. kadircet edited parent revisions, a

[PATCH] D70863: [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac.

2019-12-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:135 +// On other platforms, just look for compilers on the PATH. +for (const char* Name : {"clang", "gcc", "ccc"}) + if (auto PathCC = llvm::sys::findProgramByName(Name

[PATCH] D70911: [clangd] Switch Hover.All to structured tests

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

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231866. kadircet marked 5 inline comments as done. kadircet added a comment. - Extract replacement applying part to a new function and add a fixme for sharing it with define inline code-action. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D69543: [clangd] Add a tweak refactoring to wrap Objective-C string literals in `NSLocalizedString` macros

2019-12-03 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! Comment at: clang-tools-extra/clangd/ParsedAST.h:80 + const LangOptions &getLangOpts() const { +return getASTContext().getLangOpts(); ---

[PATCH] D70857: [llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 231947. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments - Change helper to take absolute paths, instead of taking a currentdir - Update tests to make use of FS - Add a new test for container-relative filenames Reposit

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 232036. kadircet added a comment. - Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://reviews.llvm.org/D70535 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp cla

[PATCH] D70857: [llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1183 ExpandResponseFile(FName, Saver, Tokenizer, ExpandedArgv, MarkEOLs, - RelativeNames, FS)) { + RelativeNames, FS, CurrentDir))

[PATCH] D69266: [clangd] Define out-of-line availability checks

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f251eece466: [clangd] Define out-of-line availability checks (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69266/new/ https://revie

[PATCH] D69298: [clangd] Define out-of-line initial apply logic

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce2189202245: [clangd] Define out-of-line initial apply logic (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69298/new/ https://revie

[PATCH] D70535: [clangd] Define out-of-line qualify return value

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe4609ec0e8cf: [clangd] Define out-of-line qualify return value (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70535/new/ https://revi

[PATCH] D70656: [clangd] Define out-of-line qualify function name

2019-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGddcce0f3d665: [clangd] Define out-of-line qualify function name (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D70656?vs=231513&id=232042#toc Repository: rG LLVM Github Mon

[PATCH] D70222: [clang][Tooling] Add support for .rsp files in compile_commands.json

2019-12-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG45ef055d4ffd: [clang][Tooling] Add support for .rsp files in compile_commands.json (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7022

<    26   27   28   29   30   31   32   33   34   35   >