kadircet added a comment. we should also be handling `LabelDecl`s in clang/lib/Index/IndexDecl.cpp
================ Comment at: clang/lib/Index/IndexBody.cpp:145 + if (auto *LabelDecl = Goto->getLabel()) + IndexCtx.handleReference(LabelDecl, Goto->getLabelLoc(), Parent, ParentDC, + static_cast<unsigned>(SymbolRole::Reference)); ---------------- this should propagate the result from handleReference, i.e `return IndexCtx.handleRefer...`. ================ Comment at: clang/lib/Index/IndexBody.cpp:146 + IndexCtx.handleReference(LabelDecl, Goto->getLabelLoc(), Parent, ParentDC, + static_cast<unsigned>(SymbolRole::Reference)); + return true; ---------------- s/unsigned/SymbolRoleSet ================ Comment at: clang/lib/Index/IndexBody.cpp:154 + ParentDC, + static_cast<unsigned>(SymbolRole::Reference)); + return true; ---------------- the two comments above also applies to this one. ================ Comment at: clang/unittests/Index/IndexTests.cpp:355 + EXPECT_THAT(Index->Symbols, + Not(Contains(AllOf(QName("label"), HasRole(SymbolRole::Reference), + WrittenAt(Position(3, 5)))))); ---------------- nit: just Not(Contains(QName("label")) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77717/new/ https://reviews.llvm.org/D77717 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits