[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 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 Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:87 + typedef abc::$Class[[A]] AAA; + enum class $Enum[[E]] {}; + enum $Enum[[EE]] {}; hokein wrote: > could we split the enum case into a

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

2019-07-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. could you please also update the patch description? "non-builtin" types are not precise, this patch only highlights the class and enum types. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:71 + +TagDecl *D =

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

2019-07-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein 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(); jvikstrom wrote: > hokein wrote: > > Here is

[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] 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] 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 Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:68 + +TagDecl *D = TL.getTypePtr()->getAsTagDecl(); +if (!D) jvikstrom wrote: > hokein wrote: > > We are only interested in `TagDecl`, maybe use the

[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] D64257: [clangd] Added highlighting for non-builtin types

2019-07-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:68 + +TagDecl *D = TL.getTypePtr()->getAsTagDecl(); +if (!D) We are only interested in `TagDecl`, maybe use the `VisitTagLoc` callback, so that you can get rid

[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