Bug 536846 - False positive error in Codan
Summary: False positive error in Codan
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 9.5.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 11:20 EDT by Jiri Engelthaler CLA
Modified: 2018-07-12 03:33 EDT (History)
2 users (show)

See Also:


Attachments
Sample project (20.53 KB, application/x-zip-compressed)
2018-07-09 11:20 EDT, Jiri Engelthaler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Engelthaler CLA 2018-07-09 11:20:41 EDT
Created attachment 274901 [details]
Sample project

In the attachment there is a small project which illustrates false positive/strange behavior of C/C++ Code Analysis.

Steps to reproduce:
1. Import project to Eclipse
2. Do a C/C++ Code Analysis - no errors reported
3. Rename zzz.cpp to yyy.cpp
4. Do a C/C++ Code Analysis - error reported in rrr.h "Type 'tUUUtype' could not be resolved"

PS: rrr.h doesn't include uuu.h as it should, but that should not mind. It's included in zzz.cpp before rrr.h.
Comment 1 Nathan Ridge CLA 2018-07-12 03:30:30 EDT
Note that rebuilding the project's index after the rename solves the problem.
Comment 2 Nathan Ridge CLA 2018-07-12 03:33:41 EDT
The root cause is likely the same as bug 441752: the incremental index update performed after the rename misses some things that should be updated.