[all-commits] [llvm/llvm-project] a07abe: Factor out helper to determine whether a function ...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Mar 30 17:00:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a07abe27b4d1d39ebb940a7f4e6235302444cbf0
      https://github.com/llvm/llvm-project/commit/a07abe27b4d1d39ebb940a7f4e6235302444cbf0
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/Decl.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/Decl.cpp
    M clang/lib/Sema/SemaOverload.cpp
    A clang/test/Modules/merge-constrained-friends.cpp

  Log Message:
  -----------
  Factor out helper to determine whether a function is a "member-like
constrained friend".

When a friend declaration has a requires-clause, and either it's a
non-template function or it's a function template whose requires-clause
depends on an enclosing template parameter, it is member-like for the
purpose of redeclaration checking. Specifically, the lexically enclosing
class becomes part of its signature, so it can only be redeclared by
another declaration within the same class. In this change, we call such
functions "member-like constrained friends".

No functional change intended.


  Commit: e3cba2f464d318213ba05361e635e9b3b862e174
      https://github.com/llvm/llvm-project/commit/e3cba2f464d318213ba05361e635e9b3b862e174
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/include/clang/AST/DeclTemplate.h
    M clang/lib/AST/DeclTemplate.cpp

  Log Message:
  -----------
  Clean up template parameter list profiling. No functionality change.


  Commit: fe73233b3a8b7b9dbb457419b494200503ffd34a
      https://github.com/llvm/llvm-project/commit/fe73233b3a8b7b9dbb457419b494200503ffd34a
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp

  Log Message:
  -----------
  Convert boolean flag in TemplateParameterListsAreEqual into an
additional enum value and document its meaning.

No functionality change intended.


  Commit: bc62fb9e1779043ba4ffa75bb2133cc670d4105c
      https://github.com/llvm/llvm-project/commit/bc62fb9e1779043ba4ffa75bb2133cc670d4105c
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/ASTContext.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p6.cpp

  Log Message:
  -----------
  Ignore constraints when determining a canonical template parameter.

This follows C++ [temp.over.link]/6, which says that constraints are not
part of what determines whether two template parameters are equivalent.
This allows templates that have different constraints on nested template
template parameters to be ordered by their constraints.


  Commit: 3524a9f84a0a1a106aa649a775066ba4d9e8ae0d
      https://github.com/llvm/llvm-project/commit/3524a9f84a0a1a106aa649a775066ba4d9e8ae0d
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/TemplateBase.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp

  Log Message:
  -----------
  Retain constraints in the canonical form of an auto type.

This is necessary in order for type equality checking, for example
across redeclarations, to require constraints to match. This is also a
prerequisite for including the constraints in manglings.

In passing, fix a bug where TemplateArgument::Profile would produce the
same profile for two structurally different template names, which caused
this change to re-expose the crash previously addressed by D133072,
which it turns out had not quite addressed all problematic cases.


Compare: https://github.com/llvm/llvm-project/compare/96a7e057567d...3524a9f84a0a


More information about the All-commits mailing list