Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344972 - Finding References from a header used by C and C++ searches only one language
Summary: Finding References from a header used by C and C++ searches only one language
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 10:20 EDT by Tenggui Fu CLA
Modified: 2020-09-04 15:24 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 Tenggui Fu CLA 2011-05-06 10:20:39 EDT
Build Identifier: 20110505-1223

Finding references(CTRL+SHIFT+G) doesn't work properly if the C++ project contains both C and C++ source files. There are several issues as follows:
1. If find the references of a variable in a structure in C source files, there are only the references of C source files could be shown
   in the "Search" window. And if find in C++ source files, there are only the references of C++ source files could be shown. 
2. If find the references of a variable in a structure in the header file in which the structure is defined, there are only the references 
   of either C source files or C++ source files could be shown in the "Search" window, which depends on the indexer type of the header files,
   indexing as C or indexing as C++.

There is a simple solution to this bug that the CDT shall search the references in both C and C++ files when the user call the command of 
Finding References(Press CTRL+SHIFT+G).

Reproducible: Always

Steps to Reproduce:
1. Create a C++ project and add at least a header file, a C source file and a C++ source file
2. Define a structure in a header file and include the header file in both C source files and C++ files
3. Reference the variables of the structure in C source files and C++ source files
4. Find references of the variables in C source files, C++ source files and the header file in which the structure is defined respectively.
5. View the differences of the reference finding results in "Search" window among the three ways of finding references