aboutsummaryrefslogtreecommitdiff
path: root/libcpp/charset.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-09-18 14:27:18 -0400
committerPatrick Palka <ppalka@redhat.com>2023-09-18 14:27:18 -0400
commit094091958654bae07a9ad53a63fd69468efcd3e3 (patch)
treee08f4fb0e32ad865bacdd486633db3e594740d6b /libcpp/charset.cc
parent0fb828af75732d39c644fd145c29d41ca14b8cb1 (diff)
downloadgcc-094091958654bae07a9ad53a63fd69468efcd3e3.zip
gcc-094091958654bae07a9ad53a63fd69468efcd3e3.tar.gz
gcc-094091958654bae07a9ad53a63fd69468efcd3e3.tar.bz2
c++: optimize tsubst_template_decl for function templates
r14-2655-g92d1425ca78040 made instantiate_template avoid redundantly performing a specialization lookup when calling tsubst_decl. This patch applies the same optimization to the analagous tsubst_template_decl when (partially) instantiating a function template. This allows us to remove an early exit test from register_specialization since we no longer try to register the FUNCTION_DECL corresponding to a function template partial instantiation. gcc/cp/ChangeLog: * pt.cc (register_specialization): Remove now-unnecessary early exit for FUNCTION_DECL partial instantiation. (tsubst_template_decl): Pass use_spec_table=false to tsubst_function_decl. Set DECL_TI_ARGS of a non-lambda FUNCTION_DECL specialization to the full set of arguments. Simplify register_specialization call accordingly. gcc/testsuite/ChangeLog: * g++.dg/template/nontype12.C: Expect two instead of three duplicate diagnostics for A<double>::bar() specialization.
Diffstat (limited to 'libcpp/charset.cc')
0 files changed, 0 insertions, 0 deletions