This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG55b702c37b7e: [clangd] NFC, emit source ranges in selection debug messages. (authored by hokein).
Changed prior to commit: https://reviews.llvm.org/D117475?vs=401219&id=401226#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117475/new/ https://reviews.llvm.org/D117475 Files: clang-tools-extra/clangd/Selection.cpp Index: clang-tools-extra/clangd/Selection.cpp =================================================================== --- clang-tools-extra/clangd/Selection.cpp +++ clang-tools-extra/clangd/Selection.cpp @@ -548,7 +548,6 @@ std::string S; llvm::raw_string_ostream OS(S); printNodeKind(OS, N); - OS << " "; return std::move(OS.str()); } #endif @@ -778,8 +777,8 @@ [](const Attr *A) { return !A->isImplicit(); })) return false; if (!SelChecker.mayHit(S)) { - dlog("{1}skip: {0}", printNodeToString(N, PrintPolicy), indent()); - dlog("{1}skipped range = {0}", S.printToString(SM), indent(1)); + dlog("{2}skip: {0} {1}", printNodeToString(N, PrintPolicy), + S.printToString(SM), indent()); return true; } return false; @@ -798,7 +797,8 @@ // Performs early hit detection for some nodes (on the earlySourceRange). void push(DynTypedNode Node) { SourceRange Early = earlySourceRange(Node); - dlog("{1}push: {0}", printNodeToString(Node, PrintPolicy), indent()); + dlog("{2}push: {0} {1}", printNodeToString(Node, PrintPolicy), + Node.getSourceRange().printToString(SM), indent()); Nodes.emplace_back(); Nodes.back().ASTNode = std::move(Node); Nodes.back().Parent = Stack.top();
Index: clang-tools-extra/clangd/Selection.cpp =================================================================== --- clang-tools-extra/clangd/Selection.cpp +++ clang-tools-extra/clangd/Selection.cpp @@ -548,7 +548,6 @@ std::string S; llvm::raw_string_ostream OS(S); printNodeKind(OS, N); - OS << " "; return std::move(OS.str()); } #endif @@ -778,8 +777,8 @@ [](const Attr *A) { return !A->isImplicit(); })) return false; if (!SelChecker.mayHit(S)) { - dlog("{1}skip: {0}", printNodeToString(N, PrintPolicy), indent()); - dlog("{1}skipped range = {0}", S.printToString(SM), indent(1)); + dlog("{2}skip: {0} {1}", printNodeToString(N, PrintPolicy), + S.printToString(SM), indent()); return true; } return false; @@ -798,7 +797,8 @@ // Performs early hit detection for some nodes (on the earlySourceRange). void push(DynTypedNode Node) { SourceRange Early = earlySourceRange(Node); - dlog("{1}push: {0}", printNodeToString(Node, PrintPolicy), indent()); + dlog("{2}push: {0} {1}", printNodeToString(Node, PrintPolicy), + Node.getSourceRange().printToString(SM), indent()); Nodes.emplace_back(); Nodes.back().ASTNode = std::move(Node); Nodes.back().Parent = Stack.top();
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits