[PATCH] D63127: [clang-tidy] Fixed checker for abseil to work in C++17 mode

2019-06-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. Fixes the checker for abseil to make tests pass in C++17 mode Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63127 Files: clang

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added AST matcher for ignoring elidable move constructors Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63149 Files: clang/d

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204229. jvikstrom added a comment. - Made ignoreElidable also ignore materializeTemporaryExpr and reformatted code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Fil

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204244. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Updated example and fixed edge case in ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204245. jvikstrom added a comment. - Using CamelCase and also renamed ignoringElidableMoveConstructorCall to ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://r

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204269. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Added match conditionally overload to control in what language standard a match should run in Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204277. jvikstrom marked 10 inline comments as done. jvikstrom added a comment. - Fixed wrong formatting in test code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204282. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. - Using switch for choosing language standard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204437. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Added default to switch for language modes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D6

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204442. jvikstrom added a comment. - Updated outdated docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files: clang/docs/LibASTMatchersReference.html clang/in

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204443. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Removed dependency on unordered map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 F

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204447. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Removed unnecessary return Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files: c

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:153 + case LanguageMode::Cxx2aOrLater: +LangModes = {LanguageMode::Cxx2a}; + } hokein wrote: > nit: add a llvm_unreachable

[PATCH] D63253: [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added a reviewer: hokein. Herald added a subscriber: xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63253 Files: clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp clang-to

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixed abseil-time-subtraction to work on C++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63261 Files: clang-to

[PATCH] D63262: [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Made abseil-upgrade-duration-conversions tests pass on c++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63262 Fil

[PATCH] D63263: [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixed abseil-duration-unnecessary-conversion tests for c++17 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63263 Fil

[PATCH] D63127: [clang-tidy] Fixed checker for abseil to work in C++17 mode

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom abandoned this revision. jvikstrom added a comment. Resubmitted as 4 different CLs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63127/new/ https://reviews.llvm.org/D63127 ___ cfe-commits mai

[PATCH] D63261: [clang-tidy] Fixed abseil-time-subtraction to work on C++17

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204538. jvikstrom marked an inline comment as done. jvikstrom added a comment. Using anyOf instead of multiple selectFirsts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63261/new/ https://reviews.llvm.org/D6

[PATCH] D63479: Added SemanticSymbolASTCollector for collecting semantic symbolsCurrently collects variable and function declarations

2019-06-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, ilya-biryukov, mgorny. Herald added a project: clang. [clangd] Added SemanticSymbolASTCollector that collects variable and function declarations Repository:

[PATCH] D63479: Added SemanticSymbolASTCollector for collecting semantic symbolsCurrently collects variable and function declarations

2019-06-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205275. jvikstrom added a comment. Added dots at the end of comments Updating D63479: Added SemanticSymbolASTCollector for collecting semantic symbols = Currently collects var

[PATCH] D63479: Added SemanticSymbolASTCollector for collecting semantic symbolsCurrently collects variable and function declarations

2019-06-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205301. jvikstrom added a comment. Moved SemanticSymbolASTVisitor to an anonymous namespace and added a function for getting highlights that returns highlights line by line Updating D63479: Added SemanticSymbolASTCollector for collecting semantic symbols

[PATCH] D63479: Added SemanticSymbolASTCollector for collecting semantic symbolsCurrently collects variable and function declarations

2019-06-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom abandoned this revision. jvikstrom added a comment. Resubmitting later with "complete" prototype in CL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63479/new/ https://reviews.llvm.org/D63479 ___

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-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, xazax.hun. Herald added a project: clang. Adds functionality for getting semantic highlights Repository: rG LLVM Github Monorepo https://revie

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205608. jvikstrom added a comment. Herald added a subscriber: mgorny. Adds CMakeLists changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files: clang-tools-ext

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205626. jvikstrom added a comment. Renamed SemanticSymbol to SemanticToken Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files: clang-tools-extra/clangd/CMakeList

[PATCH] D64617: [clangd] Added highlighting for members and methods

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Added highlighting for members and methods. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D64624: [clangd] Added highlighting to enum constants.

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. VSCode does not have a scope for enum constants. So they were placed under "constant.other.enum

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay. Herald added a project: clang. The RecursiveASTVisitor sometimes visits exprs in initializer lists twice. Added dedup

[PATCH] D64617: [clangd] Added highlighting for members and methods

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209510. jvikstrom added a comment. Removed addToken for Exprs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64617/new/ https://reviews.llvm.org/D64617 Files: clang-tools-extra/clangd/SemanticHighlighting.

[PATCH] D64617: [clangd] Added highlighting for members and methods

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209509. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64617/new/ https://reviews.llvm.org/D64617 Files: clang-tool

[PATCH] D64624: [clangd] Added highlighting to enum constants.

2019-07-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209514. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64624/new/ https://reviews.llvm.org/D64624 Files: clang-tools-

[PATCH] D64624: [clangd] Added highlighting to enum constants.

2019-07-15 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:257 + case HighlightingKind::EnumConstant: +return "constant.other.enum.cpp"; case HighlightingKind::Namespace: hoke

[PATCH] D64624: [clangd] Added highlighting to enum constants.

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366045: [clangd] Added highlighting to enum constants. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D64617: [clangd] Added highlighting for members and methods

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366047: [clangd] Added highlighting for members and methods. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 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:36 +// must be deduplicated. +std::sort(Tokens.begin(), Tokens.end()); +for (unsigned I = 1; I < Tokens.size(); ++I) { --

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209773. jvikstrom added a comment. Remove operator< and use std::unique. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64634/new/ https://reviews.llvm.org/D64634 Files: clang-tools-extra/clangd/SemanticHig

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209774. jvikstrom added a comment. Readded newline that was removed accidentaly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64634/new/ https://reviews.llvm.org/D64634 Files: clang-tools-extra/clangd/Sem

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209775. jvikstrom added a comment. Removed return type hint for lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64634/new/ https://reviews.llvm.org/D64634 Files: clang-tools-extra/clangd/SemanticHigh

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

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Adds semantic highlighting for tokens that are a macro argument. Example: #define D_V(X) int

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209852. jvikstrom marked an inline comment as done. jvikstrom added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64634/new/ https://reviews.llvm.org/D64634 Files: clang-tools-e

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D64634#1585521 , @ilya-biryukov wrote: > Have we tried figuring out why `RecursiveASTVisitor` visits the argument > lists twice? Is that an expected behavior? The comment for the function that traverses initialization list

[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366070: [clangd] Fix duplicate highlighting tokens appearing in initializer lists. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pr

[PATCH] D64754: [clangd] Added highlighting for the targets in typedefs.

2019-07-15 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. In `typedef int A` the `A` was not highlighted previously. This patch gives `A` the same kind o

[PATCH] D64754: [clangd] Added highlighting for the targets in typedefs.

2019-07-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210053. jvikstrom added a comment. Add support for using `A = ...`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64754/new/ https://reviews.llvm.org/D64754 Files: clang-tools-extra/clangd/SemanticHighligh

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-16 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210079. jvikstrom added a comment. Moved highlighting state to LSP layer. Removed class holding state. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D6

[PATCH] D64754: [clangd] Added highlighting for the targets in typedefs.

2019-07-16 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366207: [clangd] Added highlighting for the targets in typedefs and using. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1110 PathRef File, std::vector Highlightings) { + llvm::ArrayRef Prev; + { hokein wrote: > this seems unsafe, we get a reference of the map value, we might access it

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210253. jvikstrom marked 15 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210257. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741 Files: clang-tools-

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

2019-07-17 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:170 +return; + Loc = SM.getSpellingLoc(Loc); +} hokein wrote: > The Loc here maybe not in the main file, co

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210259. jvikstrom marked an inline comment as done. jvikstrom added a comment. Fixed edge case when removing conflicting tokens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.o

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D64741#1587204 , @ilya-biryukov wrote: > How should this behave when if the same token is used multiple times inside a > macro and the uses are different? Could we add this to tests? > E.g. > > #define W(a) class a { void

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210261. jvikstrom added a comment. clang-format 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 clang-too

[PATCH] D64855: [clangd] Added highlightings for template parameters and specializations.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Template parameters and specializations were not being highlighted before. This adds highlighti

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210282. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Rewrote test to be more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:281 + )cpp"}}, +{{5}, + { hokein wrote: > so the empty lines are stored separately, which is not easy to figure out

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D64741#1588987 , @ilya-biryukov wrote: > > I had completely missed that there could be conflicting tokens when only > > highlighting macro arguments as well. Added code to just remove conflicting > > tokens. > > Picking one

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210297. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools-

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210359. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Ignore tokens outside of main file. Added testcase for assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://r

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

2019-07-17 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:170 +return; + Loc = SM.getSpellingLoc(Loc); +} hokein wrote: > hokein wrote: > > jvikstrom wrote: > > > hokein wrote: > > > > The Loc here maybe not i

[PATCH] D64855: [clangd] Added highlightings for template parameters and specializations.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210503. jvikstrom added a comment. Added testcases and made highlighting work for template template parameters as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64855/new/ https://reviews.llvm.org/D6485

[PATCH] D64855: [clangd] Added highlightings for template parameters and specializations.

2019-07-18 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/unittests/SemanticHighlightingTests.cpp:179 +R"cpp( + template + class $Class[[A]] { hokein wrote: > hokein wrote: > > could you add so

[PATCH] D64855: [clangd] Added highlightings for template parameters and specializations.

2019-07-18 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 rL366420: [clangd] Added highlightings for template parameters and specializations. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald ad

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210527. jvikstrom marked 9 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools-

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

2019-07-18 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:46 +// removed. +for (unsigned I = 0; I < Tokens.size(); ++I) { + ArrayRef TokRef(Tokens); hokein wrote: > we d

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

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210530. jvikstrom added a comment. Added comment saying conflicting tokens are not highlighted in the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64741/new/ https://reviews.llvm.org/D64741 Files: c

[PATCH] D64922: [clangd] Added option to enable semantic highlighting via an experimental capability

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Adds option to enable semantic highlighting as an experimental capability. The reason for this

[PATCH] D64922: [clangd] Added option to enable semantic highlighting via an experimental capability

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210559. jvikstrom added a comment. Made Protocol comment be doxygen. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64922/new/ https://reviews.llvm.org/D64922 Files: clang-tools-extra/clangd/ClangdLSPServer

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 6 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:458 +// edit there are stale previous highlightings. +std::lock_guard Lock(HighlightingsMutex); +FileToHighlightings.erase(File);

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210567. jvikstrom edited the summary of this revision. jvikstrom added a comment. Added additional note to FIXME on how to solve and also move(ing) Old. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210601. jvikstrom added a comment. Remove braces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210600. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. Address comments and fixed bug where we'd send diffs outside of the file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210606. jvikstrom added a comment. Fixed test case that was actually (kinda) broken even though it didn't fail. (The last two edits in semantic-highlighting test. They removed the `= 2` part and did not insert an extra `;` which produced invalid code. It w

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 210613. jvikstrom added a comment. Removed one lock from onSemanticHighlighting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools-extra/clangd/Cla

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-18 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:292 + /*length*/0UL); + auto NewEnd = NewHighlightings.end(); + auto OldEnd = OldHighlightings.end(); ilya-biryukov wrote: > NIT:

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 211890. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Made tests more readable. Updated to work with rL366577 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D64475#1593481 , @ilya-biryukov wrote: > The fix for a race condition on remove has landed in rL366577 > , this revision would need a small update > after it. Fixed to work with that pat

[PATCH] D65395: [clangd] Added a skeleton for a semantic highlighting feature to the vscode extension.

2019-07-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. This adds a SemanticHighlighting feature to the vscode extension that does not do anything. It adds the no

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

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

[PATCH] D64922: [clangd] Added option to enable semantic highlighting via an experimental capability

2019-07-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom abandoned this revision. jvikstrom added a comment. In D64922#1603759 , @nridge wrote: > I believe this is not necessary. You can add text document capabilities in > the vscode client extension like this: > > class SemanticHighlightingFeature

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:294 + // ArrayRefs to the current line in the highlights. + ArrayRef NewLine(New.begin(), + /*length*/0UL); ilya-biryukov wrote:

[PATCH] D65395: [clangd] Added a skeleton for a semantic highlighting feature to the vscode extension.

2019-07-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 212302. jvikstrom added a comment. Removed the experimental capability and added it to the normal capabilites using type intersection. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65395/new/ https://reviews

[PATCH] D65443: [clangd] Fix a regression in rL366996.

2019-07-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom accepted this revision. jvikstrom added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp:43 + if (!CommonDecl) { +// Now we hit the TUDecl case where commonAncestor() r

[PATCH] D65395: [clangd] Added a skeleton for a semantic highlighting feature to the vscode extension.

2019-07-31 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 212523. jvikstrom added a comment. Added check that clangd server actually supports semantic highlighting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65395/new/ https://reviews.llvm.org/D65395 Files: cl

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-31 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 212522. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Stopped using expensive getLineNumber function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org

[PATCH] D65395: [clangd] Added a skeleton for a semantic highlighting feature to the vscode extension.

2019-07-31 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added a comment. In D65395#1607889 , @hokein wrote: > The skeleton looks good, but apparently it does nothing (only enable the > feature), do you have a small working prototype? I've got a prototype that colors all the highlightings red, but i

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-31 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 212528. jvikstrom marked an inline comment as done. jvikstrom added a comment. Copy outside lock. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64475/new/ https://reviews.llvm.org/D64475 Files: clang-tools

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-31 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:408 +} + } // namespace ilya-biryukov wrote: > ilya-biryukov wrote: > > Could you also add a separate test that checks diffs when the number of > > lin

[PATCH] D65510: [clangd] Fix implicit template instatiations appearing as topLevelDecls.

2019-07-31 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. The parser gives implicit template instantiations to the action's HandleTopLevelDecls callback. This makes

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-07-31 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/ClangdLSPServer.cpp:1125 +Old = std::move(FileToHighlightings[File]); +FileToHighlightings[File] = Highlightings; + } hokein wrote: > ilya-b

[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.

2019-08-01 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367521: [clangd] Duplicate lines of semantic highlightings sent removed. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Contains all the functionality for the highlighting, is going to get cleaned up a lot though. M

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 213011. jvikstrom added a comment. Readded guard against rules without scopes that somehow disappeared. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65637/new/ https://reviews.llvm.org/D65637 Files: clang

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 213013. jvikstrom added a comment. Fixed bug that made it impossible to find colors that were a perfect match to the scope we are looking for (ex: fixes function being color as functions and not as entity.name) Explanation for the bug: When adding the fun

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 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/TextMate.ts:20 +const split = scope.split('.'); +while(split.length > 0) { +split.splice(-1) ---

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 213015. jvikstrom added a comment. Fix matching logic on TM scopes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65637/new/ https://reviews.llvm.org/D65637 Files: clang-tools-extra/clangd/clients/clangd-v

[PATCH] D65637: [clangd] [WIP] Semantic highlighting prototype for the vscode extension.

2019-08-02 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/TextMate.ts:20 +const split = scope.split('.'); +while(split.length > 0) { +split.splice(-1) ---

[PATCH] D65510: [clangd] Fix implicit template instatiations appearing as topLevelDecls.

2019-08-02 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/ClangdUnit.cpp:68 + if (const auto *TD = dyn_cast(D)) +return TD->getTemplateSpecializationKind() == TSK_ImplicitInstantiation; + return false;

[PATCH] D65510: [clangd] Fix implicit template instatiations appearing as topLevelDecls.

2019-08-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 213041. jvikstrom added a comment. Moved test to ClangdUnitTests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65510/new/ https://reviews.llvm.org/D65510 Files: clang-tools-extra/clangd/AST.h clang-tool

  1   2   3   4   >