Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: llvm/llvm-project
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: llvm/llvm-project
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: users/mizvekov/remove-template-arg-defaulted
Choose a head ref
  • 1 commit
  • 22 files changed
  • 1 contributor

Commits on Aug 23, 2025

  1. [clang] remove isDefaulted bit from TemplateArgument

    The IsDefaulted bit being part of a canonical TemplateArgument
    doesn't make sense, as that information is not information a
    canonical type should have.
    
    In C++, all template specialization types for ther same template
    are the same if the full list of template arguments is the same,
    an argument being defaulted or not doesn't matter.
    
    Moreover, this information is already available in the sugared
    template specialization type, in the sense that, taking the as-written
    list and matching it up to the template parameters, any parameters which
    are left without a corresponding template argument must have been defaulted.
    
    This patch besides removing that bit, changes the current DebugInfo users to derive
    that information from the as-written argument list. And it goes a little beyond
    that by wiring up the actual sugared TemplateArguments, so the Debug Info
    produced is also richer.
    
    This patch is a performance improvement, as the TemplateArgument is one of the
    hottest data structures for C++ compilation:
    
    The small regression on `-O0 -g` test is explained by the increased amount of
    debug info generated.
    mizvekov committed Aug 23, 2025
    Configuration menu
    Copy the full SHA
    e1c4ead View commit details
    Browse the repository at this point in the history
Loading