[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370482: [clangd] Add highlighting for macro expansions. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66738: [clangd] Added highlighting for structured bindings.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370473: [clangd] Added highlighting for structured bindings. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 218089. jvikstrom added a comment. Renamed MacroExpansion to Macro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66995/new/ https://reviews.llvm.org/D66995 Files:

[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:469 + case HighlightingKind::MacroExpansion: +return "entity.name.function.preprocessor.expansion.cpp"; case HighlightingKind::NumKinds: ilya-biryukov wrote: >

[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 218087. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66995/new/ https://reviews.llvm.org/D66995 Files:

[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 218061. jvikstrom added a comment. Removed SourceManager field from HighlightingTokenCollector. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66995/new/ https://reviews.llvm.org/D66995 Files:

[PATCH] D66738: [clangd] Added highlighting for structured bindings.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:443 +$Primitive[[int]] $Variable[[A]][2] = {1,2}; +auto [$Variable[[B1]], $Variable[[B2]]] = $Variable[[A]];

[PATCH] D66995: [clangd] Add highlighting for macro expansions.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. https://github.com/clangd/clangd/issues/134 Repository: rG LLVM Github Monorepo

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370452: [clangd] Collecting main file macro expansion locations in ParsedAST. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. Pinging about this @ilya-biryukov Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66516/new/ https://reviews.llvm.org/D66516 ___ cfe-commits mailing list

[PATCH] D66990: [clangd] Add distinct highlightings for declarations of functions and methods

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. Should we have different highlightings for declarations vs usages? (Although I guess in the end it will be up to the editor if they highlight them differently as the scope is just more specific for declarations) I guess I personally don't really see the reason as it

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp:260 +// Macros from token concatenations included. +#define CONCAT(X) X##1() +#define MACRO1() 123

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217920. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Added test for prepending concatenations. Also added made tests pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66928/new/

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:107 +class CollectMainFileMacroExpansions : public PPCallbacks { + const SourceManager ilya-biryukov wrote: > Maybe make this

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp:248 +TEST(ClangdUnitTest, CollectsMainFileMacroExpansions) { + Annotations TestCase(R"cpp( +#define MACRO_ARGS(X, Y) X Y ilya-biryukov wrote: > Could you add

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217811. jvikstrom marked 5 inline comments as done. jvikstrom added a comment. Clarified comments. Added tests. Not getting expansions inside other macro expansions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D66406: [clangd] Update theme when color theme changes in vscode extension.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370305: [clangd] Update themeRuleMatcher when color theme changes in vscode extension. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D66928: [clangd] Collecting main file macro expansion locations in ParsedAST.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. TokenBuffer does not collect macro expansions inside macro arguments which is needed for semantic

[PATCH] D66406: [clangd] Update themeRuleMatcher when color theme changes in vscode extension.

2019-08-29 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217785. jvikstrom marked an inline comment as done. jvikstrom added a comment. Use `conf.affectsConfiguration('workbench.colorTheme')` instead of keeping track of the old color theme manually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D66738: [clangd] Added highlighting for structured bindings.

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217652. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Abandoned trying to highlight the same as the bound decl. Reasoning: If you have a reference to a parameter we are not trying to highlight the reference as a parameter, the

[PATCH] D66881: [clangd][vscode] Don't leak the resources

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. Oh, was not aware we needed to dispose the extension as well. I think you should probably add the SemanticHighlightingFeature to the context.subscriptions as well, right? (because I didn't when I did the cleanup patch for it, sorry) Repository: rG LLVM Github

[PATCH] D66406: [clangd] Update themeRuleMatcher when color theme changes in vscode extension.

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217638. jvikstrom added a comment. Updated to new master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66406/new/ https://reviews.llvm.org/D66406 Files:

[PATCH] D66743: [clangd] Cleans up the semantic highlighting resources if clangd crashes.

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370202: [clangd] Cleans up the semantic highlighting resources if clangd stops. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217618. jvikstrom added a comment. Added a RecursiveASTVisitor for finding 'underlying' types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66516/new/ https://reviews.llvm.org/D66516 Files:

[PATCH] D66743: [clangd] Cleans up the semantic highlighting resources if clangd crashes.

2019-08-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217396. jvikstrom added a comment. Dispose of all resources when disposing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66743/new/ https://reviews.llvm.org/D66743 Files:

[PATCH] D66743: [clangd] Cleans up the semantic highlighting resources if clangd crashes.

2019-08-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 2 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:114 + // restarts. + public crashDispose() { +this.disposables.forEach((d) => d.dispose());

[PATCH] D66743: [clangd] Cleans up the semantic highlighting resources if clangd crashes.

2019-08-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217367. jvikstrom added a comment. Renamed disposables to subscriptions and removed clangd crashes in api. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66743/new/ https://reviews.llvm.org/D66743 Files:

[PATCH] D66743: [clangd] Cleans up the semantic highlighting resources if clangd crashes.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Disposes of the vscode listeners when clangd crashes and reuses the old highlighter when it restarts. The

[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 4 inline comments as done. Closed by commit rG1c9aa70b042b: [clangd] Handling text editor/document lifetimes in vscode extension. (authored by jvikstrom). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217134. jvikstrom added a comment. Fixed changes that weren't supposed to be made. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66735/new/ https://reviews.llvm.org/D66735 Files:

[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217131. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66735/new/ https://reviews.llvm.org/D66735 Files:

[PATCH] D66738: [clangd] Added highlighting for structured bindings.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Structured bindings are in a BindingDecl. The decl the declRefExpr points to are the BindingDecls. So

[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:94 +vscode.window.onDidChangeVisibleTextEditors( +() =>

[PATCH] D66735: [clangd] Handling text editor/document lifetimes in vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Just reapplies highlightings for all files when visible text editors change. Could find the correct text

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 10 inline comments as done. Closed by commit rL369893: [clangd] Added a colorizer to the vscode extension. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber:

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:135 + // Update the themeRuleMatcher that is used when highlighting. Also triggers a + // recolorization for all current highlighters. Safe to call

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217099. jvikstrom marked 12 inline comments as done. jvikstrom added a comment. Made tests more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66219/new/ https://reviews.llvm.org/D66219 Files:

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-22 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-22 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 216624. jvikstrom added a comment. Added missing protected and comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66219/new/ https://reviews.llvm.org/D66219 Files:

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-22 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. I had completely forgotten we could just override the applyHighlightings method in the tests, everything is much simpler now. Basically this entire CL was rewritten just now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-22 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 216621. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Rewrote the Highlighter class as we can override the highlighting method for the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D66541: [clangd] Send highlighting diff beyond the end of the file.

2019-08-22 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom accepted this revision. jvikstrom added a comment. This revision is now accepted and ready to land. It feels a bit strange to be sending highlighting (even if they are empty) beyond eof. But I guess the proposal does not specify this and it would make life for the vscode extension

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, kristof.beyls, javed.absar. Herald added a project: clang. Types dependant on templates did not get highlighted properly. This is

[PATCH] D66470: [Syntax] Added function to get macro expansion tokens to TokenBuffer.

2019-08-20 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 2 inline comments as done. Closed by commit rL369385: [Syntax] Added function to get macro expansion tokens to TokenBuffer. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added

[PATCH] D66470: [Syntax] Added function to get macro expansion tokens to TokenBuffer.

2019-08-20 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 216103. jvikstrom added a comment. Readded dissapeared newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66470/new/ https://reviews.llvm.org/D66470 Files: clang/include/clang/Tooling/Syntax/Tokens.h

[PATCH] D66470: [Syntax] Added function to get macro expansion tokens to TokenBuffer.

2019-08-20 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet. Herald added a project: clang. Returns the first token in every mapping where the token is an identifier. This API is required to be able to highlight macro

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 2 inline comments as done. Closed by commit rL369275: [clangd] Added highlighting for tokens that are macro arguments. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:54 + if (Conflicting.size() > 1) { +Tokens.erase(Tokens.begin() + I, + Tokens.begin() + I + Conflicting.size()); ilya-biryukov wrote:

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 215907. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Rewrote conflicting token removal code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 215886. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Renamed colorizer to highlighter and added FIXME about highlightings below eof. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. @ilya-biryukov @hokein ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D66406: [clangd] Update themeRuleMatcher when color theme changes in vscode extension.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Add event listener that listens to configuration changes and reloads the ThemeRuleMatcher when the theme

[PATCH] D66335: [clangd] Added special HighlightingKind for function parameters.

2019-08-19 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369238: [clangd] Added special HighlightingKind for function parameters. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D66221: [clangd] Added highlighting for non type templates.

2019-08-16 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369090: [clangd] Added highlighting for non type templates. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66335: [clangd] Added special HighlightingKind for function parameters.

2019-08-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. This means that function parameters are no longer highlighted as variable.other.cpp but instead as

[PATCH] D66221: [clangd] Added highlighting for non type templates.

2019-08-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 215544. jvikstrom marked an inline comment as done. jvikstrom added a comment. Highlight as TemplateParameter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66221/new/ https://reviews.llvm.org/D66221 Files:

[PATCH] D66221: [clangd] Added highlighting for non type templates.

2019-08-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:231 + if (TP->isFunctionPointerType()) { +addToken(Loc, HighlightingKind::Function); +return; ilya-biryukov wrote: > jvikstrom wrote:

[PATCH] D66221: [clangd] Added highlighting for non type templates.

2019-08-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:231 + if (TP->isFunctionPointerType()) { +addToken(Loc, HighlightingKind::Function); +return;

[PATCH] D66221: [clangd] Added highlighting for non type templates.

2019-08-14 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Highlights pointers to variables as variables. Function pointers are highlighted as functions. Member

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-14 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Adds the main colorizer component. It colorizes every time clangd sends a publishSemanticHighlighting

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-14 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368834: [clangd] Loading TokenColorRules as a class mapping the rules to their… (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-14 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 215065. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Simplified matching code. Use real scopes for test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214845. jvikstrom marked an inline comment as done. jvikstrom added a comment. Added fixme for ranking. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:128 + // Find the rule wich is the longest prefix of scope. + if (rule.scope.length <= scope.length && + scope.substr(0,

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214844. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Changed variable name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:131 +this.rules.forEach((rule) => { + if (rule.scope.length <= scope.length && + scope.substr(0, rule.scope.length) === rule.scope &&

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214834. jvikstrom added a comment. Removed stray edits from loadTheme. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214833. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214814. jvikstrom added a comment. Added a missing test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214813. jvikstrom added a comment. Lazy load the best theme rule for a scope. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214779. jvikstrom added a comment. Updated patch description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214778. jvikstrom added a comment. Updated to use string[][] as scopes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65856: [clangd] Added class for mapping TokenColorRules to their associated clangd TextMate scope

2019-08-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214774. jvikstrom added a comment. Rebased into master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65856/new/ https://reviews.llvm.org/D65856 Files:

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 5 inline comments as done. Closed by commit rL368568: [clangd] Added the vscode SemanticHighlighting feature code but did not enable… (authored by jvikstrom, committed by ). Herald added a project: LLVM.

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. @ilya-biryukov @hokein pinging about this cl (I had completely forgotten about it somehow. Just updated it to the new master though) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214620. jvikstrom added a comment. Moved comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp

[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214619. jvikstrom added a comment. Rebased to master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp

[PATCH] D66083: [clangd] Remove highlightings coming from non topLevelDecls from included files.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 3 inline comments as done. Closed by commit rL368563: [clangd] Remove highlightings coming from non topLevelDecls from included files. (authored by jvikstrom, committed by ). Herald added a project: LLVM.

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214613. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Mirror the LSP proposal SemanticHighlightingParams/Information types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65998/new/

[PATCH] D66083: [clangd] Remove highlightings coming from non topLevelDecls from included files.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. It is possible to write include code from other files so that the decls from there do not become

[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

2019-08-12 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368546: [clangd] Highlighting auto variables as the deduced type. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214373. jvikstrom added a comment. Removed ending whitespace on a line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65996/new/ https://reviews.llvm.org/D65996 Files:

[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214372. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65996/new/ https://reviews.llvm.org/D65996 Files:

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214364. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65998/new/ https://reviews.llvm.org/D65998 Files:

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:62 + + handleNotification(params: HighlightingInformation) { +const tokenLines = params.lines.map((line): HighlightingLine => { hokein

[PATCH] D66001: [clangd] Added highlighting for constructor initializers.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368434: [clangd] Added highlighting for constructor initializers. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66001: [clangd] Added highlighting for constructor initializers.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214346. jvikstrom added a comment. Fixed case where initializer was base class initializer which would cause crash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66001/new/ https://reviews.llvm.org/D66001

[PATCH] D66001: [clangd] Added highlighting for constructor initializers.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Constructor initializers were not being highlighted. This adds highlighting for them by using

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214334. jvikstrom added a comment. Added comment to decodeTokens function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65998/new/ https://reviews.llvm.org/D65998 Files:

[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. jvikstrom updated this revision to Diff 214334. jvikstrom added a comment. Added comment to decodeTokens

[PATCH] D65926: [clangd] Fixed printTemplateSpecializationArgs not printing partial variable specialization arguments.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368403: [clangd] Fixed printTemplateSpecializationArgs not printing partial variable… (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D65938: [AST] No longer visiting CXXMethodDecl bodies created by compiler when method was default created.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 2 inline comments as done. Closed by commit rL368402: [AST] No longer visiting CXXMethodDecl bodies created by compiler when method… (authored by jvikstrom, committed by ). Herald added a project: LLVM.

[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214319. jvikstrom added a comment. Finished comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65996/new/ https://reviews.llvm.org/D65996 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp

[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

2019-08-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. jvikstrom updated this revision to Diff 214319. jvikstrom added a comment. Finished comment. Done in

[PATCH] D65926: [clangd] Fixed printTemplateSpecializationArgs not printing partial variable specialization arguments.

2019-08-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/ASTTests.cpp:40 +TEST(PrintTemplateSpecializationArgs, PrintsTemplateArgs) { + TestTU TU; hokein wrote: > looks like the related tests are in `PrintASTTests.cpp`, could you move

[PATCH] D65926: [clangd] Fixed printTemplateSpecializationArgs not printing partial variable specialization arguments.

2019-08-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 214132. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Merged test with PrintASTTest.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65926/new/ https://reviews.llvm.org/D65926

[PATCH] D65943: [clangd] Added semantic highlighting support for primitives.

2019-08-08 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked an inline comment as done. Closed by commit rL368291: [clangd] Added semantic highlighting support for primitives. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a

  1   2   3   4   >