Incorrect include files

From FetchWiki

Jump to: navigation, search

Contents

[edit] Status

  • Problem replicated
  • Solution suggested

[edit] Problem description

We handle includes according to relative paths. This can result in include files being allocated to a wrong location, as we don't know which include paths are provided during compilation.

We don't take into account the files list of Source Navigator. It could help us to distinguish between files we know about (= which have been parsed) and those that are external.

[edit] Relevance

Calculations with includes will be wrong in the sense that we can't distinguish between internal and external headers at this moment. This is actually important for dependency analysis.

Example: ...

  1. include <cstdlib>

...

Resulting Include:

(Include FM5
	(includingFile "lanSimulation/tests/LANTests.h")
	(includedFile "lanSimulation/tests/cstdlib")
)

cstdlib is a standard c++ header residing somewhere in a systemwide /usr/include directory.

[edit] Implemented Solution

Use the file table of Source Navigator to map include files to files known to the parsed system (and to distinguish them from external headers)

Personal tools