Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337677

Summary: Warning about "void" in late-specified return type
Product: [Tools] CDT Reporter: Nathan Ridge <zeratul976>
Component: cdt-codanAssignee: Marc-André Laperle <malaperle>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
ReturnChecker Late-Specified void return patch
none
ReturnChecker Late-Specified void return patch malaperle: iplog-, malaperle: review?

Description Nathan Ridge CLA 2011-02-20 20:57:04 EST
When a "void" return type is specified using the C++0x late-specified return type, CDT gives a warning:

auto f() -> void  // WARNING: No return, in function returning non-void
{
}

Since this code is equivalent to

void f()
{
}

there should be no warning.
Comment 1 Marc-André Laperle CLA 2011-02-21 04:06:33 EST
Created attachment 189396 [details]
ReturnChecker Late-Specified void return patch

Patch + tests
Comment 2 Marc-André Laperle CLA 2011-03-02 21:34:08 EST
Created attachment 190225 [details]
ReturnChecker Late-Specified void return patch

Updated patch against HEAD.
Comment 3 Marc-André Laperle CLA 2011-03-08 01:48:07 EST
Comment on attachment 190225 [details]
ReturnChecker Late-Specified void return patch

Alena, does this patch look good to you?
Comment 4 Marc-André Laperle CLA 2011-03-11 00:30:49 EST
Fixed in HEAD.