[all-commits] [llvm/llvm-project] e7f3e2: Suppress printing template arguments that match de...

Richard Smith via All-commits all-commits at lists.llvm.org
Wed Nov 11 15:08:11 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e7f3e2103cdb567dda4fd52f81bf4bc07179f5a8
      https://github.com/llvm/llvm-project/commit/e7f3e2103cdb567dda4fd52f81bf4bc07179f5a8
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M clang/include/clang/AST/PrettyPrinter.h
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/DeclTemplate.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Frontend/FrontendActions.cpp
    A clang/test/Misc/diag-template.cpp
    M clang/test/SemaCXX/cxx14-compat.cpp
    M clang/test/SemaCXX/generic-selection.cpp
    M clang/test/SemaTemplate/class-template-id.cpp
    M clang/test/SemaTemplate/class-template-spec.cpp
    M clang/test/SemaTemplate/instantiation-default-1.cpp

  Log Message:
  -----------
  Suppress printing template arguments that match default template
arguments of types by default.

This somewhat improves the worst-case printing of types like
std::string, std::vector, etc., where many irrelevant default arguments
can be included in the type as printed if we've lost the type sugar.


  Commit: 5f12f4ff9078455cad9d4806da01f570553a5bf9
      https://github.com/llvm/llvm-project/commit/5f12f4ff9078455cad9d4806da01f570553a5bf9
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M clang/include/clang/AST/PrettyPrinter.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/ASTMatchers/ASTMatchersInternal.cpp
    M clang/lib/CodeGen/CodeGenTypes.cpp
    M clang/test/CXX/dcl.dcl/basic.namespace/namespace.def/p8.cpp
    A clang/test/Misc/diag-inline-namespace.cpp

  Log Message:
  -----------
  Suppress printing of inline namespace names in diagnostics by default,
except where they are necessary to disambiguate the target.

This substantially improves diagnostics from the standard library,
which are otherwise full of `::__1::` noise.


Compare: https://github.com/llvm/llvm-project/compare/686d8a0911de...5f12f4ff9078


More information about the All-commits mailing list