[PATCH] D39804: [clang] [python] [tests] Update TLSKind tests for newer MSVC versions
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 8 08:12:04 PST 2017
mgorny created this revision.
The bump of default _MSC_VER which occurred in r315107 has caused
the '__declspec(thread)' TLSKind to change from STATIC to DYNAMIC.
Update the clang python binding tests accordingly. Test both for
behavior with old and new -fms-compatibility-version.
Repository:
rL LLVM
https://reviews.llvm.org/D39804
Files:
bindings/python/tests/cindex/test_tls_kind.py
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,11 +27,19 @@
# 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)
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39804.122097.patch
Type: text/x-patch
Size: 1104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171108/00612493/attachment.bin>
More information about the cfe-commits
mailing list