mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, fix template parameter bug.
Symbols for template parameters should only have a declaration if the parent symbol has.
This commit is contained in:
parent
8d087e86fb
commit
03cc72eea0
@ -2131,7 +2131,11 @@ class Symbol(object):
|
||||
for p in self.templateParams.params:
|
||||
if not p.get_identifier():
|
||||
continue
|
||||
decl = ASTDeclaration('templateParam', None, None, p)
|
||||
# only add a declaration if we our selfs from a declaration
|
||||
if declaration:
|
||||
decl = ASTDeclaration('templateParam', None, None, p)
|
||||
else:
|
||||
decl = None
|
||||
nne = ASTNestedNameElement(p.get_identifier(), None)
|
||||
nn = ASTNestedName([nne], rooted=False)
|
||||
self._add_symbols(nn, [], decl, docname)
|
||||
|
Loading…
Reference in New Issue
Block a user