Menu

#632 nl_func_type_name + access spec + destructors

Future
works-for-me
C++ (17)
5
2016-03-22
2015-02-15
No

When using nl_func_type_name=remove I have this:

class TestClass
{
public:
~TestClass();
};

Turned into this:

class TestClass
{
public: ~TestClass();
};

I tried the same with constructors. In the most recent code (0.61, commit 0f4fdaa), constructors do NOT show the same problem. But if I go back as far a 0.56, constructors show the same problem. I found that commit 9a25a81 is what fixed this for constructors, but not (apparently) for destructors. I don't know the codebase, but I hope this make it easy for you to extend to destructors.

This is very likely related to ticket #380. Both seem to hinge on uncrustify expecting constructors/destructors to have return types. I opted not to make this a comment on the existing #380 because it is closed, and a previous comment had gone unack'ed.

For some reason, UniversalIndentGui 1.2.0 (which uses it's own uncrustify copy rather than my independent uncrustify install? 0.59?) doesn't seem to show this. Which is very confusing. Maybe I'm just making a mistake there.

Discussion

  • Guy Maurel

    Guy Maurel - 2016-02-16

    Version 0.62 at
    https://github.com/gmaurel/uncrustify4Qt

    works pretty.

     
  • Guy Maurel

    Guy Maurel - 2016-03-22
    • status: open --> works-for-me
    • assigned_to: Guy Maurel