Bug 421014 - Private structures sharing same name result in unresolved members
Summary: Private structures sharing same name result in unresolved members
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.2.1   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on: 337583
Blocks:
  Show dependency tree
 
Reported: 2013-11-04 14:37 EST by Elliott Partridge CLA
Modified: 2020-09-04 15:17 EDT (History)
6 users (show)

See Also:


Attachments
Project demonstrating indexer failure to resolve struct member (1.95 KB, application/octet-stream)
2013-11-04 14:37 EST, Elliott Partridge CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Partridge CLA 2013-11-04 14:37:13 EST
Created attachment 237178 [details]
Project demonstrating indexer failure to resolve struct member

It appears that the CDT indexer does not obey the include-tree order when resolving members for structs sharing the same name, included in separate source files. Consider two structs, declared in separate headers, that share the same name but have different members. Two separate source files each include one of these files, respectively, and reference the struct members. This will build fine with gcc, but the CDT indexer will only resolve one of the struct member references.

I have attached an example project that demonstrates this issue.

Also, I am aware that this is not very good coding practice, but I am stuck with dealing with this sort of implementation in a library I am using. It is not feasible to refactor the library source.
Comment 1 Marc-André Laperle CLA 2013-11-05 09:09:17 EST
Looks similar to bug 337583 but Markus's comment makes it sounds hard to fix for classes/structs.