mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve cpp intersphinx support
Now types called out in function declarations will be searched for in the intersphinx inventory as well
This commit is contained in:
parent
1d0f667ecd
commit
5ebfd51672
@ -4816,12 +4816,12 @@ class CPPDomain(Domain):
|
||||
name = 'cpp'
|
||||
label = 'C++'
|
||||
object_types = {
|
||||
'class': ObjType(l_('class'), 'class'),
|
||||
'function': ObjType(l_('function'), 'func'),
|
||||
'class': ObjType(l_('class'), 'class', 'typeOrConcept'),
|
||||
'function': ObjType(l_('function'), 'func', 'typeOrConcept'),
|
||||
'member': ObjType(l_('member'), 'member'),
|
||||
'type': ObjType(l_('type'), 'type'),
|
||||
'concept': ObjType(l_('concept'), 'concept'),
|
||||
'enum': ObjType(l_('enum'), 'enum'),
|
||||
'type': ObjType(l_('type'), 'type', 'typeOrConcept'),
|
||||
'concept': ObjType(l_('concept'), 'concept', 'typeOrConcept'),
|
||||
'enum': ObjType(l_('enum'), 'enum', 'typeOrConcept'),
|
||||
'enumerator': ObjType(l_('enumerator'), 'enumerator')
|
||||
}
|
||||
|
||||
|
@ -4,3 +4,5 @@ test-ext-intersphinx-cppdomain
|
||||
.. cpp:namespace:: foo
|
||||
|
||||
:cpp:class:`Bar`
|
||||
|
||||
.. cpp:function:: std::uint8_t FooBarBaz()
|
||||
|
@ -232,6 +232,12 @@ def test_missing_reference_cppdomain(tempdir, app, status, warning):
|
||||
' href="https://docs.python.org/index.html#cpp_foo_bar"'
|
||||
' title="(in foo v2.0)"><code class="xref cpp cpp-class docutils literal">'
|
||||
'<span class="pre">Bar</span></code></a>' in html)
|
||||
assert ('<a class="reference external"'
|
||||
' href="https://docs.python.org/index.html#std"'
|
||||
' title="(in foo v2.0)">std</a>' in html)
|
||||
assert ('<a class="reference external"'
|
||||
' href="https://docs.python.org/index.html#std_uint8_t"'
|
||||
' title="(in foo v2.0)">uint8_t</a>' in html)
|
||||
|
||||
|
||||
def test_missing_reference_jsdomain(tempdir, app, status, warning):
|
||||
|
@ -34,6 +34,8 @@ module1 py:module 0 foo.html#module-module1 Long Module desc
|
||||
module2 py:module 0 foo.html#module-$ -
|
||||
module1.func py:function 1 sub/foo.html#$ -
|
||||
CFunc c:function 2 cfunc.html#CFunc -
|
||||
std cpp:type 1 index.html#std -
|
||||
std::uint8_t cpp:type 1 index.html#std_uint8_t -
|
||||
foo::Bar cpp:class 1 index.html#cpp_foo_bar -
|
||||
foo::Bar::baz cpp:function 1 index.html#cpp_foo_bar_baz -
|
||||
a term std:term -1 glossary.html#term-a-term -
|
||||
|
Loading…
Reference in New Issue
Block a user