DescriptionThis patch propagates the source location from a template function's definition to any already-instantiated declarations. It doesn't also copy it to the template_decl, even though that also has the wrong location, because maybe that's supposed to represent the declaration and not the definition.
PR c++/46527
* gcc/cp/pt.c (instantiate_decl): Propagate the
template's location to its instance.
* gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C: New.
Patch Set 1 #Patch Set 2 : Now with a test #
Total comments: 1
Patch Set 3 : Add a space #Patch Set 4 : Update the template_decl's location too. #
MessagesTotal messages: 1
|