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

Bug 328532

Summary: Make Suspicious semicolon checker configurable
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-codanAssignee: Elena Laskavaia <elaskavaia.cdt>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: All   
Whiteboard:

Description Sergey Prigogin CLA 2010-10-23 14:39:48 EDT
The suspicious semicolon checker has to distinguish

if (condition)
  ;
else
  statement;

case from

if (condition)
  ;

It should be possible to not consider the first case suspicious while still issuing a warning for the second case.

Assertion macros in the googletest framework (http://code.google.com/p/googletest/) are written using the first pattern.
Comment 1 Elena Laskavaia CLA 2010-10-23 20:46:01 EDT
fixed - added parameter to suppress the error in case "if" has "else" (it is not on by default, you have to set it )