Closed
Bug 442968
Opened 17 years ago
Closed 17 years ago
Format outparams messages in the standard way
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.1a1
People
(Reporter: benjamin, Assigned: benjamin)
Details
Attachments
(2 files, 1 obsolete file)
4.57 KB,
patch
|
dmandelin
:
review+
|
Details | Diff | Splinter Review |
2.15 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
The current outparams warnings are multiline and those lines are indented. This makes it easier to read in some cases, but tools such as compile-mode don't linkify the message correctly. This patch uses the standard GCC formatting so that locations are parsed correctly. It also gets rid of the bogus location reported at the beginning of the warning message.
Attachment #327622 -
Flags: review?(dmandelin)
Assignee | ||
Comment 1•17 years ago
|
||
Oh, the resulting output looks like this:
../../../../src/xpcom/proxy/tests/proxy-create-threadsafety.cpp: In member function ‘virtual nsresult ProxyTest::Test(PRInt32, PRInt32, PRInt32*)’:
../../../../src/xpcom/proxy/tests/proxy-create-threadsafety.cpp:147: warning: outparam '_retval' not written on NS_SUCCEEDED(return value)
../../../../src/xpcom/proxy/tests/proxy-create-threadsafety.cpp:121: outparam declared here
Assignee | ||
Comment 2•17 years ago
|
||
And the commented-out code was an attempt to get the location of the un-annotated function call. It isn't working because the ss.getBlame(v) isn't a call expression, it's a GIMPLE_MODIFY_STMT. I'm guessing the CALL_EXPR was nested in the gimple statement, but I didn't follow up.
Updated•17 years ago
|
Attachment #327622 -
Flags: review?(dmandelin) → review+
Comment 3•17 years ago
|
||
(In reply to comment #2)
> And the commented-out code was an attempt to get the location of the
> un-annotated function call. It isn't working because the ss.getBlame(v) isn't a
> call expression, it's a GIMPLE_MODIFY_STMT. I'm guessing the CALL_EXPR was
> nested in the gimple statement, but I didn't follow up.
If 'isn' is a GIMPLE_MODIFY_STMT that contains a call, then isn.operands()[1] is a CALL_EXPR. I assume you're trying to get the location of the decl from that then?
Assignee | ||
Comment 4•17 years ago
|
||
This adds maybewritten declaration goodness.
Attachment #327622 -
Attachment is obsolete: true
Attachment #327632 -
Flags: review?(dmandelin)
Updated•17 years ago
|
Attachment #327632 -
Flags: review?(dmandelin) → review+
Assignee | ||
Comment 5•17 years ago
|
||
Pushed, revision ad4228bbd961
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
Comment 6•17 years ago
|
||
The original patch broke the test case e13.cpp, because that method returns void, so this.retvar is void, so ss.getBlame(this.retvar) fails. Here is a fix. The error message is still a little funny because it returns to NS_SUCCEEDED(return value) instead of noting that the return value is void, so the method is assumed to always succeed.
Attachment #327706 -
Flags: review?
Updated•17 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•17 years ago
|
Attachment #327706 -
Flags: review? → review?(benjamin)
Assignee | ||
Updated•17 years ago
|
Attachment #327706 -
Flags: review?(benjamin) → review+
Comment 7•17 years ago
|
||
Pushed.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 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
•