https://llvm.org/bugs/show_bug.cgi?id=30695
Bug ID: 30695 Summary: Templated method inside a templated class ignores visibility attribute Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: andrew...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17441 --> https://llvm.org/bugs/attachment.cgi?id=17441&action=edit Code which repros the bug. When compiling with either `-fvisibility=hidden` or `-fvisibility-inlines-hidden`, templated class methods inside a templated class do not respect the visibility attribute (e.g. `__attribute__((visibility("default")))`) and remain hidden. Repro code: template<typename T> class A { int a; public: template<typename C> __attribute__ ((visibility ("default"))) static void foo() {} }; void func() { A<int>::foo<int>(); } Then run, on the above code: $ clang -c -fvisibility=hidden -o test.o test.cpp $ readelf -s test.o # shows `void A<int>::foo<int>()` is HIDDEN -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs