Index: bindings/python/tests/cindex/test_tls_kind.py =================================================================== --- bindings/python/tests/cindex/test_tls_kind.py +++ bindings/python/tests/cindex/test_tls_kind.py @@ -27,7 +27,8 @@ # The following case tests '__declspec(thread)'. Since it is a Microsoft # specific extension, specific flags are required for the parser to pick # these up. - flags = ['-fms-extensions', '-target', 'x86_64-unknown-windows-win32'] + flags = ['-fms-compatibility-version=18.00', '-fms-extensions', + '-target', 'x86_64-unknown-windows-win32'] tu = get_tu(""" __declspec(thread) int tls_declspec; """, lang = 'cpp', flags=flags) @@ -35,3 +36,10 @@ tls_declspec = get_cursor(tu.cursor, 'tls_declspec') assert tls_declspec.tls_kind == TLSKind.STATIC + flags = ['-fms-extensions', '-target', 'x86_64-unknown-windows-win32'] + tu = get_tu(""" +__declspec(thread) int tls_declspec; +""", lang = 'cpp', flags=flags) + + tls_declspec = get_cursor(tu.cursor, 'tls_declspec') + assert tls_declspec.tls_kind == TLSKind.DYNAMIC