#36 Initialization of data in constructors parsed incorrectly

closed-fixed
nobody
None
5
2012-06-16
2012-06-15
Anonymous
No

First:
Thank you for a tool we have long been looking for!

Report:
When constructors include initialization of data they interfere with the argument parsing.

The following two header files are not parsed correctly:

Edge.h:
Breaks the parsing.

Reproduce by:
from CppHeaderParser import CppHeader
CppHeader("Edge.h")

BasisFunction.h"
Here the arguments (parameters) to the first method is not parsed correct.

Reproduce by:
from CppHeaderParser import CppHeader
print len(CppHeader("BasisFunction.h").classes["BasisFunction"].get_all_methods()[0]["parameters"])

It should return 3 but returns 5. The signature to BasisFunction is:
BasisFunction(uint index, const FiniteElement& element, const ufc::cell& cell)
: index(index), element(element), cell(cell)

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-15

    File to reproduce bug

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-15

    I was not able to upload Edge.h, but here is a minimal version reproducing the bug:

    Edge.h:

    class Edge : public MeshEntity
    {
    public:
    Edge(MeshEntity& entity) : MeshEntity(entity.mesh(), 1, entity.index()) {}
    };

     
  • Jashua Cloutier

    Jashua Cloutier - 2012-06-15

    Thank you for your kind words.

    Can you try to link Edge.h again or link to an external instance (web repository etc)? I need to gain a little more context for Edge.h to better understand what is going on even though your snippet reproduces the error.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-15

    Thanks for the fast reply:

    Here is a link to the actuall file:

    http://bazaar.launchpad.net/~dolfin-core/dolfin/trunk/view/head:/dolfin/mesh/Edge.h

     
  • Jashua Cloutier

    Jashua Cloutier - 2012-06-16
    • status: open --> closed-fixed
     
  • Jashua Cloutier

    Jashua Cloutier - 2012-06-16

    Resolved in commit 81:6444d4cb2c19

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks