summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2017-11-11 20:01:41 +0000
committerMichal Gorny <mgorny@gentoo.org>2017-11-11 20:01:41 +0000
commita748214a43e14a3bd48c8aa2c20b7226c12575f3 (patch)
treedaf39d0d17d4899117714d9b3ce1a50863b02939 /bindings
parentdad78d5b7ea2a0bda1ad3e68e99f460af7da1ee3 (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.py3
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')