mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
C++, initial support for attributes.
Only simple GNU style supported, and only in the decl-specifier-list. See sphinx-doc/sphinx#2682.
This commit is contained in:
@@ -402,6 +402,19 @@ def test_templates():
|
||||
"RK18c_string_view_baseIK4Char6TraitsE")
|
||||
|
||||
|
||||
def test_attributes():
|
||||
# style: GNU
|
||||
check('member', '__attribute__(()) int f', 'f__i', '1f')
|
||||
check('member', '__attribute__((a)) int f', 'f__i', '1f')
|
||||
check('member', '__attribute__((a, b)) int f', 'f__i', '1f')
|
||||
|
||||
# position: decl specs
|
||||
check('function', 'static inline __attribute__(()) void f()',
|
||||
'f', '1fv',
|
||||
output='__attribute__(()) static inline void f()')
|
||||
|
||||
|
||||
|
||||
# def test_print():
|
||||
# # used for getting all the ids out for checking
|
||||
# for a in ids:
|
||||
|
||||
Reference in New Issue
Block a user