This is an archive of the discontinued LLVM Phabricator instance.

[AST] Use written names instead of `type-param-0-0` in more cases when printing types and decls.
ClosedPublic

Authored by sammccall on Nov 14 2019, 5:25 AM.

Details

Summary

This doesn't cover decls in diagnostics, which use NamedDecl::getNameForDiagnostic().
(That should also be fixed later I think).

This covers some cases of https://github.com/clangd/clangd/issues/76
(hover, but not outline or sighelp)

Diff Detail

Event Timeline

sammccall created this revision.Nov 14 2019, 5:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2019, 5:25 AM

Build result: pass - 60015 tests passed, 0 failed and 722 were skipped.
Log files: console-log.txt, CMakeCache.txt

hokein added inline comments.Nov 14 2019, 7:44 AM
clang/lib/AST/DeclPrinter.cpp
642

so here, do we need to respect the SubPolicy.PrintCanonicalTypes ?

1101

nit: we can inline A, just Args[I].print(...).

1112

the same here.

sammccall updated this revision to Diff 229317.Nov 14 2019, 8:31 AM
sammccall marked 3 inline comments as done.

address comments

Build result: pass - 60015 tests passed, 0 failed and 722 were skipped.
Log files: console-log.txt, CMakeCache.txt

hokein accepted this revision.Nov 15 2019, 1:04 AM
This revision is now accepted and ready to land.Nov 15 2019, 1:04 AM
This revision was automatically updated to reflect the committed changes.