Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341089 - Codan does not handle missing functions in macros correctly
Summary: Codan does not handle missing functions in macros correctly
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: Emanuel Graf CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 08:18 EDT by Thomas Kallenberg CLA
Modified: 2011-04-06 04:33 EDT (History)
3 users (show)

See Also:


Attachments
patch to support correct reporting of missing functions in macro (4.40 KB, patch)
2011-03-28 08:18 EDT, Thomas Kallenberg CLA
no flags Details | Diff
Patch for clean marker message in case of macros (6.57 KB, patch)
2011-04-05 11:31 EDT, Martin Schwab CLA
emanuel: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kallenberg CLA 2011-03-28 08:18:57 EDT
Created attachment 191996 [details]
patch to support correct reporting of missing functions in macro

Hi, 

Codan does not return the correct name and position of a missing function, if the call is made from a macro like:

#define MACRO(f) f()

int function()
{
 MACRO(doesnotexist());
}

Codan would report the whole line as a problem. However, the correct information is needed to create a non existing function.

Thank you very much for looking into this.

cheers, Thomas
Comment 1 Martin Schwab CLA 2011-04-05 11:31:44 EDT
Created attachment 192569 [details]
Patch for clean marker message in case of macros

We've cleaned up the patch, made it work with current HEAD, tested it with Codan's AutomatedIntegrationSuite

Premium advantages:
* add only 7 lines of code to your code base
* These 7 lines are compensated with 10 lines of tests
* You can only win if you have a look at this patch :-)
Comment 3 Emanuel Graf CLA 2011-04-06 04:33:08 EDT
Fixed in HEAD >20110406