Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365477 - Code Analysis reports non existing problems.
Summary: Code Analysis reports non existing problems.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 15:02 EST by Ventsy CLA
Modified: 2020-09-04 15:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ventsy CLA 2011-12-02 15:02:58 EST
Build Identifier: 20110916-0149

Code compiles OK from command line, but hundreds of Code Analysis problems are reported by Eclipse. This happens occasionally, but I'm not sure what's causing it.

Reproducible: Didn't try

Steps to Reproduce:
1. Import a C++ project from existing code with a makefile
2. Code might compile fine both in Eclipse and under command line. Code is under version control
3. Unknown event occurs (try compiling different projects assigned to their own sets, switching between sets etc)
4. Code still compiles from command line, but in Eclipse, hundreds of code analysis errors will be shown.
Doing a clean build does not help either. Rebuilding the index, followed by a clean build seems to fix it.
Comment 1 Ventsy CLA 2011-12-02 15:07:12 EST
Actually, opening a source file after a build (and re-indexing) would cause the code analysis errors to come back.
Comment 2 Ventsy CLA 2011-12-08 11:22:02 EST
After some investigating, I found out that Eclipse "forgot" the include paths (such as /usr/include etc). Deleting the project and importing it again using the "From existing code with make file" wizard did not fix the problem. 
I think the wizard should parse the make file and extract all -I -i paths and import them in the project. 

Manually adding the folders in the project and rebuilding the index still resulted in errors.
Comment 3 Markus Schorn CLA 2011-12-22 05:45:30 EST
Most likely the compiler inspection did not work. Try to configure it in the project properties under 'C/C++ Build - Discovery options'.