Closed Bug 410359 Opened 17 years ago Closed 17 years ago

Make dehydra notify about operator new/delete

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: dmandelin)

Details

Attachments

(2 files)

dehydra should give notifications for operator new/delete. Right now the only visible difference between:

A a;
A &a = *new A();

is the fact that it has a type:"A" instead of type:"A &". Neither the dereference operator nor the operator new is reported to dehydra.

Maybe I should file a separate bug about how dehydra doesn't ever seem to see operators?
Attached patch Proposed patchSplinter Review
Here's a patch that I think does the right thing. The output for A &a = *new A() will look like this:

dpm.ii:7: {name:"b", id:2, loc:"dpm.ii:7", type:"A *", isDecl:true, assign:[{name:"operator new", type:"A *", arguments:[{name:"constructor", type:"A &", arguments:[]}]}]}
The patch looks good except for the * handling. In dehydra there is an isDeref flag that should be set on name:"operator new", type:"A *",...} object.

Perhaps you can clean up my isDeref handling so it extends to this case too?
I checked in the patch. isDeref support is harder so that's going to take a little longer.
Status: NEW → ASSIGNED
Attached patch deref patchSplinter Review
This is a further patch that adds a property 'isDeref=true' to the Dehydra variable for e in '*e' when e is represented by exactly one Dehydra variable. (Thus, *(p+5) does not get the isDeref property).
Last patch in. Should be done with basic requirements.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: