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 | 3495440e45a2ce30414c457e12446c5bb5362fbc (patch) | |
| tree | 54244f2a3c7738694ac048a35c2f965d99c20367 /clang/bindings/python | |
| parent | 294b87b4329d8529f65d49024217bc1f9138fc15 (diff) | |
| download | bcm5719-llvm-3495440e45a2ce30414c457e12446c5bb5362fbc.tar.gz bcm5719-llvm-3495440e45a2ce30414c457e12446c5bb5362fbc.zip | |
[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
llvm-svn: 317986
Diffstat (limited to 'clang/bindings/python')
| -rw-r--r-- | clang/bindings/python/tests/cindex/test_linkage.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/bindings/python/tests/cindex/test_linkage.py b/clang/bindings/python/tests/cindex/test_linkage.py index 37223c2adb6..6b482f8081b 100644 --- a/clang/bindings/python/tests/cindex/test_linkage.py +++ b/clang/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') |

