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

Bug 327710

Summary: [code analysis] Bad function name incorrectly reported on constructor and destructor
Product: [Tools] CDT Reporter: Olexiy Buyanskyy <olexiyb>
Component: cdt-codanAssignee: Elena Laskavaia <elaskavaia.cdt>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: All   
Whiteboard:

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.