mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Workaround for issue#32
PiperOrigin-RevId: 321154163 Change-Id: Ida6defa3d5586b39e69e958524cee7579085826f
This commit is contained in:
parent
b7d137721a
commit
405cc00683
|
@ -578,6 +578,13 @@ class _TranslationUnit(object):
|
||||||
# TODO(szwl): for d in translation_unit.diagnostics:, handle that
|
# TODO(szwl): for d in translation_unit.diagnostics:, handle that
|
||||||
|
|
||||||
for i, cursor in enumerate(self._walk_preorder()):
|
for i, cursor in enumerate(self._walk_preorder()):
|
||||||
|
# Workaround for issue#32
|
||||||
|
try:
|
||||||
|
cursor.kind
|
||||||
|
except ValueError:
|
||||||
|
if cursor._kind_id >= 440: # pylint: disable=protected-access
|
||||||
|
continue
|
||||||
|
raise
|
||||||
# naive way to order types: they should be ordered when walking the tree
|
# naive way to order types: they should be ordered when walking the tree
|
||||||
if cursor.kind.is_declaration():
|
if cursor.kind.is_declaration():
|
||||||
self.order[cursor.hash] = i
|
self.order[cursor.hash] = i
|
||||||
|
|
Loading…
Reference in New Issue
Block a user