Merge pull request #2163 from jakobandersen/master

C++, parallel build fix
This commit is contained in:
Jakob Lykke Andersen 2015-12-14 16:17:04 +01:00
commit d044268d60

View File

@ -2268,11 +2268,19 @@ class Symbol(object):
self._assert_invariants() self._assert_invariants()
def clear_doc(self, docname): def clear_doc(self, docname):
newChildren = []
for sChild in self.children: for sChild in self.children:
sChild.clear_doc(docname) sChild.clear_doc(docname)
if sChild.declaration and sChild.docname == docname: if sChild.declaration and sChild.docname == docname:
sChild.declaration = None sChild.declaration = None
sChild.docname = None sChild.docname = None
# Just remove operators, because there is no identification if
# they got removed.
# Don't remove other symbols because they may be used in namespace
# directives.
if sChild.identifier or sChild.declaration:
newChildren.append(sChild)
self.children = newChildren
def get_all_symbols(self): def get_all_symbols(self):
yield self yield self
@ -2442,8 +2450,10 @@ class Symbol(object):
for otherChild in other.children: for otherChild in other.children:
if not otherChild.identifier: if not otherChild.identifier:
if not otherChild.declaration: if not otherChild.declaration:
print("WTF?") print("Problem in symbol tree merging")
print("OtherChild.dump:")
print(otherChild.dump(0)) print(otherChild.dump(0))
print("Other.dump:")
print(other.dump(0)) print(other.dump(0))
assert otherChild.declaration assert otherChild.declaration
operator = otherChild.declaration.name.names[-1] operator = otherChild.declaration.name.names[-1]
@ -2595,7 +2605,6 @@ class Symbol(object):
assert False # should have returned in the loop assert False # should have returned in the loop
def to_string(self, indent): def to_string(self, indent):
self._assert_invariants()
res = ['\t'*indent] res = ['\t'*indent]
if not self.parent: if not self.parent:
res.append('::') res.append('::')