mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-03 22:04:24 +00:00 
			
		
		
		
	Don't show references (e.g. there are references to classes in constructor positions) in textDocument/documentSymbol
This commit is contained in:
		
							parent
							
								
									b53c41408e
								
							
						
					
					
						commit
						1469723c3c
					
				@ -256,6 +256,9 @@ QueryFile::DefUpdate BuildFileDefUpdate(const IdMap& id_map,
 | 
				
			|||||||
      add_outline(*type.def.extent, id, SymbolKind::Type);
 | 
					      add_outline(*type.def.extent, id, SymbolKind::Type);
 | 
				
			||||||
    for (Use decl : type.declarations) {
 | 
					    for (Use decl : type.declarations) {
 | 
				
			||||||
      add_all_symbols(decl, id, SymbolKind::Type);
 | 
					      add_all_symbols(decl, id, SymbolKind::Type);
 | 
				
			||||||
 | 
					      // Constructor positions have references to the class,
 | 
				
			||||||
 | 
					      // which we do not want to show in textDocument/documentSymbol
 | 
				
			||||||
 | 
					      if (!(decl.role & Role::Reference))
 | 
				
			||||||
        add_outline(decl, id, SymbolKind::Type);
 | 
					        add_outline(decl, id, SymbolKind::Type);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    for (Use use : type.uses)
 | 
					    for (Use use : type.uses)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user