Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328532 - Make Suspicious semicolon checker configurable
Summary: Make Suspicious semicolon checker configurable
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-23 14:39 EDT by Sergey Prigogin CLA
Modified: 2010-10-23 21:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 )