Treehydra: spurious calls to process_type()

RESOLVED WONTFIX

Status

Firefox Build System
Source Code Analysis
RESOLVED WONTFIX
10 years ago
2 months ago

People

(Reporter: jorendorff, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
-- Treehydra script
function process_type(ty) {
  _print(ty.name);
}

-- C++ translation unit
enum Color {blue};
volatile Color x;

--- Expected output
Color

--- Actual output
Color
volatile Color

Updated

10 years ago
Blocks: 437502

Comment 1

10 years ago
why is this spurious? in GCC, type modifiers such as volatile and const are different type objects. You can use .variantOf to get back to the unmodified version if you desire.
(Reporter)

Comment 2

10 years ago
process_type is documented to be called "for each class/struct/enum/union definition".

http://developer.mozilla.org/en/Dehydra_Manual#process_function(decl.2c_body)

Comment 3

10 years ago
The alternative is to have type objects magically appear in function bodies which never went through process_type, which is I think a worse alternative. Can we just change the docs?
(Reporter)

Comment 4

10 years ago
Built-in types like int and float, function types, pointer and reference types, array types, and const-qualified types already appear without going through process_type.

(Types that are instantiations of class templates, and their members that are types, do go through process_type.  I don't care one way or the other about that.)
Dehydra and treehydra are no longer maintained by Mozilla.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX

Updated

2 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.