Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350123 - Codan doesn't understand typedefed structure
Summary: Codan doesn't understand typedefed structure
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-23 06:06 EDT by Šimon Tóth CLA
Modified: 2013-09-13 11:01 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Šimon Tóth CLA 2011-06-23 06:06:18 EDT
Build Identifier: 201106081058

Test case:

/* header.h */
struct x { int a; };
typedef struct x x;

/* impl.c */
#include "header.h"
int main()
{
  x i;
}

Codan reports "Type 'x' could not be resolved"

Reproducible: Always

Steps to Reproduce:
1. analyse use case
2. watch the result
Comment 1 Marc-André Laperle CLA 2011-06-25 03:16:07 EDT
Works for me. Try typing in impl.c so that codan re-runs. Maybe codan ran before the indexer was done with header.h?
Comment 2 Šimon Tóth CLA 2011-07-12 12:21:45 EDT
(In reply to comment #1)
> Works for me. Try typing in impl.c so that codan re-runs. Maybe codan ran
> before the indexer was done with header.h?

You are right, it seems to be an indexing problem. I managed the reindex on the example, but my large code base is still suffering from this issue.
Comment 3 Nathan Ridge CLA 2013-08-24 15:15:44 EDT
There have been many improvements to the indexer since the time this bug was reported.

Šimon, do you still have this problem?
Comment 4 Šimon Tóth CLA 2013-09-13 10:55:27 EDT
It turned out to be an issue with the indexer.

-- 
Simon Toth
Comment 5 Nathan Ridge CLA 2013-09-13 10:58:06 EDT
(In reply to Šimon Tóth from comment #4)
> It turned out to be an issue with the indexer.

If you're no longer seeing this issue, could you please close the bug? Thanks!
Comment 6 Šimon Tóth CLA 2013-09-13 11:01:40 EDT
Problem was in a different component.