Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327710 - [code analysis] Bad function name incorrectly reported on constructor and destructor
Summary: [code analysis] Bad function name incorrectly reported on constructor and des...
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-13 16:14 EDT by Olexiy Buyanskyy CLA
Modified: 2010-10-17 23:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olexiy Buyanskyy CLA 2010-10-13 16:14:09 EDT
To reproduce bug just create new class for example PrivilegeElevateUid.

Usually name of class has to start from upper case letter. Codan is not smart enough to skip constructor and destructor during validation

So I see impossible to fix info messages:

Bad function name "PrivilegeElevateUid::~PrivilegeElevateUid" (pattern /^[a-z]/)	PrivilegeElevateUid.cpp	/br_REL-101210/src/com/lowes/ss/utility/
procUtils	line 14	Code Analysis Problem
Bad function name "PrivilegeElevateUid::PrivilegeElevateUid" (pattern /^[a-z]/)	PrivilegeElevateUid.cpp	/br_REL-101210/src/com/lowes/ss/utility/procUtils	line 8	Code Analysis Problem
Comment 1 Elena Laskavaia CLA 2010-10-13 22:29:54 EDT
It is not just that, the "function" name it is using contains class name
for some reason, meaning it would mark all the methods
Comment 2 Elena Laskavaia CLA 2010-10-17 20:30:11 EDT
fixed. Also added checker parameter to check for method names (vs c functions only)
Comment 4 Marc-André Laperle CLA 2010-10-17 23:05:54 EDT
In the isFilteredArg javadoc : argumnet -> argument.