Bug 328392 - Errors in non-self-contained header files go away if opened in editor
Summary: Errors in non-self-contained header files go away if opened in editor
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-21 14:20 EDT by Jens Elmenthaler CLA
Modified: 2013-08-24 18:01 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Elmenthaler CLA 2010-10-21 14:20:34 EDT
Build Identifier: HEAD

Create files with the following content:

// workorder.hpp
Workorder doSomething();

// workorder.cpp
class Workorder {

};

#include "workorder.hpp"

Run the code analysis on the containing project. An error in workorder.hpp is reported, saying Workorder cannot be resolved.

In the problems view, double-click the error. An editor opens, an now the error vanishes.

One could argue whether there should be an error reported or not, after all every compiler will accept the code. Nevertheless, header files that are not self-contained should be considered very bad style. So I would prefer that those problems are consistently reported as errors.


Reproducible: Always
Comment 1 Nathan Ridge CLA 2013-08-24 18:01:04 EDT
I don't even see the error initially.