aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ModuleDependencyCollector.cpp
diff options
context:
space:
mode:
authorKrystian Stasiowski <sdkrystian@gmail.com>2024-02-08 13:04:10 -0500
committerGitHub <noreply@github.com>2024-02-08 13:04:10 -0500
commit17f0680f69f44d340fd0205f7763b2830357c0d5 (patch)
treef7f558036771a61de7beb390445296bed8137094 /clang/lib/Frontend/ModuleDependencyCollector.cpp
parentabc4f74df7ab3b324b7bf9d171e8a22a92d7dda5 (diff)
downloadllvm-17f0680f69f44d340fd0205f7763b2830357c0d5.zip
llvm-17f0680f69f44d340fd0205f7763b2830357c0d5.tar.gz
llvm-17f0680f69f44d340fd0205f7763b2830357c0d5.tar.bz2
[Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (#80864)
According to [dcl.fct] p23: > An abbreviated function template can have a _template-head_. The invented _template-parameters_ are appended to the _template-parameter-list_ after the explicitly declared _template-parameters_. `template<>` is not a _template-head_ -- a _template-head_ must have at least one _template-parameter_. This patch corrects our current behavior of appending the invented template parameters to the innermost template parameter list, regardless of whether it is empty. Example: ``` template<typename T> struct A { void f(auto); }; template<> void A<int>::f(auto); // ok template<> template<> // warning: extraneous template parameter list in template specialization void A<int>::f(auto); ```
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions