[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-02-02 Thread kadir çetinkaya via cfe-commits
@@ -138,15 +138,9 @@ std::string getNamespaceScope(const Decl *D) { std::string printDefinition(const Decl *D, PrintingPolicy PP, const syntax::TokenBuffer ) { - if (auto *VD = llvm::dyn_cast(D)) { -if (auto *IE = VD->getInit()) { - //

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread Raoul Wols via cfe-commits
@@ -138,15 +138,9 @@ std::string getNamespaceScope(const Decl *D) { std::string printDefinition(const Decl *D, PrintingPolicy PP, const syntax::TokenBuffer ) { - if (auto *VD = llvm::dyn_cast(D)) { -if (auto *IE = VD->getInit()) { - //

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread Raoul Wols via cfe-commits
@@ -1720,6 +1720,12 @@ void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { OS << "{"; for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { if (i) OS << ", "; +// TODO: There is duplicated functionality in APValue::printPretty. +// Would be good to

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
@@ -1720,6 +1720,12 @@ void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { OS << "{"; for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { if (i) OS << ", "; +// TODO: There is duplicated functionality in APValue::printPretty. +// Would be good to

[clang-tools-extra] [clang] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-01-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/79746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits