[all-commits] [llvm/llvm-project] 3a0309: [clang] Improve diagnostics for expansion length m...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue Aug 30 09:59:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a0309c53674be56b5cfce038d78a0c2c6e2a98c
      https://github.com/llvm/llvm-project/commit/3a0309c53674be56b5cfce038d78a0c2c6e2a98c
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2022-08-30 (Tue, 30 Aug 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaInternal.h
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateVariadic.cpp
    M clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
    M clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
    M clang/test/SemaTemplate/pack-deduction.cpp

  Log Message:
  -----------
  [clang] Improve diagnostics for expansion length mismatch

When checking parameter packs for expansion, instead of basing the diagnostic for
length mismatch for outer parameters only on the known number of expansions,
we should also analyze SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr
for unexpanded packs, so we can emit a diagnostic pointing to a concrete
outer parameter.

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>

Differential Revision: https://reviews.llvm.org/D128095




More information about the All-commits mailing list