[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

[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:

[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

[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

[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

[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

[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/

[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:

[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:

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

2019-06-25 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/SemanticHighlight.cpp:75 + SemanticSymbolASTCollector Collector(Ctx); + Collector.TraverseAST(Ctx); + return Collector.getSymbols(); jvikstrom

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206375. jvikstrom added a comment. Made SemanticTokenCollector visible and removed getSemanticHighlights function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206376. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. Added header and empty line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files:

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightTests.cpp:57 + + checkTokensExists(Tokens, Variables, SemanticHighlightKind::Variable); + checkTokensExists(Tokens, Function, SemanticHighlightKind::Function);

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

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

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-25 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206450. jvikstrom added a comment. Made SemanticTokenCollector skip Decls not in the main file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files:

[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

[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:

[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

[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

[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/

[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 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

[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/

[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/

[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:

[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:

[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

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206178. jvikstrom marked 18 inline comments as done. jvikstrom added a comment. Removed LSP specific stuff. Changed a bunch of types and names. Added fixme for macro expansion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-06-24 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/SemanticHighlight.cpp:129 +std::vector> getSemanticScopes() { + return {{"variable"}, {"entity.name.function"}}; +} hokein wrote: > This is

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206247. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. Fixed tests and edge case with function declarations without names for parameters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:75 + SemanticSymbolASTCollector Collector(Ctx); + Collector.TraverseAST(Ctx); + return Collector.getSymbols(); hokein wrote: > let's move the above lines into

[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

[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] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

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

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208028. jvikstrom added a comment. Added overload for addToken and added more code to the test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208030. jvikstrom added a comment. Removed debug prints from test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:38 + bool VisitNamedDecl(NamedDecl *ND) { +if (ND->getDeclName().isEmpty()) + // Don't add symbols that don't have any length. sammccall wrote: > I think you

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208041. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Added testcae. Added another bailout from VisitNamedDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208029. jvikstrom added a comment. Removed VisitVarDecl and VisitFuncDecl in favor of VisitNamedDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207758. jvikstrom marked 8 inline comments as done. jvikstrom added a comment. Not sending TextMate scopes over LSP if semantic highlighting is not enabled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

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

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-05 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208123. jvikstrom added a comment. Added additional testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-05 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208143. jvikstrom added a comment. Separated into three testcases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-05 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 rL365205: [clangd] Added highlighting for variable references (declrefs) (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-05 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208140. jvikstrom added a comment. Made tests more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 Files:

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-05 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 4 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:61 +} +if(isa(D)) { + addToken(Loc, HighlightingKind::Function); hokein wrote: > sammccall wrote: > >

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

2019-07-05 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 non-builtin types using VisitTypeLoc. Ignoring namespace qualifiers as

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206630. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Renamed types to follow LSP. Also renamed files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:28 + : Ctx(AST.getASTContext()), SM(AST.getSourceManager()) { +Ctx.setTraversalScope(AST.getLocalTopLevelDecls()); + } hokein wrote: > I'd move this line to

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206618. jvikstrom marked 11 inline comments as done. jvikstrom added a comment. - [clangd] Added functionality for getting semantic highlights for variable and function declarations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightTests.cpp:47 +TEST(SemanticTokenCollector, GetsCorrectTokens) { + const char *TestCases[] = { + R"cpp( hokein wrote: > the code seems not clang-format, could

[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

2019-06-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/SemanticHighlight.h:17 + +enum class SemanticHighlightKind { + Variable, hokein wrote: > LSP proposal is using `Highlighting` rather than

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364551: [clangd] Emit semantic highlighting tokens when the main AST is built. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206854. jvikstrom marked 2 inline comments as done. jvikstrom added a comment. Made test safe again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63821/new/ https://reviews.llvm.org/D63821 Files:

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.Added another check to DeclTrackingASTConsumer to check that a Decl is actually in the main file.

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov, sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. [clangd] No longer getting template instantiations from header files in Main AST.

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-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, javed.absar. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63821 Files:

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 3 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:75 + if (!SM->isInMainFile(D->getLocation())) +// This decl comes from another file and should not be included in the +// top

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206664. jvikstrom added a comment. Removed comment, getting SM from Decl and removed old check for checking the file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63817/new/ https://reviews.llvm.org/D63817

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Emit publishSemanticHighlighting in LSP if enabled Repository: rG LLVM Github Monorepo

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207031. jvikstrom marked an inline comment as done. jvikstrom added a comment. Added SemanticHighlightingInformation and SemantigHighlightingParams. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 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 highlightings for namespace specifiers. Repository: rG LLVM Github Monorepo

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208998. 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/D64492/new/ https://reviews.llvm.org/D64492 Files:

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-10 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:73 // This check is for not getting two entries when there are anonymous // structs. It also makes us not highlight namespace qualifiers. For // elaborated types the

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209139. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. Moved alias target namespace add token to another function and added testcase for global namespace specifier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:87 + bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNSLoc) { +if (NestedNameSpecifier *NNS = NNSLoc.getNestedNameSpecifier()) + if (NNS->getKind() ==

[PATCH] D64492: [clangd] Added highlightings for namespace specifiers.

2019-07-11 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365745: [clangd] Added highlightings for namespace specifiers. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2019-07-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209228. jvikstrom added a comment. Removed unused code snippets. 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-11 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:172 + const HighlightingToken ) { + return Lhs.R.start.line == Rhs.R.start.line + ?

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

2019-07-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 209225. jvikstrom marked 5 inline comments as done. jvikstrom added a comment. Made diffing function shorter, added multiple previous highlighting entries. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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

[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

[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:

[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

[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:

[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:

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

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

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

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

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:81 void addToken(SourceLocation Loc, const Decl *D) { +if (isa(D)) { + addToken(Loc, HighlightingKind::Class); hokein wrote: > nit: move this around `if

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:38 bool VisitNamedDecl(NamedDecl *ND) { -// FIXME: (De)Constructors/operator need to be highlighted some other way. +// Constructors have a TypePtr TagDecl that is a

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208670. jvikstrom marked 4 inline comments as done. jvikstrom added a comment. No longer highlighting anonymous structs as types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64257/new/

[PATCH] D64257: [clangd] Added highlighting for class and enum types

2019-07-09 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208671. jvikstrom added a comment. Changed comment in addToken. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64257/new/ https://reviews.llvm.org/D64257 Files:

[PATCH] D64257: [clangd] Added highlighting for class and enum types

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

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 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:138 + for (const auto : TokenLines) { +llvm::SmallVector LineHighlights; +llvm::raw_svector_ostream OS(LineHighlights);

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

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

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:144 + write32be(Token.R.start.character, OS); + write16be(Token.R.end.character - Token.R.start.character, OS); + write16be(static_cast(Token.Kind), OS);

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207563. jvikstrom added a comment. Removed from hiding under hidden flag . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files:

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-04 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 rL365111: [clangd] Emit publishSemanticHighlighting in LSP if enabled (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D64199: [clangd] Added highlighting for variable references (declrefs)

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Added highlighting for variable references using VisitDeclRefExpr. Repository: rG LLVM

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-07-01 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364747: [clangd] No longer getting template instantiations from header files in Main… (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

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

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

2019-07-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:73 +if (auto RD = dyn_cast(D)) { + if (auto DC = RD->getDestructor()) { +auto Range = DC->getSourceRange(); hokein wrote: > Here is the case: > > ```

[PATCH] D64310: [clangd] Added semantic highlighting for constructors and destructors.

2019-07-08 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 semantic highlighting to constructor and destructor declarations. Repository: rG LLVM Github

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

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

[PATCH] D64310: [clangd] Added semantic highlighting for constructors and destructors.

2019-07-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom abandoned this revision. jvikstrom added a comment. Abandoning after discussion with sammccall and hokein. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64310/new/ https://reviews.llvm.org/D64310

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

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

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

2019-07-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 208354. jvikstrom marked an inline comment as done. jvikstrom added a comment. Type -> Class Also added more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64257/new/ https://reviews.llvm.org/D64257

[PATCH] D64257: [clangd] Added highlighting for non-builtin types

2019-07-08 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 4 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:68 + +TagDecl *D = TL.getTypePtr()->getAsTagDecl(); +if (!D) hokein wrote: > We are only interested in `TagDecl`,

[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) {

  1   2   3   4   >