[all-commits] [llvm/llvm-project] 7fbc1d: [Clang][Sema] Diagnose unexpanded packs in the tem...

Krystian Stasiowski via All-commits all-commits at lists.llvm.org
Wed Jan 3 11:08:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7fbc1de9896029636dd572a692ee90ba88285943
      https://github.com/llvm/llvm-project/commit/7fbc1de9896029636dd572a692ee90ba88285943
  Author: Krystian Stasiowski <sdkrystian at gmail.com>
  Date:   2024-01-03 (Wed, 03 Jan 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp

  Log Message:
  -----------
  [Clang][Sema] Diagnose unexpanded packs in the template argument lists of function template specializations (#76677)

This diagnoses unexpanded packs in the _unqualified-id_ of a function
template specialization's _declarator-id_. For example:
```cpp
template<typename... Ts>
struct A
{
    template<typename U>
    void f();

    template<>
    void f<Ts>(); // error: explicit specialization contains unexpanded parameter pack 'Ts'
};
```

I moved the handling of template-id's so it happens right after we
determine whether we are declaring a function template/function template
specialization so diagnostics are issued in lexical order.




More information about the All-commits mailing list