Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator> causes IndexError exception #1

Open
GoogleCodeExporter opened this issue Mar 11, 2016 · 0 comments
Open

operator> causes IndexError exception #1

GoogleCodeExporter opened this issue Mar 11, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

What steps will reproduce the problem?
1. have an operator> defined
2. Run find_warnings.py

What is the expected output? What do you see instead?
Parses stuff. Actually crashes, here is the error:
{{{
Processing test.h
Got exception in test.h @ Token('bool', 27, 31) []
Got exception in test.h @ Token('class', 0, 5) []
Traceback (most recent call last):
  File "/home/rich/src/cppclean-read-only/headers/cpp/find_warnings.py",
line 495, in <module>
    main(sys.argv)
  File "/home/rich/src/cppclean-read-only/headers/cpp/find_warnings.py",
line 488, in main
    entire_ast = list(filter(None, builder.Generate()))
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 719, in
Generate
    result = self._GenerateOne(token)
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 742, in
_GenerateOne
    return method()
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 1445,
in handle_class
    return self._GetClass(Class, VISIBILITY_PRIVATE, None)
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 1521,
in _GetClass
    body = list(ast.Generate())
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 719, in
Generate
    result = self._GenerateOne(token)
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 804, in
_GenerateOne
    return self._GetMethod(temp_tokens, 0, None, False)
  File "/home/rich/src/cppclean-read-only/headers/cpp/ast.py", line 976, in
_GetMethod
    while return_type_and_name[index].name != '<':
IndexError: list index out of range
}}}

What version of the product are you using? On what operating system?
svn version, r279

Please provide any additional information below.
Attached a minimal example.

Original issue reported on code.google.com by richard.quirk on 27 Dec 2008 at 8:30

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant