Closed
Bug 511112
Opened 15 years ago
Closed 11 years ago
process_type() not receiving template instantiations
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dnovillo, Assigned: taras.mozilla)
Details
Given # 1 "test.cc" # 1 "<built-in>" # 1 "<command-line>" # 1 "test.cc" template<typename FOO> class MyTemplateClass { public: MyTemplateClass(FOO a) { a_ = a; } FOO a() { return a_; } private: FOO a_; }; # 20 "test.cc" template<> class MyTemplateClass<int>; and the dehydra script: function process_type(t) { print("Type found: " + t.name + " location: " + t.loc); } I would expect to see two types printed, but only the template type is received by 't'. The specialization is not seen. Type found: MyTemplateClass<FOO> location: test.cc:4:23 If I add a process_decl() callback, I can access the specialized type via the decl, but I was expecting to see the type in process_type as well. Bug or feature?
Comment 1•15 years ago
|
||
The template hasn't actually been instantiated, has it? Do you get the process_type call if you then use MyTemplateClass<int> in a function?
Reporter | ||
Comment 2•15 years ago
|
||
Right, there is no instantiation for the template. It's just the forward declaration for the class specialization. We'd still need to intercept it to analyze the arguments. Doing it in process_type() seemed the more natural place. If I specialize the template declaring a variable, process_type() will see it, of course.
Comment 3•15 years ago
|
||
Yeah, I don't think GCC gives us the type callback until it is instantiated... either way is fine with me if there's a way to make GCC behave.
Assignee | ||
Comment 4•15 years ago
|
||
Yeah, process_type is basically more or less what gcc gives us. I'll accept a patch for this.
Comment 5•11 years ago
|
||
Dehydra and treehydra are no longer maintained by Mozilla.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•