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:
Jakob Lykke Andersen
2016-06-26 10:02:15 +02:00
parent 4be597bb34
commit f64ec1349a
2 changed files with 104 additions and 4 deletions
+13
View File
@@ -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: