Semantic parses function with default argument incorrectly
Bastian Beischer <[email protected]> Tue, 30 Aug 2016 23:40:01 +0200
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CAK9AuB-Tzt8buNwGBWe6GCOtDBC65dDuU_XpLXL1dnh5uvYixA@mail.gmail.com> |
The following piece of code is not correctly parsed by semantic:
namespace NS {
enum TestEnum {a,b};
}
void f(NS::TestEnum v = NS::a);
This is with the current master branch of http://git.code.sf.net/p/cedet/git.
The issue is that after parsing the buffer 'semantic-describe-tag' on
the function 'f' reports:
Functions: void f (NS::TestEnum v[=NS],a)
"a" is interpreted as a second argument which is not correct. The
version of semantic included in Emacs 25.1 RC 2 does not show this
behavior. Instead it reports:
Functions: void f (NS::TestEnum v[=NS])
which is also not correct, it should report the default value as NS::a.
I think the grammar needs tweaking? Any help on how to fix this?
Cheers
Bastian
--
Bastian Beischer
RWTH Aachen University of Technology
@RWTH Aachen
Office: 28 C 203
Phone: +49-241-80-27205
E-mail: [email protected]
Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen
@CERN
Office: Bdg 32-4-B12
Phone: +41-22-76-75750
E-mail: [email protected]
Address: CERN, CH-1211 Geneve 23
------------------------------------------------------------------------------