diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-11-11 20:01:41 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-11-11 20:01:41 +0000 |
commit | a748214a43e14a3bd48c8aa2c20b7226c12575f3 (patch) | |
tree | daf39d0d17d4899117714d9b3ce1a50863b02939 /bindings | |
parent | dad78d5b7ea2a0bda1ad3e68e99f460af7da1ee3 (diff) |
[python] [tests] Fix test_linkage for unique external linkage
Starting with r314037, anonymous namespaces no longer give
unique-external linkage to variables. However, this linkage can still be
achieved by using a type which is not exterally visible,
e.g. through being declared in an anonymous namespace but used outside
it. Fix the test to take advantage of that.
Differential Revision: https://reviews.llvm.org/D39810
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/python/tests/cindex/test_linkage.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bindings/python/tests/cindex/test_linkage.py b/bindings/python/tests/cindex/test_linkage.py index 37223c2adb..6b482f8081 100644 --- a/bindings/python/tests/cindex/test_linkage.py +++ b/bindings/python/tests/cindex/test_linkage.py @@ -15,7 +15,8 @@ class TestLinkage(unittest.TestCase): tu = get_tu(""" void foo() { int no_linkage; } static int internal; -namespace { extern int unique_external; } +namespace { struct unique_external_type {} } +unique_external_type unique_external; extern int external; """, lang = 'cpp') |