- 
 
 - 
  Notifications
 
You must be signed in to change notification settings  - Fork 75
 
Open
@jmkinzer 
 
 
 
 
 
Description
Hi,
There is an issue with how CppElement.Span is assigned in the case of headers containing forward declarations. The problem is that (in at least in some situations) the span will point to the forward declaration and not the real definition. The issue I believe lies here:
CppAst.NET/src/CppAst/CppModelBuilder.cs
Line 437 in 0fd2f5e
 
  bool isForwardDeclaration = (element is CppClass || element is CppEnum) && !cursor.IsDefinition; 
 
 
 Where cursor.IsDefinition does not always yield the result we want. I was able to get the correct behavior using this instead: