[all-commits] [llvm/llvm-project] 2178be: [clang] Fix elaborated keyword canonicalization.

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Wed Apr 16 10:34:21 PDT 2025


  Branch: refs/heads/users/mizvekov/dependent-elab-keyword-fixes
  Home:   https://github.com/llvm/llvm-project
  Commit: 2178beeff38e42bf275d26695b5ae79fced08b30
      https://github.com/llvm/llvm-project/commit/2178beeff38e42bf275d26695b5ae79fced08b30
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/AST/TypeLoc.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/Analysis/anonymous-decls.cpp
    M clang/test/SemaTemplate/dependent-template-recover.cpp
    M clang/test/SemaTemplate/elaborated-type-specifier.cpp
    M clang/test/SemaTemplate/typename-specifier-3.cpp

  Log Message:
  -----------
  [clang] Fix elaborated keyword canonicalization.

class and struct keywords are functionally equivalent,
so relying on their equivalence was IFNDR.
This changes it so we treat them as equivalent,
as at least that disallows overloading, which is diagnosable.

This patch also considers a few drive by fixes to preservation
of the presence / abscence of the typename keyword, and improves
a few assertions in that area.

Also improves preservervation of sugar on initializer_list deduction
in order to avoid a few changes in diagnostics.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list