C++, do not add index entries for decls in concepts

This commit is contained in:
Jakob Lykke Andersen 2017-12-12 15:03:41 +01:00
parent d9006ef5b2
commit 809388d836
2 changed files with 20 additions and 7 deletions

View File

@ -86,7 +86,8 @@ Bugs fixed
* #3882: Update the order of files for HTMLHelp and QTHelp
* #3962: sphinx-apidoc does not recognize implicit namespace packages correctly
* #4094: C++, allow empty template argument lists.
* C++: also hyperlink types in the name of declarations with qualified names.
* C++, also hyperlink types in the name of declarations with qualified names.
* C++, do not add index entries for declarations inside concepts.
Testing
--------

View File

@ -5474,6 +5474,18 @@ class CPPObject(ObjectDescription):
'report as bug (id=%s).' % (text_type(ast), newestId))
name = text_type(ast.symbol.get_full_nested_name()).lstrip(':')
# Add index entry, but not if it's a declaration inside a concept
isInConcept = False
s = ast.symbol.parent
while s is not None:
decl = s.declaration
s = s.parent
if decl is None:
continue
if decl.objectType == 'concept':
isInConcept = True
break
if not isInConcept:
strippedName = name
for prefix in self.env.config.cpp_index_common_prefix:
if name.startswith(prefix):