[all-commits] [llvm/llvm-project] b06156: [clangd] Make our printing policies for Hover more...
    Sam McCall via All-commits 
    all-commits at lists.llvm.org
       
    Fri Dec 18 16:08:43 PST 2020
    
    
  
  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b0615642f647bea1483659f1e14515a836015254
      https://github.com/llvm/llvm-project/commit/b0615642f647bea1483659f1e14515a836015254
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-12-19 (Sat, 19 Dec 2020)
  Changed paths:
    M clang-tools-extra/clangd/Hover.cpp
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
  Log Message:
  -----------
  [clangd] Make our printing policies for Hover more consistent, especially tags
Different cases were using a bunch of different variants of the printing policy.
Each of these had something going for it, but the result was inconsistent.
Goals:
  - single printing policy used (almost) everywhere
  - avoid unidiomatic tags like `class vector<class X>`
  - be informative and easy to understand
For tags, the solution I wound up with is: we print only the outer tag and only
in the simplest cases where this elaboration won't cause confusion.
For example:
 - class X
 - enum Foo
 - vector<int>
 - X*
This seems to strike a nice balance of providing plenty of info/context in common
cases while never being confusing.
Differential Revision: https://reviews.llvm.org/D93553
    
    
More information about the All-commits
mailing list