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
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:
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
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 =
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
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
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:
>
> ```
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:
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
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
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`,
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
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
13 matches
Mail list logo