[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 21 22:43:45 PDT 2024
================
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd = DC->decls_end();
D != DEnd; ++D) {
+ // Print enum members and public struct fields when
+ // PrintTagTypeContents=true. Only applicable when TerseOutput=true since
+ // otherwise all members are printed.
+ if (Policy.TerseOutput) {
+ assert(Policy.PrintTagTypeContents);
----------------
zyn0217 wrote:
This assertion is doing nothing because we have exited early at the function beginning...?
https://github.com/llvm/llvm-project/pull/89557
More information about the cfe-commits
mailing list