Index: clang-tools-extra/trunk/clangd/XRefs.cpp =================================================================== --- clang-tools-extra/trunk/clangd/XRefs.cpp +++ clang-tools-extra/trunk/clangd/XRefs.cpp @@ -187,6 +187,11 @@ // experssion is impossible to write down. if (const auto *CtorExpr = dyn_cast(E)) return CtorExpr->getParenOrBraceRange().isInvalid(); + // Ignore implicit conversion-operator AST node. + if (const auto *ME = dyn_cast(E)) { + if (isa(ME->getMemberDecl())) + return ME->getMemberLoc().isInvalid(); + } return isa(E); }; Index: clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp =================================================================== --- clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp +++ clang-tools-extra/trunk/clangd/unittests/XRefsTests.cpp @@ -2069,6 +2069,18 @@ using ::[[fo^o]]; } )cpp", + + R"cpp( + struct X { + operator bool(); + }; + + int test() { + X [[a]]; + [[a]].operator bool(); + if ([[a^]]) {} // ignore implicit conversion-operator AST node + } + )cpp", }; for (const char *Test : Tests) { Annotations T(Test);