[PATCH] D39810: [python] [tests] Fix test_linkage for unique external linkage

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 11 01:47:05 PST 2017


mgorny updated this revision to Diff 122575.
mgorny retitled this revision from "[clang] [python] [tests] Disable the broken unique-external linkage test" to "[python] [tests] Fix test_linkage for unique external linkage".
mgorny edited the summary of this revision.
mgorny added reviewers: jbcoe, aaron.ballman, frutiger.
mgorny added a comment.

Yay, I've found a way to get the desired linkage! ;-)


https://reviews.llvm.org/D39810

Files:
  bindings/python/tests/cindex/test_linkage.py


Index: bindings/python/tests/cindex/test_linkage.py
===================================================================
--- bindings/python/tests/cindex/test_linkage.py
+++ bindings/python/tests/cindex/test_linkage.py
@@ -15,7 +15,8 @@
         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')
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39810.122575.patch
Type: text/x-patch
Size: 487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171111/f285e61c/attachment.bin>


More information about the cfe-commits mailing list