ervandew/eclim — pull request #158 by daminetreg (2012-09-27 21:01:39+00:00)
Title: Patch for Issue #156 to fix inappropriate Semantic Errors when validating nested struct definitions.

This patch fixes the issue https://github.com/ervandew/eclim/issues/156

We first closed the issue believing that the bug was caused by erroneous project files, but in fact the error comes from the C/C++ indexer.

Indeed as soon as headers containing classes/struct with nested classes/structs declarations get indexed and that implementation file defines these nested structs (e.g. pimpl idiom), eclim begins to gather errors, telling that the nested struct isn't defined because the Translation Unit AST that eclim uses for the validation skips the indexed headers (See https://github.com/ervandew/eclim/issues/156 for an example).

Without this patch the situation results in vim in errors like : `Attempt to use symbol failed: impl`, which are inappropriate because the declaration of the nested structs are included and are completely correct.

As I told in my issue comment : https://github.com/ervandew/eclim/issues/156#issuecomment-8953543 , it's possible that this is not the best way to fix the error, and that this is more a workaround than a fix, because I don't know well the AST, but so far this solution works pretty well for me and solved the issue, without changing the error reporting behaviour.