mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, do not add index entries for decls in concepts
This commit is contained in:
parent
d9006ef5b2
commit
809388d836
3
CHANGES
3
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user